File tree Expand file tree Collapse file tree 3 files changed +7
-25
lines changed
targets/TARGET_NUVOTON/TARGET_M2351/device Expand file tree Collapse file tree 3 files changed +7
-25
lines changed Original file line number Diff line number Diff line change @@ -216,8 +216,8 @@ SECTIONS
216
216
__sgstubs_end = .;
217
217
} > NSC_FLASH
218
218
219
- __nu_tz_nsc_start = NU_TZ_NSC_START;
220
- __nu_tz_nsc_size = NU_TZ_NSC_SIZE;
219
+ Load$$LR$$LR_IROM_NSC$$Base = NU_TZ_NSC_START;
220
+ Load$$LR$$LR_IROM_NSC$$Length = NU_TZ_NSC_SIZE;
221
221
222
222
/* By IDAU, 0~0x4000 is secure. NSC can only locate in 0x4000~0x10000000. */
223
223
ASSERT (__sgstubs_start >= 0x4000, "By IDAU, 0~0x4000 is secure. NSC can only locate in 0x4000~0x10000000.")
Original file line number Diff line number Diff line change @@ -92,8 +92,8 @@ if (isdefinedsymbol(DOMAIN_NS)) {
92
92
if (! isdefinedsymbol(NU_TZ_NSC_START)) {
93
93
define symbol NU_TZ_NSC_START = MBED_APP_START + MBED_APP_SIZE - 0x2000 - NU_TZ_NSC_SIZE;
94
94
}
95
- define exported symbol __NU_TZ_NSC_start__ = NU_TZ_NSC_START;
96
- define exported symbol __NU_TZ_NSC_size__ = NU_TZ_NSC_SIZE;
95
+ define exported symbol Load$$LR$$LR_IROM_NSC$$Base = NU_TZ_NSC_START;
96
+ define exported symbol Load$$LR$$LR_IROM_NSC$$Length = NU_TZ_NSC_SIZE;
97
97
98
98
/*-Specials-*/
99
99
define symbol __ICFEDIT_intvec_start__ = MBED_APP_START;
Original file line number Diff line number Diff line change 24
24
#define NU_TZ_SECURE_FLASH_SIZE NU_ROM_SIZE_S
25
25
#define NU_TZ_SECURE_SRAM_SIZE NU_RAM_SIZE_S
26
26
27
- #if defined(__CC_ARM ) || (defined(__ARMCC_VERSION ) && (__ARMCC_VERSION >= 6010050 ))
28
-
27
+ /* We make exported symbols consistent across toolchains. This helps for porting e.g. TFM.
28
+ * Because Keil scatter file doesn't support custom exported symbols, other toolchains's
29
+ * linker files must export the same symbol names as region names in Keil scatter file. */
29
30
extern int Load$$LR$$LR_IROM_NSC$$Base ;
30
31
extern int Load$$LR$$LR_IROM_NSC$$Length ;
31
-
32
32
#define NU_TZ_NSC_REGION_START ((uint32_t) &Load$$LR$$LR_IROM_NSC$$Base)
33
33
#define NU_TZ_NSC_REGION_SIZE ((uint32_t) &Load$$LR$$LR_IROM_NSC$$Length)
34
34
35
- #elif defined(__ICCARM__ )
36
-
37
- extern int __NU_TZ_NSC_start__ ;
38
- extern int __NU_TZ_NSC_size__ ;
39
-
40
- #define NU_TZ_NSC_REGION_START ((uint32_t) &__NU_TZ_NSC_start__)
41
- #define NU_TZ_NSC_REGION_SIZE ((uint32_t) &__NU_TZ_NSC_size__)
42
-
43
- #elif defined(__GNUC__ )
44
-
45
- extern int __nu_tz_nsc_start ;
46
- extern int __nu_tz_nsc_size ;
47
-
48
- #define NU_TZ_NSC_REGION_START ((uint32_t) &__nu_tz_nsc_start)
49
- #define NU_TZ_NSC_REGION_SIZE ((uint32_t) &__nu_tz_nsc_size)
50
-
51
- #endif
52
-
53
35
/* Check relevant macros have been defined */
54
36
#if (! defined(NU_TZ_SECURE_FLASH_SIZE ))
55
37
#error ("NU_TZ_SECURE_FLASH_SIZE not defined")
You can’t perform that action at this time.
0 commit comments