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
216216 __sgstubs_end = .;
217217 } > NSC_FLASH
218218
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;
221221
222222 /* By IDAU, 0~0x4000 is secure. NSC can only locate in 0x4000~0x10000000. */
223223 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)) {
9292 if (! isdefinedsymbol(NU_TZ_NSC_START)) {
9393 define symbol NU_TZ_NSC_START = MBED_APP_START + MBED_APP_SIZE - 0x2000 - NU_TZ_NSC_SIZE;
9494 }
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;
9797
9898 /*-Specials-*/
9999 define symbol __ICFEDIT_intvec_start__ = MBED_APP_START;
Original file line number Diff line number Diff line change 2424#define NU_TZ_SECURE_FLASH_SIZE NU_ROM_SIZE_S
2525#define NU_TZ_SECURE_SRAM_SIZE NU_RAM_SIZE_S
2626
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. */
2930extern int Load$$LR$$LR_IROM_NSC$$Base ;
3031extern int Load$$LR$$LR_IROM_NSC$$Length ;
31-
3232#define NU_TZ_NSC_REGION_START ((uint32_t) &Load$$LR$$LR_IROM_NSC$$Base)
3333#define NU_TZ_NSC_REGION_SIZE ((uint32_t) &Load$$LR$$LR_IROM_NSC$$Length)
3434
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-
5335/* Check relevant macros have been defined */
5436#if (! defined(NU_TZ_SECURE_FLASH_SIZE ))
5537#error ("NU_TZ_SECURE_FLASH_SIZE not defined")
You can’t perform that action at this time.
0 commit comments