From 5f951abc150601e403f5c5a99601681f3cc251c4 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Sat, 27 Feb 2016 19:11:40 +0100 Subject: [PATCH] Revert of my latest commit --- radio/src/loadboot.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/radio/src/loadboot.cpp b/radio/src/loadboot.cpp index fd8a9987a..cfc5b1448 100644 --- a/radio/src/loadboot.cpp +++ b/radio/src/loadboot.cpp @@ -20,26 +20,43 @@ #include "opentx.h" +#if defined(PCBSKY9X) + #include "AT91SAM3S4.h" +#else + #include "targets/taranis/board_taranis.h" +#endif + +#if defined(PCBTARANIS) void bwdt_reset() { IWDG->KR = 0xAAAA; // reload } +#endif +#if defined(PCBTARANIS) // TODO needed? __attribute__ ((section(".bootrodata"), used)) void _bootStart(void); +#endif +#if defined(PCBTARANIS) __attribute__ ((section(".isr_boot_vector"), used)) const uint32_t BootVectors[] = { (uint32_t) &_estack, (uint32_t) (void (*)(void)) ((unsigned long) &_bootStart) }; +#endif +#if defined(PCBTARANIS) __attribute__ ((section(".bootrodata.*"), used)) +#elif defined(PCBSKY9X) +__attribute__ ((section(".bootrodata"), used)) +#endif const uint8_t BootCode[] = { #include "bootloader.lbm" }; +#if defined(PCBTARANIS) __attribute__ ((section(".bootrodata"), used)) void _bootStart() { @@ -140,4 +157,5 @@ void _bootStart() asm("bx r0"); // Execute application } +#endif