diff --git a/firmware/atmel_softpack_libraries/usb/device/dfu/dfu_driver.c b/firmware/atmel_softpack_libraries/usb/device/dfu/dfu_driver.c index 08fda6d4..14a8469f 100644 --- a/firmware/atmel_softpack_libraries/usb/device/dfu/dfu_driver.c +++ b/firmware/atmel_softpack_libraries/usb/device/dfu/dfu_driver.c @@ -35,7 +35,7 @@ /* FIXME: this was used for a special ELF section which then got called * by DFU code and Application code, across flash partitions */ -#define __dfudata +#define __dfudata __attribute__ ((section (".dfudata"))) #define __dfufunc /// Standard device driver instance. diff --git a/firmware/libboard/common/resources/sam3s1/flash.ld b/firmware/libboard/common/resources/sam3s1/flash.ld index b6c5428f..209808ab 100644 --- a/firmware/libboard/common/resources/sam3s1/flash.ld +++ b/firmware/libboard/common/resources/sam3s1/flash.ld @@ -109,6 +109,8 @@ SECTIONS { . = ALIGN(4); _srelocate = .; + /* we must make sure the .dfudata is linked to start of RAM */ + *(.dfudata .dfudata.*); *(.ramfunc .ramfunc.*); *(.data .data.*); . = ALIGN(4); diff --git a/firmware/libboard/common/resources/sam3s2/flash.ld b/firmware/libboard/common/resources/sam3s2/flash.ld index 22cfe59d..5b522732 100644 --- a/firmware/libboard/common/resources/sam3s2/flash.ld +++ b/firmware/libboard/common/resources/sam3s2/flash.ld @@ -109,6 +109,8 @@ SECTIONS { . = ALIGN(4); _srelocate = .; + /* we must make sure the .dfudata is linked to start of RAM */ + *(.dfudata .dfudata.*); *(.ramfunc .ramfunc.*); *(.data .data.*); . = ALIGN(4); diff --git a/firmware/libboard/common/resources/sam3s4/flash.ld b/firmware/libboard/common/resources/sam3s4/flash.ld index c47a2c50..bdebbdee 100644 --- a/firmware/libboard/common/resources/sam3s4/flash.ld +++ b/firmware/libboard/common/resources/sam3s4/flash.ld @@ -109,6 +109,8 @@ SECTIONS { . = ALIGN(4); _srelocate = .; + /* we must make sure the .dfudata is linked to start of RAM */ + *(.dfudata .dfudata.*); *(.ramfunc .ramfunc.*); *(.data .data.*); . = ALIGN(4);