bootloader verifies signature

This commit is contained in:
Conor Patrick
2018-07-15 01:23:38 -04:00
parent ed1d5d4570
commit dad7d90481
9 changed files with 73 additions and 12 deletions

View File

@@ -51,7 +51,7 @@ __asm void BOOT_jump(uint32_t sp, uint32_t pc)
bx r1
}
#else
void BOOT_jump(uint32_t sp, uint32_t pc)
void __attribute__((optimize("O0"))) BOOT_jump(uint32_t sp, uint32_t pc)
{
(void) sp;
(void) pc;
@@ -78,7 +78,7 @@ static void resetPeripherals(void)
* Boots the firmware. This function will activate the vector table
* of the firmware application and set the PC and SP from this table.
*****************************************************************************/
void BOOT_boot(void)
void __attribute__((optimize("O0"))) BOOT_boot(void)
{
uint32_t pc, sp;

View File

@@ -8,7 +8,7 @@
#include "InitDevice.h"
void bootloader_init(void);
uint8_t REBOOT_FLAG;
int main(void)
{
@@ -81,7 +81,7 @@ bootmode:
// printf("accum: %d\n", (uint32_t)accum);
// printf("dt: %d\n", t2 - dt);
// dt = t2;
memset(hidmsg, 0, sizeof(hidmsg));
// memset(hidmsg, 0, sizeof(hidmsg));
}
else
{
@@ -89,7 +89,11 @@ bootmode:
}
ctaphid_check_timeouts();
if (REBOOT_FLAG) break;
}
// delay(100);
}
}