1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-20 14:55:09 +03:00

Added boot section with "BOOT" to allow the bootloader to be recognized

This commit is contained in:
bsongis 2014-04-08 16:39:03 +02:00
parent a4d6a6f5e3
commit 845e6e06ea
2 changed files with 9 additions and 3 deletions

View file

@ -67,7 +67,7 @@
#include "../translations/en.h" #include "../translations/en.h"
#if defined(PCBTARANIS) #if defined(PCBTARANIS)
#define BOOTLOADER_TITLE " OpenTX Boot Loader v1.0" #define BOOTLOADER_TITLE "Taranis Boot Loader - v1.0"
#define BOOT_KEY_UP KEY_PLUS #define BOOT_KEY_UP KEY_PLUS
#define BOOT_KEY_DOWN KEY_MINUS #define BOOT_KEY_DOWN KEY_MINUS
#define BOOT_KEY_LEFT KEY_MENU #define BOOT_KEY_LEFT KEY_MENU
@ -76,7 +76,7 @@
#define BOOT_KEY_EXIT KEY_EXIT #define BOOT_KEY_EXIT KEY_EXIT
#define DISPLAY_CHAR_WIDTH 35 #define DISPLAY_CHAR_WIDTH 35
#elif defined(PCBSKY9X) #elif defined(PCBSKY9X)
#define BOOTLOADER_TITLE "Boot Loader - Sky9x" #define BOOTLOADER_TITLE "Sky9x Boot Loader - v1.0"
#endif #endif
// states // states
@ -91,6 +91,10 @@ enum BootLoaderStates {
ST_FLASH_DONE, ST_FLASH_DONE,
ST_USB, ST_USB,
ST_REBOOT, ST_REBOOT,
const uint8_t bootloaderVersion[] __attribute__ ((section(".version"))) =
{
'B', 'O', 'O', 'T', '1', '0'
}; };
/*---------------------------------------------------------------------------- /*----------------------------------------------------------------------------

View file

@ -42,8 +42,10 @@ SECTIONS
/* The program code and other data goes into FLASH */ /* The program code and other data goes into FLASH */
.text : .text :
{ {
. = ALIGN(4); . = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */ KEEP(*(.isr_vector)) /* Startup code */
*(.version)
. = ALIGN(4); /* Align the start of the text part */
*(.text) /* .text sections (code) */ *(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */ *(.text*) /* .text* sections (code) */
*(.rodata) /* .rodata sections (constants, strings, etc.) */ *(.rodata) /* .rodata sections (constants, strings, etc.) */