diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2011-11-23 14:09:01 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2011-11-23 14:09:01 +0000 |
| commit | 93b9cc0fd4f8fa2be83fe3d5ad5ab897d260b1f6 (patch) | |
| tree | 08086c52834794e8db1a40d07679443a4b4828aa /Bootloaders/DFU | |
| parent | a7fe75006655ac6be87470e2ddf3ff17e7387a1d (diff) | |
Use the proper "-Wl,--undefined=BootloaderAPI_JumpTable" linker command line parameter in the bootloaders to ensure that the API jump tables are not discarded, rather than the previous C volatile pointer hack (thanks to Opendous Inc.).
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1987 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Bootloaders/DFU')
| -rw-r--r-- | Bootloaders/DFU/BootloaderAPI.h | 3 | ||||
| -rw-r--r-- | Bootloaders/DFU/BootloaderDFU.c | 4 | ||||
| -rw-r--r-- | Bootloaders/DFU/makefile | 2 |
3 files changed, 1 insertions, 8 deletions
diff --git a/Bootloaders/DFU/BootloaderAPI.h b/Bootloaders/DFU/BootloaderAPI.h index 9c9d5a4c..e9709125 100644 --- a/Bootloaders/DFU/BootloaderAPI.h +++ b/Bootloaders/DFU/BootloaderAPI.h @@ -43,9 +43,6 @@ #include <LUFA/Common/Common.h> - /* External Variables: */ - extern uint8_t* BootloaderAPI_JumpTable; - /* Function Prototypes: */ void BootloaderAPI_ErasePage(uint32_t Address); void BootloaderAPI_WritePage(uint32_t Address); diff --git a/Bootloaders/DFU/BootloaderDFU.c b/Bootloaders/DFU/BootloaderDFU.c index 078d59de..6e0c95d0 100644 --- a/Bootloaders/DFU/BootloaderDFU.c +++ b/Bootloaders/DFU/BootloaderDFU.c @@ -99,10 +99,6 @@ static uint16_t EndAddr = 0x0000; */ int main(void) { - /* Force a reference to the API jump table to prevent the linker from discarding it */ - uint8_t* volatile Dummy = BootloaderAPI_JumpTable; - (void)Dummy; - /* Configure hardware required by the bootloader */ SetupHardware(); diff --git a/Bootloaders/DFU/makefile b/Bootloaders/DFU/makefile index bd7120d8..87cfd072 100644 --- a/Bootloaders/DFU/makefile +++ b/Bootloaders/DFU/makefile @@ -335,7 +335,7 @@ EXTMEMOPTS = # -Map: create map file # --cref: add cross reference to map file LDFLAGS = -Wl,-Map=$(TARGET).map,--cref -LDFLAGS += -Wl,--section-start=.text=$(BOOT_START) -Wl,--section-start=.apitable=$(BOOT_API_TABLESTART) +LDFLAGS += -Wl,--section-start=.text=$(BOOT_START) -Wl,--section-start=.apitable=$(BOOT_API_TABLESTART) -Wl,--undefined=BootloaderAPI_JumpTable LDFLAGS += -Wl,--relax LDFLAGS += -Wl,--gc-sections LDFLAGS += $(EXTMEMOPTS) |
