2018-03-27 11:17:48 +01:00
|
|
|
/* Memory layout for internal flash storage configuration:
|
|
|
|
|
|
|
|
FLASH_ISR .isr_vector
|
|
|
|
|
|
|
|
FLASH_TEXT .text
|
|
|
|
FLASH_TEXT .data
|
|
|
|
|
|
|
|
RAM .data
|
|
|
|
RAM .bss
|
|
|
|
RAM .heap
|
|
|
|
RAM .stack
|
|
|
|
*/
|
|
|
|
|
2016-09-21 10:49:45 +01:00
|
|
|
ENTRY(Reset_Handler)
|
|
|
|
|
|
|
|
/* define output sections */
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
/* The startup code goes first into FLASH */
|
|
|
|
.isr_vector :
|
|
|
|
{
|
|
|
|
. = ALIGN(4);
|
|
|
|
KEEP(*(.isr_vector)) /* Startup code */
|
|
|
|
|
|
|
|
/* This first flash block is 16K annd the isr vectors only take up
|
|
|
|
about 400 bytes. So we pull in a couple of object files to pad it
|
|
|
|
out. */
|
|
|
|
|
|
|
|
. = ALIGN(4);
|
2016-10-04 06:28:48 +01:00
|
|
|
|
|
|
|
/* NOTE: If you update the list of files contained in .isr_vector,
|
|
|
|
then be sure to also update smhal/Makefile where it forcibly
|
|
|
|
builds each of these files with -Os */
|
|
|
|
|
2016-09-21 10:49:45 +01:00
|
|
|
*/ff.o(.text*)
|
2016-10-04 06:28:48 +01:00
|
|
|
*/vfs_fat_*.o(.text*)
|
|
|
|
*/py/formatfloat.o(.text*)
|
|
|
|
*/py/parsenum.o(.text*)
|
|
|
|
*/py/mpprint.o(.text*)
|
2016-09-21 10:49:45 +01:00
|
|
|
|
|
|
|
. = ALIGN(4);
|
|
|
|
} >FLASH_ISR
|
2017-07-19 04:12:10 +01:00
|
|
|
|
2016-09-21 10:49:45 +01:00
|
|
|
/* The program code and other data goes into FLASH */
|
|
|
|
.text :
|
|
|
|
{
|
|
|
|
. = ALIGN(4);
|
|
|
|
*(.text*) /* .text* sections (code) */
|
|
|
|
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
|
|
|
|
/* *(.glue_7) */ /* glue arm to thumb code */
|
|
|
|
/* *(.glue_7t) */ /* glue thumb to arm code */
|
|
|
|
|
|
|
|
. = ALIGN(4);
|
|
|
|
_etext = .; /* define a global symbol at end of code */
|
|
|
|
} >FLASH_TEXT
|
2017-07-19 04:12:10 +01:00
|
|
|
|
2020-10-29 12:07:51 +00:00
|
|
|
INCLUDE common_extratext_data_in_flash_text.ld
|
|
|
|
INCLUDE common_bss_heap_stack.ld
|
2016-09-21 10:49:45 +01:00
|
|
|
}
|