File tree Expand file tree Collapse file tree 2 files changed +6
-36
lines changed
targets/TARGET_NUVOTON/TARGET_NANO100
TARGET_NUMAKER_PFM_NANO130 Expand file tree Collapse file tree 2 files changed +6
-36
lines changed Original file line number Diff line number Diff line change 16
16
17
17
#include "cmsis.h"
18
18
19
- // NOTE: Ensurce mbed_sdk_init() will get called before C++ global object constructor.
20
- #if defined(__CC_ARM ) || defined(__GNUC__ )
21
- void mbed_sdk_init_forced (void ) __attribute__((constructor (101 )));
22
- #elif defined(__ICCARM__ )
23
- // TODO: How to achieve it in IAR?
24
- #endif
25
-
26
-
27
19
void mbed_sdk_init (void )
28
20
{
29
21
// NOTE: Support singleton semantics to be called from other init functions
@@ -70,8 +62,3 @@ void mbed_sdk_init(void)
70
62
/* Lock protected registers */
71
63
SYS_LockReg ();
72
64
}
73
-
74
- void mbed_sdk_init_forced (void )
75
- {
76
- mbed_sdk_init ();
77
- }
Original file line number Diff line number Diff line change @@ -61,12 +61,11 @@ extern uint32_t __bss_start__;
61
61
extern uint32_t __bss_end__ ;
62
62
63
63
extern void uvisor_init (void );
64
- //#if defined(TOOLCHAIN_GCC_ARM)
65
- //extern void _start(void);
66
- //#endif
67
- extern void software_init_hook (void ) __attribute__((weak ));
68
- extern void __libc_init_array (void );
69
- extern int main (void );
64
+ #if defined(TOOLCHAIN_GCC_ARM )
65
+ extern void _start (void );
66
+ #else
67
+ #error ("For GCC toolchain, only support GNU ARM Embedded")
68
+ #endif
70
69
#endif
71
70
72
71
/* Default empty handler */
@@ -203,11 +202,6 @@ void Reset_Handler(void)
203
202
/* Enable register write-protection function */
204
203
SYS_LockReg ();
205
204
206
- /**
207
- * Because EBI (external SRAM) init is done in SystemInit(), SystemInit() must be called at the very start.
208
- */
209
- //SystemInit();
210
-
211
205
#if defined(__CC_ARM )
212
206
__main ();
213
207
@@ -235,19 +229,8 @@ void Reset_Handler(void)
235
229
}
236
230
}
237
231
238
- //uvisor_init ();
232
+ _start ();
239
233
240
- if (software_init_hook ) {
241
- /**
242
- * Give control to the RTOS via software_init_hook() which will also call __libc_init_array().
243
- * Assume software_init_hook() is defined in libraries/rtos/rtx/TARGET_CORTEX_M/RTX_CM_lib.h.
244
- */
245
- software_init_hook ();
246
- }
247
- else {
248
- __libc_init_array ();
249
- main ();
250
- }
251
234
#endif
252
235
253
236
/* Infinite loop */
You can’t perform that action at this time.
0 commit comments