bootloader verifies signature
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF;com.silabs.ss.framework.debugger.core.BIN;com.silabs.ss.framework.debugger.core.HEX;com.silabs.ss.framework.debugger.core.S37;com.silabs.ss.framework.debugger.core.EBL;com.silabs.ss.framework.debugger.core.GBL" id="com.silabs.ide.si32.gcc.cdt.managedbuild.target.gnu.platform.base.613101530" isAbstract="false" name="Debug Platform" osList="win32,linux,macosx" superClass="com.silabs.ide.si32.gcc.cdt.managedbuild.target.gnu.platform.base"/>
|
||||
<builder buildPath="${workspace_loc:/efm32boot}/GNU ARM v7.2.1 - Debug" id="com.silabs.ide.si32.gcc.cdt.managedbuild.target.gnu.builder.base.2113865201" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Si32 GNU ARM Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.silabs.ide.si32.gcc.cdt.managedbuild.target.gnu.builder.base"/>
|
||||
<tool id="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.c.compiler.base.981192541" name="GNU ARM C Compiler" superClass="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.c.compiler.base">
|
||||
<option id="gnu.c.compiler.option.optimization.level.1400029735" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" value="gnu.c.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.optimization.level.1400029735" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" value="gnu.c.optimization.level.size" valueType="enumerated"/>
|
||||
<option id="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.c.compiler.def.symbols.115820704" name="Defined symbols (-D)" superClass="com.silabs.ide.si32.gcc.cdt.managedbuild.tool.gnu.c.compiler.def.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="DEBUG=1"/>
|
||||
<listOptionValue builtIn="false" value="EFM32PG1B200F256GM48=1"/>
|
||||
|
@@ -30,4 +30,6 @@ int bootloader_bridge(uint8_t klen, uint8_t * keyh);
|
||||
|
||||
int is_authorized_to_boot();
|
||||
|
||||
extern uint8_t REBOOT_FLAG;
|
||||
|
||||
#endif /* SRC_APP_H_ */
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user