Vagrant Usage - shraken/gboot GitHub Wiki
A vagrant box is provided for simplified virtual machine building and provisioning. Vagrant uses a
VirtualBox virtual machine running running x64 trusty Ubuntu image. The vagrant box that is created contains the required tools and dependencies for building both gboot
and gflash
projects. Additionally, the vagrant box provides USB pass through and mounts the required JLink and
Requirements
The VirtualBox Extension Pack is required for USB 2.0/3.0 devices. Close the VirtualBox application before executing the below commands. On Windows systems, just open the *.vbox-extpack file.
wget http://download.virtualbox.org/virtualbox/5.2.2/Oracle_VM_VirtualBox_Extension_Pack-5.2.2-119230.vbox-extpack
open -W Oracle_VM_VirtualBox_Extension_Pack-5.2.2-119230.vbox-extpack
rm Oracle_VM_VirtualBox_Extension_Pack-5.2.2-119230.vbox-extpack
*NOTE: You must fill out the info form and download the latest JLink Linux x64 software package from SEGGER with the above link to flash the gboot bootloader project for the first time. Alternatively, you can copy the hex file to a native OS and program using traditional SiLabs 8-bit USB debug adapters.
Build and Flashing It
Attach the SEGGER JLink adapter to the host system before running the below commands.
Build the vagrant image.
vagrant up
vagrant ssh
This will drop you in a terminal on the Ubuntu virtual machine from which you can build and flash.
To build and flash the gboot
firmware for the F380 type with 64 kB ROM size execute the following. See gboot/ReadMe.txt for different build flags.
cd /vagrant/gboot
make FLASH_SIZE=64 VARIANT=F38x
To build and flash the gflash
utility execute the following.
cd /vagrant/gflash
mkdir build
cd build
cmake ..
make
Cleanup
You can turn off and remove the Vagrant box by issuing the follow from the native shell.
vagrant halt
vagrant destroy -f