This commit is contained in:
Matthew Kennedy 2020-12-09 08:21:59 -08:00
parent 98fc25540f
commit a85a4a8c65
1 changed files with 5 additions and 1 deletions

View File

@ -37,6 +37,8 @@ void boot_app() {
typedef void (*ResetVectorFunction)(void); typedef void (*ResetVectorFunction)(void);
((ResetVectorFunction)reset_vector)(); ((ResetVectorFunction)reset_vector)();
while(1);
} }
uint32_t appFlashAddr = (uint32_t)&__appflash_start__; uint32_t appFlashAddr = (uint32_t)&__appflash_start__;
@ -48,7 +50,7 @@ void EraseAppPages()
size_t appSizeKb = __appflash_size__ / 1024; size_t appSizeKb = __appflash_size__ / 1024;
for (int i = 0; i <= appSizeKb; i++) for (size_t i = 0; i <= appSizeKb; i++)
{ {
Flash::ErasePage(pageIdx); Flash::ErasePage(pageIdx);
pageIdx++; pageIdx++;
@ -163,6 +165,8 @@ void RunBootloaderLoop()
THD_WORKING_AREA(waBootloaderThread, 512); THD_WORKING_AREA(waBootloaderThread, 512);
THD_FUNCTION(BootloaderThread, arg) THD_FUNCTION(BootloaderThread, arg)
{ {
(void)arg;
WaitForBootloaderCmd(); WaitForBootloaderCmd();
// We've rx'd a BL command, don't load the app! // We've rx'd a BL command, don't load the app!