2020-11-24 15:48:25 +01:00
|
|
|
/* linker script for application running on STM32F401xC micro-controller
|
|
|
|
* the STM32F401xC has 256 KB of flash starting at 0x0800 0000, and 64 KB of RAM starting at 0x2000 0000
|
|
|
|
* the USB DFU bootloader will use the first sector, which is 16 KB large.
|
|
|
|
* this is followed by the application.
|
2019-12-21 19:48:00 +01:00
|
|
|
* the first 4 bytes of the RAM is reserved for the DFU magic word (DFU! to start DFU bootloader)
|
2017-04-15 13:51:24 +02:00
|
|
|
*/
|
|
|
|
|
2020-01-10 11:01:53 +01:00
|
|
|
/* define memory regions. */
|
2017-04-15 13:51:24 +02:00
|
|
|
MEMORY
|
|
|
|
{
|
2020-11-24 15:48:25 +01:00
|
|
|
rom (rx) : ORIGIN = 0x08000000 + 16K, LENGTH = 256K - 16K
|
|
|
|
ram (rwx) : ORIGIN = 0x20000000 + 4, LENGTH = 64K - 4
|
2017-04-15 13:51:24 +02:00
|
|
|
}
|
2020-01-10 11:01:53 +01:00
|
|
|
/* RAM location reserved so application can talk to bootloader and tell to start DFU */
|
2019-12-21 19:48:00 +01:00
|
|
|
PROVIDE(__dfu_magic = ORIGIN(ram) - 4);
|
|
|
|
|
2020-01-12 15:52:27 +01:00
|
|
|
/* include rest of the definitions for the ARM Cortex-M, including STM32F1 family */
|
|
|
|
INCLUDE cortex-m-generic.ld
|