mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #13832 from moshe-shahar/fix-gcc-non-contiguous
Fix GCC_ARM non-contiguous FW for `K64F` and `K66F`pull/13918/head
commit
ac45aacd5d
|
@ -54,6 +54,8 @@
|
||||||
|
|
||||||
#if !defined(MBED_APP_START)
|
#if !defined(MBED_APP_START)
|
||||||
#define MBED_APP_START 0
|
#define MBED_APP_START 0
|
||||||
|
#elif MBED_APP_START > 0 && MBED_APP_START < 0x410
|
||||||
|
#error MBED_APP_START too small and will overwrite interrupts and flash config
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(MBED_APP_SIZE)
|
#if !defined(MBED_APP_SIZE)
|
||||||
|
@ -63,12 +65,21 @@
|
||||||
#define m_interrupts_start MBED_APP_START
|
#define m_interrupts_start MBED_APP_START
|
||||||
#define m_interrupts_size 0x00000400
|
#define m_interrupts_size 0x00000400
|
||||||
|
|
||||||
|
#if MBED_APP_START == 0
|
||||||
|
|
||||||
#define m_flash_config_start MBED_APP_START + 0x400
|
#define m_flash_config_start MBED_APP_START + 0x400
|
||||||
#define m_flash_config_size 0x00000010
|
#define m_flash_config_size 0x00000010
|
||||||
|
|
||||||
#define m_text_start MBED_APP_START + 0x410
|
#define m_text_start MBED_APP_START + 0x410
|
||||||
#define m_text_size MBED_APP_SIZE - 0x410
|
#define m_text_size MBED_APP_SIZE - 0x410
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define m_text_start MBED_APP_START + 0x400
|
||||||
|
#define m_text_size MBED_APP_SIZE - 0x400
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#define m_interrupts_ram_start 0x1FFF0000
|
#define m_interrupts_ram_start 0x1FFF0000
|
||||||
#define m_interrupts_ram_size __ram_vector_table_size__
|
#define m_interrupts_ram_size __ram_vector_table_size__
|
||||||
|
|
||||||
|
@ -100,9 +111,11 @@ LR_IROM1 m_interrupts_start m_text_start+m_text_size-m_interrupts_start { ; lo
|
||||||
VECTOR_ROM m_interrupts_start m_interrupts_size { ; load address = execution address
|
VECTOR_ROM m_interrupts_start m_interrupts_size { ; load address = execution address
|
||||||
* (RESET,+FIRST)
|
* (RESET,+FIRST)
|
||||||
}
|
}
|
||||||
|
#if MBED_APP_START == 0
|
||||||
ER_m_flash_config m_flash_config_start FIXED m_flash_config_size { ; load address = execution address
|
ER_m_flash_config m_flash_config_start FIXED m_flash_config_size { ; load address = execution address
|
||||||
* (FlashConfig)
|
* (FlashConfig)
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
ER_IROM1 m_text_start m_text_size { ; load address = execution address
|
ER_IROM1 m_text_start m_text_size { ; load address = execution address
|
||||||
* (InRoot$$Sections)
|
* (InRoot$$Sections)
|
||||||
.ANY (+RO)
|
.ANY (+RO)
|
||||||
|
|
|
@ -59,6 +59,8 @@ __stack_size__ = MBED_CONF_TARGET_BOOT_STACK_SIZE;
|
||||||
|
|
||||||
#if !defined(MBED_APP_START)
|
#if !defined(MBED_APP_START)
|
||||||
#define MBED_APP_START 0
|
#define MBED_APP_START 0
|
||||||
|
#elif MBED_APP_START > 0 && MBED_APP_START < 0x410
|
||||||
|
#error MBED_APP_START too small and will overwrite interrupts and flash config
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(MBED_APP_SIZE)
|
#if !defined(MBED_APP_SIZE)
|
||||||
|
@ -72,9 +74,13 @@ M_CRASH_DATA_RAM_SIZE = 0x100;
|
||||||
/* Specify the memory areas */
|
/* Specify the memory areas */
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
|
#if MBED_APP_START == 0
|
||||||
m_interrupts (RX) : ORIGIN = MBED_APP_START, LENGTH = 0x400
|
m_interrupts (RX) : ORIGIN = MBED_APP_START, LENGTH = 0x400
|
||||||
m_flash_config (RX) : ORIGIN = MBED_APP_START + 0x400, LENGTH = 0x10
|
m_flash_config (RX) : ORIGIN = MBED_APP_START + 0x400, LENGTH = 0x10
|
||||||
m_text (RX) : ORIGIN = MBED_APP_START + 0x410, LENGTH = MBED_APP_SIZE - 0x410
|
m_text (RX) : ORIGIN = MBED_APP_START + 0x410, LENGTH = MBED_APP_SIZE - 0x410
|
||||||
|
#else
|
||||||
|
m_text (RX) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
|
||||||
|
#endif
|
||||||
m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000
|
m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000
|
||||||
m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00030000
|
m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00030000
|
||||||
}
|
}
|
||||||
|
@ -89,6 +95,7 @@ SECTIONS
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
KEEP(*(.isr_vector)) /* Startup code */
|
KEEP(*(.isr_vector)) /* Startup code */
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
|
#if MBED_APP_START == 0
|
||||||
} > m_interrupts
|
} > m_interrupts
|
||||||
|
|
||||||
.flash_config :
|
.flash_config :
|
||||||
|
@ -97,8 +104,9 @@ SECTIONS
|
||||||
KEEP(*(.FlashConfig)) /* Flash Configuration Field (FCF) */
|
KEEP(*(.FlashConfig)) /* Flash Configuration Field (FCF) */
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
} > m_flash_config
|
} > m_flash_config
|
||||||
|
#else
|
||||||
/* The program code and other data goes into internal flash */
|
} > m_text
|
||||||
|
#endif
|
||||||
.text :
|
.text :
|
||||||
{
|
{
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
|
|
|
@ -57,7 +57,10 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(MBED_APP_START)
|
#if !defined(MBED_APP_START)
|
||||||
|
|
||||||
#define MBED_APP_START 0
|
#define MBED_APP_START 0
|
||||||
|
#elif MBED_APP_START > 0 && MBED_APP_START < 0x410
|
||||||
|
#error MBED_APP_START too small and will overwrite interrupts and flash config
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(MBED_APP_SIZE)
|
#if !defined(MBED_APP_SIZE)
|
||||||
|
@ -75,12 +78,21 @@
|
||||||
#define m_interrupts_start MBED_APP_START
|
#define m_interrupts_start MBED_APP_START
|
||||||
#define m_interrupts_size 0x00000400
|
#define m_interrupts_size 0x00000400
|
||||||
|
|
||||||
|
#if MBED_APP_START == 0
|
||||||
|
|
||||||
#define m_flash_config_start MBED_APP_START + 0x400
|
#define m_flash_config_start MBED_APP_START + 0x400
|
||||||
#define m_flash_config_size 0x00000010
|
#define m_flash_config_size 0x00000010
|
||||||
|
|
||||||
#define m_text_start MBED_APP_START + 0x410
|
#define m_text_start MBED_APP_START + 0x410
|
||||||
#define m_text_size MBED_APP_SIZE - 0x410
|
#define m_text_size MBED_APP_SIZE - 0x410
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define m_text_start MBED_APP_START + 0x400
|
||||||
|
#define m_text_size MBED_APP_SIZE - 0x400
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#define m_interrupts_ram_start 0x1FFF0000
|
#define m_interrupts_ram_start 0x1FFF0000
|
||||||
#define m_interrupts_ram_size __ram_vector_table_size__
|
#define m_interrupts_ram_size __ram_vector_table_size__
|
||||||
|
|
||||||
|
@ -104,9 +116,11 @@ LR_IROM1 m_interrupts_start m_text_start+m_text_size-m_interrupts_start { ; load
|
||||||
VECTOR_ROM m_interrupts_start m_interrupts_size { ; load address = execution address
|
VECTOR_ROM m_interrupts_start m_interrupts_size { ; load address = execution address
|
||||||
* (RESET,+FIRST)
|
* (RESET,+FIRST)
|
||||||
}
|
}
|
||||||
|
#if MBED_APP_START == 0
|
||||||
ER_m_flash_config m_flash_config_start FIXED m_flash_config_size { ; load address = execution address
|
ER_m_flash_config m_flash_config_start FIXED m_flash_config_size { ; load address = execution address
|
||||||
* (FlashConfig)
|
* (FlashConfig)
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
ER_IROM1 m_text_start m_text_size { ; load address = execution address
|
ER_IROM1 m_text_start m_text_size { ; load address = execution address
|
||||||
* (InRoot$$Sections)
|
* (InRoot$$Sections)
|
||||||
.ANY (+RO)
|
.ANY (+RO)
|
||||||
|
|
|
@ -55,6 +55,8 @@ __ram_vector_table__ = 1;
|
||||||
|
|
||||||
#if !defined(MBED_APP_START)
|
#if !defined(MBED_APP_START)
|
||||||
#define MBED_APP_START 0
|
#define MBED_APP_START 0
|
||||||
|
#elif MBED_APP_START > 0 && MBED_APP_START < 0x410
|
||||||
|
#error MBED_APP_START too small and will overwrite interrupts and flash config
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(MBED_APP_SIZE)
|
#if !defined(MBED_APP_SIZE)
|
||||||
|
@ -74,9 +76,13 @@ M_CRASH_DATA_RAM_SIZE = 0x100;
|
||||||
/* Specify the memory areas */
|
/* Specify the memory areas */
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
|
#if MBED_APP_START == 0
|
||||||
m_interrupts (RX) : ORIGIN = MBED_APP_START, LENGTH = 0x400
|
m_interrupts (RX) : ORIGIN = MBED_APP_START, LENGTH = 0x400
|
||||||
m_flash_config (RX) : ORIGIN = MBED_APP_START + 0x400, LENGTH = 0x10
|
m_flash_config (RX) : ORIGIN = MBED_APP_START + 0x400, LENGTH = 0x10
|
||||||
m_text (RX) : ORIGIN = MBED_APP_START + 0x410, LENGTH = MBED_APP_SIZE - 0x410
|
m_text (RX) : ORIGIN = MBED_APP_START + 0x410, LENGTH = MBED_APP_SIZE - 0x410
|
||||||
|
#else
|
||||||
|
m_text (RX) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
|
||||||
|
#endif
|
||||||
m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000
|
m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000
|
||||||
m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00030000
|
m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00030000
|
||||||
}
|
}
|
||||||
|
@ -91,6 +97,7 @@ SECTIONS
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
KEEP(*(.isr_vector)) /* Startup code */
|
KEEP(*(.isr_vector)) /* Startup code */
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
|
#if MBED_APP_START == 0
|
||||||
} > m_interrupts
|
} > m_interrupts
|
||||||
|
|
||||||
.flash_config :
|
.flash_config :
|
||||||
|
@ -99,7 +106,9 @@ SECTIONS
|
||||||
KEEP(*(.FlashConfig)) /* Flash Configuration Field (FCF) */
|
KEEP(*(.FlashConfig)) /* Flash Configuration Field (FCF) */
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
} > m_flash_config
|
} > m_flash_config
|
||||||
|
#else
|
||||||
|
} > m_text
|
||||||
|
#endif
|
||||||
.text :
|
.text :
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue