Application Auto Start At Boot - ProgrammableMatterProject/BlinkyBlocks GitHub Wiki
Instead of the usual uploading of an application on the BB for it to replicate, then jump to start address in Flash memory, auto-start mode from booting is available. You can do so enabling the mode in configuration whether manually with the hexadecimal address or using a previously uploaded application start address.
Hard reboot the BBv2 Spread the spanning tree:
./blinkyApploaderCLI -t -c 0
Reset current configuration to default:
./blinkyApploaderCLI -e
Hard reboot the BBv2 (power off, then on), then rebuild the spanning tree
./blinkyApploaderCLI -t -c 0
Set IDs:
./blinkyApploaderCLI -k 1 (1 is for the sake of the example)
Hard reboot the BBv2 (power off, then on), then rebuild the spanning tree
./blinkyApploaderCLI -t -c 0
Switch to advanced configuration mode BBPP:
./blinkyApploaderCLI -a 1
Upload and run the new application the manual way for validation:
sudo ./blinkyApploaderCLI -p ~/Downloads/Appli-ng.hex
sudo ./blinkyApploaderCLI -j 0x8010000
Hard reboot the BBv2
./blinkyApploaderCLI -t -c 0
Check the current configuration
./blinkyApploaderCLI -g
00000001 00000000 00000001 00000000 08008000 FFFFFFFF
Only 5 x 32 bits words out of 16 are currently reserved variables located in the bootloader configuration section, but it is definitely possible to develop an app with up to 11 variables (the remaining ones, not used by the bootloader):
- Configuration section @ (for internal wear leveling use)
- Auto start flag
- Delay (sec)
- ID
- Application start @
- First unused variable Configure auto start and execution delay:
sudo ./blinkyApploaderCLI -w 1,1 -w 2,2
Until now all configuration update are stored in RAM in order to reduce useless Flash writings. Therefore, we shall write these changes in the Flash once and for all when we are ready, and check the new configuration:
sudo ./blinkyApploaderCLI -w 128,0
(0 parameter not used)
./blinkyApploaderCLI -g
00000004 00000001 00000002 00000001 08010000 FFFFFFFF
Hard reboot the BBv2 After 2 seconds as previously configured, the application shall start.