#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);
*/
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;
-
/* Setup hardware required for the bootloader */
SetupHardware();
# -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)
#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);
*/
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();
# -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)