fix incorrect condition

pull/13832/head
Moshe Shahar 2020-11-12 17:20:08 +02:00
parent 157788e6a0
commit ca39f9588a
4 changed files with 9 additions and 8 deletions

View File

@ -65,7 +65,7 @@
#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_SIZE == 0 #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
@ -111,7 +111,7 @@ 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_SIZE == 0 #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)
} }

View File

@ -74,7 +74,7 @@ M_CRASH_DATA_RAM_SIZE = 0x100;
/* Specify the memory areas */ /* Specify the memory areas */
MEMORY MEMORY
{ {
#if MBED_APP_SIZE == 0 #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
@ -95,7 +95,7 @@ SECTIONS
. = ALIGN(8); . = ALIGN(8);
KEEP(*(.isr_vector)) /* Startup code */ KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(8); . = ALIGN(8);
#if MBED_APP_SIZE == 0 #if MBED_APP_START == 0
} > m_interrupts } > m_interrupts
.flash_config : .flash_config :

View File

@ -57,6 +57,7 @@
#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 #elif MBED_APP_START > 0 && MBED_APP_START < 0x410
#error MBED_APP_START too small and will overwrite interrupts and flash config #error MBED_APP_START too small and will overwrite interrupts and flash config
@ -77,7 +78,7 @@
#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_SIZE == 0 #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
@ -115,7 +116,7 @@ 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_SIZE == 0 #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)
} }

View File

@ -76,7 +76,7 @@ M_CRASH_DATA_RAM_SIZE = 0x100;
/* Specify the memory areas */ /* Specify the memory areas */
MEMORY MEMORY
{ {
#if MBED_APP_SIZE == 0 #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
@ -97,7 +97,7 @@ SECTIONS
. = ALIGN(8); . = ALIGN(8);
KEEP(*(.isr_vector)) /* Startup code */ KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(8); . = ALIGN(8);
#if MBED_APP_SIZE == 0 #if MBED_APP_START == 0
} > m_interrupts } > m_interrupts
.flash_config : .flash_config :