File tree Expand file tree Collapse file tree 4 files changed +47
-3
lines changed
targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS Expand file tree Collapse file tree 4 files changed +47
-3
lines changed Original file line number Diff line number Diff line change 54
54
55
55
#if !defined(MBED_APP_START)
56
56
#define MBED_APP_START 0
57
+ #elif MBED_APP_START > 0 && MBED_APP_START < 0x410
58
+ #error MBED_APP_START too small and will overwrite interrupts and flash config
57
59
#endif
58
60
59
61
#if !defined(MBED_APP_SIZE)
63
65
#define m_interrupts_start MBED_APP_START
64
66
#define m_interrupts_size 0x00000400
65
67
68
+ #if MBED_APP_START == 0
69
+
66
70
#define m_flash_config_start MBED_APP_START + 0x400
67
71
#define m_flash_config_size 0x00000010
68
72
69
73
#define m_text_start MBED_APP_START + 0x410
70
74
#define m_text_size MBED_APP_SIZE - 0x410
71
75
76
+ #else
77
+
78
+ #define m_text_start MBED_APP_START + 0x400
79
+ #define m_text_size MBED_APP_SIZE - 0x400
80
+
81
+ #endif
82
+
72
83
#define m_interrupts_ram_start 0x1FFF0000
73
84
#define m_interrupts_ram_size __ram_vector_table_size__
74
85
@@ -100,9 +111,11 @@ LR_IROM1 m_interrupts_start m_text_start+m_text_size-m_interrupts_start { ; lo
100
111
VECTOR_ROM m_interrupts_start m_interrupts_size { ; load address = execution address
101
112
* (RESET,+FIRST)
102
113
}
114
+ #if MBED_APP_START == 0
103
115
ER_m_flash_config m_flash_config_start FIXED m_flash_config_size { ; load address = execution address
104
116
* (FlashConfig)
105
117
}
118
+ #endif
106
119
ER_IROM1 m_text_start m_text_size { ; load address = execution address
107
120
* (InRoot$$Sections)
108
121
.ANY (+RO)
Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ __stack_size__ = MBED_CONF_TARGET_BOOT_STACK_SIZE;
59
59
60
60
#if !defined(MBED_APP_START)
61
61
#define MBED_APP_START 0
62
+ #elif MBED_APP_START > 0 && MBED_APP_START < 0x410
63
+ #error MBED_APP_START too small and will overwrite interrupts and flash config
62
64
#endif
63
65
64
66
#if !defined(MBED_APP_SIZE)
@@ -72,9 +74,13 @@ M_CRASH_DATA_RAM_SIZE = 0x100;
72
74
/* Specify the memory areas */
73
75
MEMORY
74
76
{
77
+ #if MBED_APP_START == 0
75
78
m_interrupts (RX) : ORIGIN = MBED_APP_START, LENGTH = 0x400
76
79
m_flash_config (RX) : ORIGIN = MBED_APP_START + 0x400, LENGTH = 0x10
77
80
m_text (RX) : ORIGIN = MBED_APP_START + 0x410, LENGTH = MBED_APP_SIZE - 0x410
81
+ #else
82
+ m_text (RX) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
83
+ #endif
78
84
m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000
79
85
m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00030000
80
86
}
@@ -89,6 +95,7 @@ SECTIONS
89
95
. = ALIGN (8);
90
96
KEEP(*(.isr_vector)) /* Startup code */
91
97
. = ALIGN (8);
98
+ #if MBED_APP_START == 0
92
99
} > m_interrupts
93
100
94
101
.flash_config :
@@ -97,8 +104,9 @@ SECTIONS
97
104
KEEP(*(.FlashConfig)) /* Flash Configuration Field (FCF) */
98
105
. = ALIGN (8);
99
106
} > m_flash_config
100
-
101
- /* The program code and other data goes into internal flash */
107
+ #else
108
+ } > m_text
109
+ #endif
102
110
.text :
103
111
{
104
112
. = ALIGN (8);
Original file line number Diff line number Diff line change 57
57
#endif
58
58
59
59
#if !defined(MBED_APP_START)
60
+
60
61
#define MBED_APP_START 0
62
+ #elif MBED_APP_START > 0 && MBED_APP_START < 0x410
63
+ #error MBED_APP_START too small and will overwrite interrupts and flash config
61
64
#endif
62
65
63
66
#if !defined(MBED_APP_SIZE)
75
78
#define m_interrupts_start MBED_APP_START
76
79
#define m_interrupts_size 0x00000400
77
80
81
+ #if MBED_APP_START == 0
82
+
78
83
#define m_flash_config_start MBED_APP_START + 0x400
79
84
#define m_flash_config_size 0x00000010
80
85
81
86
#define m_text_start MBED_APP_START + 0x410
82
87
#define m_text_size MBED_APP_SIZE - 0x410
83
88
89
+ #else
90
+
91
+ #define m_text_start MBED_APP_START + 0x400
92
+ #define m_text_size MBED_APP_SIZE - 0x400
93
+
94
+ #endif
95
+
84
96
#define m_interrupts_ram_start 0x1FFF0000
85
97
#define m_interrupts_ram_size __ram_vector_table_size__
86
98
@@ -104,9 +116,11 @@ LR_IROM1 m_interrupts_start m_text_start+m_text_size-m_interrupts_start { ; load
104
116
VECTOR_ROM m_interrupts_start m_interrupts_size { ; load address = execution address
105
117
* (RESET,+FIRST)
106
118
}
119
+ #if MBED_APP_START == 0
107
120
ER_m_flash_config m_flash_config_start FIXED m_flash_config_size { ; load address = execution address
108
121
* (FlashConfig)
109
122
}
123
+ #endif
110
124
ER_IROM1 m_text_start m_text_size { ; load address = execution address
111
125
* (InRoot$$Sections)
112
126
.ANY (+RO)
Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ __ram_vector_table__ = 1;
55
55
56
56
#if !defined(MBED_APP_START)
57
57
#define MBED_APP_START 0
58
+ #elif MBED_APP_START > 0 && MBED_APP_START < 0x410
59
+ #error MBED_APP_START too small and will overwrite interrupts and flash config
58
60
#endif
59
61
60
62
#if !defined(MBED_APP_SIZE)
@@ -74,9 +76,13 @@ M_CRASH_DATA_RAM_SIZE = 0x100;
74
76
/* Specify the memory areas */
75
77
MEMORY
76
78
{
79
+ #if MBED_APP_START == 0
77
80
m_interrupts (RX) : ORIGIN = MBED_APP_START, LENGTH = 0x400
78
81
m_flash_config (RX) : ORIGIN = MBED_APP_START + 0x400, LENGTH = 0x10
79
82
m_text (RX) : ORIGIN = MBED_APP_START + 0x410, LENGTH = MBED_APP_SIZE - 0x410
83
+ #else
84
+ m_text (RX) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
85
+ #endif
80
86
m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000
81
87
m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00030000
82
88
}
@@ -91,6 +97,7 @@ SECTIONS
91
97
. = ALIGN (8);
92
98
KEEP(*(.isr_vector)) /* Startup code */
93
99
. = ALIGN (8);
100
+ #if MBED_APP_START == 0
94
101
} > m_interrupts
95
102
96
103
.flash_config :
@@ -99,7 +106,9 @@ SECTIONS
99
106
KEEP(*(.FlashConfig)) /* Flash Configuration Field (FCF) */
100
107
. = ALIGN (8);
101
108
} > m_flash_config
102
-
109
+ #else
110
+ } > m_text
111
+ #endif
103
112
.text :
104
113
{
105
114
You can’t perform that action at this time.
0 commit comments