File tree Expand file tree Collapse file tree 14 files changed +141
-37
lines changed
TARGET_NU_XRAM_UNSUPPORTED
TARGET_NU_XRAM_UNSUPPORTED
TARGET_NU_XRAM_UNSUPPORTED
TARGET_NU_XRAM_UNSUPPORTED Expand file tree Collapse file tree 14 files changed +141
-37
lines changed Original file line number Diff line number Diff line change
1
+ #! armcc -E
1
2
2
- LR_IROM1 0x00000000 {
3
- ER_IROM1 0x00000000 { ; load address = execution address
3
+ #if !defined(MBED_APP_START)
4
+ #define MBED_APP_START 0x00000000
5
+ #endif
6
+
7
+ #if !defined(MBED_APP_SIZE)
8
+ #define MBED_APP_SIZE 0x00040000
9
+ #endif
10
+
11
+ LR_IROM1 MBED_APP_START {
12
+ ER_IROM1 MBED_APP_START { ; load address = execution address
4
13
*(RESET, +First)
5
14
*(InRoot$$Sections)
6
15
.ANY (+RO)
@@ -23,6 +32,6 @@ LR_IROM1 0x00000000 {
23
32
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (0x20000000 + 0x8000 - AlignExpr(ImageLimit(RW_IRAM1), 16)) {
24
33
}
25
34
}
26
- ScatterAssert(LoadLimit(LR_IROM1) <= 0x00040000 ) ; 256 KB APROM
35
+ ScatterAssert(LoadLimit(LR_IROM1) <= MBED_APP_SIZE ) ; 256 KB APROM
27
36
ScatterAssert(ImageLimit(ARM_LIB_HEAP) <= 0x20008000) ; 32 KB SRAM
28
37
Original file line number Diff line number Diff line change
1
+ #! armcc -E
1
2
2
- LR_IROM1 0x00000000 {
3
- ER_IROM1 0x00000000 { ; load address = execution address
3
+ #if !defined(MBED_APP_START)
4
+ #define MBED_APP_START 0x00000000
5
+ #endif
6
+
7
+ #if !defined(MBED_APP_SIZE)
8
+ #define MBED_APP_SIZE 0x00040000
9
+ #endif
10
+
11
+ LR_IROM1 MBED_APP_START {
12
+ ER_IROM1 MBED_APP_START { ; load address = execution address
4
13
*(RESET, +First)
5
14
*(InRoot$$Sections)
6
15
.ANY (+RO)
@@ -23,6 +32,6 @@ LR_IROM1 0x00000000 {
23
32
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (0x20000000 + 0x8000 - AlignExpr(ImageLimit(RW_IRAM1), 16)) {
24
33
}
25
34
}
26
- ScatterAssert(LoadLimit(LR_IROM1) <= 0x00040000 ) ; 256 KB APROM
35
+ ScatterAssert(LoadLimit(LR_IROM1) <= MBED_APP_SIZE ) ; 256 KB APROM
27
36
ScatterAssert(ImageLimit(ARM_LIB_HEAP) <= 0x20008000) ; 32 KB SRAM
28
37
Original file line number Diff line number Diff line change 2
2
* Nuvoton M453 GCC linker script file
3
3
*/
4
4
5
+ #if !defined(MBED_APP_START)
6
+ #define MBED_APP_START 0x00000000
7
+ #endif
8
+
9
+ #if !defined(MBED_APP_SIZE)
10
+ #define MBED_APP_SIZE 0x00040000
11
+ #endif
12
+
5
13
StackSize = 0x800;
6
14
7
15
MEMORY
8
16
{
9
- VECTORS (rx) : ORIGIN = 0x00000000 , LENGTH = 0x00000400
10
- FLASH (rx) : ORIGIN = 0x00000400 , LENGTH = 0x00040000 - 0x00000400
17
+ VECTORS (rx) : ORIGIN = MBED_APP_START , LENGTH = 0x00000400
18
+ FLASH (rx) : ORIGIN = MBED_APP_START + 0x400 , LENGTH = MBED_APP_SIZE - 0x00000400
11
19
RAM_INTERN (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000 - 0x00000000
12
20
}
13
21
Original file line number Diff line number Diff line change 1
1
/*###ICF### Section handled by ICF editor, don't touch! ****/
2
2
/*-Editor annotation file-*/
3
3
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4
+ if (!isdefinedsymbol(MBED_APP_START)) { define symbol MBED_APP_START = 0x00000000; }
5
+ if (!isdefinedsymbol(MBED_APP_SIZE)) { define symbol MBED_APP_SIZE = 0x00040000; }
4
6
/*-Specials-*/
5
- define symbol __ICFEDIT_intvec_start__ = 0x00000000 ;
7
+ define symbol __ICFEDIT_intvec_start__ = MBED_APP_START ;
6
8
/*-Memory Regions-*/
7
- define symbol __ICFEDIT_region_ROM_start__ = 0x00000000 ;
8
- define symbol __ICFEDIT_region_ROM_end__ = 0x00040000 ;
9
+ define symbol __ICFEDIT_region_ROM_start__ = MBED_APP_START ;
10
+ define symbol __ICFEDIT_region_ROM_end__ = MBED_APP_START + MBED_APP_SIZE - 1 ;
9
11
define symbol __ICFEDIT_region_IRAM_start__ = 0x20000000;
10
12
define symbol __ICFEDIT_region_IRAM_end__ = 0x20008000;
11
13
/*-Sizes-*/
Original file line number Diff line number Diff line change 32
32
# define NVIC_RAM_VECTOR_ADDRESS ((uint32_t) &__start_vector_table__)
33
33
#endif
34
34
35
-
36
- #define NVIC_FLASH_VECTOR_ADDRESS 0
35
+ #if defined(__CC_ARM )
36
+ extern uint32_t Load$$LR$$LR_IROM1$$Base [];
37
+ #define NVIC_FLASH_VECTOR_ADDRESS ((uint32_t)Load$$LR$$LR_IROM1$$Base)
38
+ #elif defined(__ICCARM__ )
39
+ #pragma section=".intvec"
40
+ #define NVIC_FLASH_VECTOR_ADDRESS ((uint32_t)__section_begin(".intvec"))
41
+ #elif defined(__GNUC__ )
42
+ extern uint32_t __vector_table ;
43
+ #define NVIC_FLASH_VECTOR_ADDRESS ((uint32_t)&__vector_table)
44
+ #else
45
+ #error "Flash vector address not set for this toolchain"
46
+ #endif
37
47
38
48
#ifdef __cplusplus
39
49
extern "C" {
Original file line number Diff line number Diff line change
1
+ #! armcc -E
1
2
2
- LR_IROM1 0x00000000 {
3
- ER_IROM1 0x00000000 { ; load address = execution address
3
+ #if !defined(MBED_APP_START)
4
+ #define MBED_APP_START 0x00000000
5
+ #endif
6
+
7
+ #if !defined(MBED_APP_SIZE)
8
+ #define MBED_APP_SIZE 0x00080000
9
+ #endif
10
+
11
+ LR_IROM1 MBED_APP_START {
12
+ ER_IROM1 MBED_APP_START { ; load address = execution address
4
13
*(RESET, +First)
5
14
*(InRoot$$Sections)
6
15
.ANY (+RO)
@@ -29,7 +38,7 @@ LR_IROM1 0x00000000 {
29
38
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (0x60000000 + 0x100000 - AlignExpr(ImageLimit(ER_XRAM1), 16)) {
30
39
}
31
40
}
32
- ScatterAssert(LoadLimit(LR_IROM1) <= 0x00080000 ) ; 512 KB APROM
41
+ ScatterAssert(LoadLimit(LR_IROM1) <= MBED_APP_SIZE ) ; 512 KB APROM
33
42
ScatterAssert(ImageLimit(RW_IRAM1) <= 0x20010000) ; 64 KB SRAM (internal)
34
43
ScatterAssert(ImageLimit(ARM_LIB_HEAP) <= 0x60100000) ; 1 MB SRAM (external)
35
44
Original file line number Diff line number Diff line change
1
+ #! armcc -E
1
2
2
- LR_IROM1 0x00000000 {
3
- ER_IROM1 0x00000000 { ; load address = execution address
3
+ #if !defined(MBED_APP_START)
4
+ #define MBED_APP_START 0x00000000
5
+ #endif
6
+
7
+ #if !defined(MBED_APP_SIZE)
8
+ #define MBED_APP_SIZE 0x00080000
9
+ #endif
10
+
11
+ LR_IROM1 MBED_APP_START {
12
+ ER_IROM1 MBED_APP_START { ; load address = execution address
4
13
*(RESET, +First)
5
14
*(InRoot$$Sections)
6
15
.ANY (+RO)
@@ -24,6 +33,6 @@ LR_IROM1 0x00000000 {
24
33
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (0x20000000 + 0x10000 - AlignExpr(ImageLimit(RW_IRAM1), 16)) {
25
34
}
26
35
}
27
- ScatterAssert(LoadLimit(LR_IROM1) <= 0x00080000 ) ; 512 KB APROM
36
+ ScatterAssert(LoadLimit(LR_IROM1) <= MBED_APP_SIZE ) ; 512 KB APROM
28
37
ScatterAssert(ImageLimit(RW_IRAM1) <= 0x20010000) ; 64 KB SRAM (internal)
29
38
Original file line number Diff line number Diff line change
1
+ #! armcc -E
1
2
2
- LR_IROM1 0x00000000 {
3
- ER_IROM1 0x00000000 { ; load address = execution address
3
+ #if !defined(MBED_APP_START)
4
+ #define MBED_APP_START 0x00000000
5
+ #endif
6
+
7
+ #if !defined(MBED_APP_SIZE)
8
+ #define MBED_APP_SIZE 0x00080000
9
+ #endif
10
+
11
+ LR_IROM1 MBED_APP_START {
12
+ ER_IROM1 MBED_APP_START { ; load address = execution address
4
13
*(RESET, +First)
5
14
*(InRoot$$Sections)
6
15
.ANY (+RO)
@@ -31,7 +40,7 @@ LR_IROM1 0x00000000 {
31
40
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (0x60000000 + 0x100000 - AlignExpr(ImageLimit(ER_XRAM1), 16)) {
32
41
}
33
42
}
34
- ScatterAssert(LoadLimit(LR_IROM1) <= 0x00080000 ) ; 512 KB APROM
43
+ ScatterAssert(LoadLimit(LR_IROM1) <= MBED_APP_SIZE ) ; 512 KB APROM
35
44
ScatterAssert(ImageLimit(RW_IRAM1) <= 0x20010000) ; 64 KB SRAM (internal)
36
45
ScatterAssert(ImageLimit(ARM_LIB_HEAP) <= 0x60100000) ; 1 MB SRAM (external)
37
46
Original file line number Diff line number Diff line change
1
+ #! armcc -E
1
2
2
- LR_IROM1 0x00000000 {
3
- ER_IROM1 0x00000000 { ; load address = execution address
3
+ #if !defined(MBED_APP_START)
4
+ #define MBED_APP_START 0x00000000
5
+ #endif
6
+
7
+ #if !defined(MBED_APP_SIZE)
8
+ #define MBED_APP_SIZE 0x00080000
9
+ #endif
10
+
11
+ LR_IROM1 MBED_APP_START {
12
+ ER_IROM1 MBED_APP_START { ; load address = execution address
4
13
*(RESET, +First)
5
14
*(InRoot$$Sections)
6
15
.ANY (+RO)
@@ -24,6 +33,6 @@ LR_IROM1 0x00000000 {
24
33
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (0x20000000 + 0x10000 - AlignExpr(ImageLimit(RW_IRAM1), 16)) {
25
34
}
26
35
}
27
- ScatterAssert(LoadLimit(LR_IROM1) <= 0x00080000 ) ; 512 KB APROM
36
+ ScatterAssert(LoadLimit(LR_IROM1) <= MBED_APP_SIZE ) ; 512 KB APROM
28
37
ScatterAssert(ImageLimit(RW_IRAM1) <= 0x20010000) ; 64 KB SRAM (internal)
29
38
Original file line number Diff line number Diff line change 2
2
* Nuvoton NUC472 GCC linker script file
3
3
*/
4
4
5
+ #if !defined(MBED_APP_START)
6
+ #define MBED_APP_START 0x00000000
7
+ #endif
8
+
9
+ #if !defined(MBED_APP_SIZE)
10
+ #define MBED_APP_SIZE 0x00080000
11
+ #endif
12
+
5
13
StackSize = 0x800;
6
14
7
15
MEMORY
8
16
{
9
17
10
- VECTORS (rx) : ORIGIN = 0x00000000 , LENGTH = 0x00000400
11
- FLASH (rx) : ORIGIN = 0x00000400 , LENGTH = 0x00080000 - 0x00000400
18
+ VECTORS (rx) : ORIGIN = MBED_APP_START , LENGTH = 0x00000400
19
+ FLASH (rx) : ORIGIN = MBED_APP_START + 0x400 , LENGTH = MBED_APP_SIZE - 0x00000400
12
20
RAM_INTERN (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00010000 - 0x00000000
13
21
RAM_EXTERN (rwx) : ORIGIN = 0x60000000, LENGTH = 0x00100000
14
22
}
Original file line number Diff line number Diff line change 2
2
* Nuvoton NUC472 GCC linker script file
3
3
*/
4
4
5
+ #if !defined(MBED_APP_START)
6
+ #define MBED_APP_START 0x00000000
7
+ #endif
8
+
9
+ #if !defined(MBED_APP_SIZE)
10
+ #define MBED_APP_SIZE 0x00080000
11
+ #endif
12
+
5
13
StackSize = 0x800;
6
14
7
15
MEMORY
8
16
{
9
17
10
- VECTORS (rx) : ORIGIN = 0x00000000 , LENGTH = 0x00000400
11
- FLASH (rx) : ORIGIN = 0x00000400 , LENGTH = 0x00080000 - 0x00000400
18
+ VECTORS (rx) : ORIGIN = MBED_APP_START , LENGTH = 0x00000400
19
+ FLASH (rx) : ORIGIN = MBED_APP_START + 0x400 , LENGTH = MBED_APP_SIZE - 0x00000400
12
20
RAM_INTERN (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00010000 - 0x00000000
13
21
}
14
22
Original file line number Diff line number Diff line change 1
1
/*###ICF### Section handled by ICF editor, don't touch! ****/
2
2
/*-Editor annotation file-*/
3
3
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4
+ if (!isdefinedsymbol(MBED_APP_START)) { define symbol MBED_APP_START = 0x00000000; }
5
+ if (!isdefinedsymbol(MBED_APP_SIZE)) { define symbol MBED_APP_SIZE = 0x00080000; }
4
6
/*-Specials-*/
5
- define symbol __ICFEDIT_intvec_start__ = 0x00000000 ;
7
+ define symbol __ICFEDIT_intvec_start__ = MBED_APP_START ;
6
8
/*-Memory Regions-*/
7
- define symbol __ICFEDIT_region_ROM_start__ = 0x00000000 ;
8
- define symbol __ICFEDIT_region_ROM_end__ = 0x00080000 ;
9
+ define symbol __ICFEDIT_region_ROM_start__ = MBED_APP_START ;
10
+ define symbol __ICFEDIT_region_ROM_end__ = MBED_APP_START + MBED_APP_SIZE - 1 ;
9
11
define symbol __ICFEDIT_region_IRAM_start__ = 0x20000000;
10
12
define symbol __ICFEDIT_region_IRAM_end__ = 0x20010000;
11
13
define symbol __ICFEDIT_region_XRAM_start__ = 0x60000000;
Original file line number Diff line number Diff line change 1
1
/*###ICF### Section handled by ICF editor, don't touch! ****/
2
2
/*-Editor annotation file-*/
3
3
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4
+ if (!isdefinedsymbol(MBED_APP_START)) { define symbol MBED_APP_START = 0x00000000; }
5
+ if (!isdefinedsymbol(MBED_APP_SIZE)) { define symbol MBED_APP_SIZE = 0x00080000; }
4
6
/*-Specials-*/
5
- define symbol __ICFEDIT_intvec_start__ = 0x00000000 ;
7
+ define symbol __ICFEDIT_intvec_start__ = MBED_APP_START ;
6
8
/*-Memory Regions-*/
7
- define symbol __ICFEDIT_region_ROM_start__ = 0x00000000 ;
8
- define symbol __ICFEDIT_region_ROM_end__ = 0x00080000 ;
9
+ define symbol __ICFEDIT_region_ROM_start__ = MBED_APP_START ;
10
+ define symbol __ICFEDIT_region_ROM_end__ = MBED_APP_START + MBED_APP_SIZE - 1 ;
9
11
define symbol __ICFEDIT_region_IRAM_start__ = 0x20000000;
10
12
define symbol __ICFEDIT_region_IRAM_end__ = 0x20010000;
11
13
/*-Sizes-*/
Original file line number Diff line number Diff line change 32
32
# define NVIC_RAM_VECTOR_ADDRESS ((uint32_t) &__start_vector_table__)
33
33
#endif
34
34
35
-
36
- #define NVIC_FLASH_VECTOR_ADDRESS 0
35
+ #if defined(__CC_ARM )
36
+ extern uint32_t Load$$LR$$LR_IROM1$$Base [];
37
+ #define NVIC_FLASH_VECTOR_ADDRESS ((uint32_t)Load$$LR$$LR_IROM1$$Base)
38
+ #elif defined(__ICCARM__ )
39
+ #pragma section=".intvec"
40
+ #define NVIC_FLASH_VECTOR_ADDRESS ((uint32_t)__section_begin(".intvec"))
41
+ #elif defined(__GNUC__ )
42
+ extern uint32_t __vector_table ;
43
+ #define NVIC_FLASH_VECTOR_ADDRESS ((uint32_t)&__vector_table)
44
+ #else
45
+ #error "Flash vector address not set for this toolchain"
46
+ #endif
37
47
38
48
#ifdef __cplusplus
39
49
extern "C" {
You can’t perform that action at this time.
0 commit comments