21 lines
882 B
Plaintext
21 lines
882 B
Plaintext
/* 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.
|
|
* the first 4 bytes of the RAM are reserved for the DFU magic word (DFU! to start DFU bootloader)
|
|
*/
|
|
|
|
/* define memory regions. */
|
|
MEMORY
|
|
{
|
|
rom (rx) : ORIGIN = 0x08000000, LENGTH = 16K
|
|
ram (rwx) : ORIGIN = 0x20000000 + 4, LENGTH = 64K - 4
|
|
}
|
|
/* where the main application starts */
|
|
PROVIDE(__application_beginning = ORIGIN(rom) + LENGTH(rom));
|
|
/* RAM location reserved so application can talk to bootloader and tell to start DFU */
|
|
PROVIDE(__dfu_magic = ORIGIN(ram) - 4);
|
|
|
|
/* include rest of the definitions for the ARM Cortex-M, including STM32F4 family */
|
|
INCLUDE cortex-m-generic.ld
|