1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

safeboot: add safe boot support to OP and PIPX bootloaders

Application support for OP and PIPX will show up in future
commits.
This commit is contained in:
Stacey Sheldon 2012-01-14 14:28:11 -05:00
parent 2d27c54d48
commit 1d14ab00e1
4 changed files with 14 additions and 2 deletions

View File

@ -353,10 +353,18 @@ void processComand(uint8_t *xReceive_Buffer) {
DeviceState = failed_jump;
break;
} else {
if (Data == 0x5AFE) {
/* Force board into safe mode */
PIOS_IAP_WriteBootCount(0xFFFF);
}
FLASH_Lock();
JumpToApp = 1;
}
} else {
if (Data == 0x5AFE) {
/* Force board into safe mode */
PIOS_IAP_WriteBootCount(0xFFFF);
}
FLASH_Lock();
JumpToApp = 1;
}

View File

@ -301,6 +301,10 @@ void processComand(uint8_t *xReceive_Buffer) {
sendData(Buffer + 1, 63);
break;
case JumpFW:
if (Data == 0x5AFE) {
/* Force board into safe mode */
PIOS_IAP_WriteBootCount(0xFFFF);
}
FLASH_Lock();
JumpToApp = 1;
break;

View File

@ -1,6 +1,6 @@
BOARD_TYPE := 0x01
BOARD_REVISION := 0x01
BOOTLOADER_VERSION := 0x00
BOOTLOADER_VERSION := 0x01
HW_TYPE := 0x00
MCU := cortex-m3

View File

@ -1,6 +1,6 @@
BOARD_TYPE := 0x03
BOARD_REVISION := 0x01
BOOTLOADER_VERSION := 0x00
BOOTLOADER_VERSION := 0x01
HW_TYPE := 0x01
MCU := cortex-m3