This is the API that the bootloader uses to rewrite Hercules’ flash. You’ll probably need to look up and modify the API calls it’s using in order to make the below modifications.
[ ] Get the demo UART bootloader for the HDK working on the HDK
[ ] Make the following modifications so that it could work in our system and test on HDK
[ ] Port to our SBC and test
[ ] Also will likely require custom GSW program to process the binary, pass all data as commands to WD, and generally manage the programming as was the case in #152 (i.e. making sure all commands go through, in the right order, etc.).
[ ] Make sure there are no downstream consequences to how FreeRTOS kernel runs, etc (might use fixed memory addresses, which could be changed by addition of bootloader). Perform FreeRTOS Kernel health checks after everything else works.
Likely Needed Changes in bootloader and get working on the HDK:
Which UART (needs to be the one used with WD)
UART settings (needs to be WD UART settings: 57600 baud, etc)
Bootloader should send an I’ve booted message over UART (so WD knows it’s up) then wait for a response message over UART telling it whether to enter “user program” or bootloader “main menu” (instead of a push button / GPIO line - b/c I believe WD and Herc don’t share any besides reset lines).
This will require moving UART initialization to the top of the bootloader program.
WD can then send commands to “navigate” the bootloader “menu” from there (since it’s just fancy UART comms).
Ideally, data chunk size (so FW chunks can be sent in blocks that fit within the WD’s 512B maximum message size - technically 600B but requires some overhead)
Make sure there’s no timeout on the bootloader (make sure it won’t jump to the “user program” address if it waits for a couple minutes.
Other notes:
bl_config.h contains a lot of settings you can screw around with an might be a good place to start.
Lingering question: figure out how to program (using CCS) both a bootloader and our main program.
Cool side note: it says in the app note that this bootloader app was written by a dude named “QJ Wang”. Apparently, he has been active on the forums before so if we hit a road block, it’s not unthinkable that we could try to contact him.
Allows us to refine and change Hercules operation as late as the Moon.
See #193 for supporting WD + GSW commanding infrastructure.
Critical Resources:
Helpful Resources:
Highlevel Process:
[ ] Get the demo UART bootloader for the HDK working on the HDK
[ ] Make the following modifications so that it could work in our system and test on HDK
[ ] Port to our SBC and test
[ ] Also will likely require custom GSW program to process the binary, pass all data as commands to WD, and generally manage the programming as was the case in #152 (i.e. making sure all commands go through, in the right order, etc.).
[ ] Make sure there are no downstream consequences to how FreeRTOS kernel runs, etc (might use fixed memory addresses, which could be changed by addition of bootloader). Perform FreeRTOS Kernel health checks after everything else works.
Likely Needed Changes in bootloader and get working on the HDK:
Other notes: