File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
core/mbed-rtos/rtx/TARGET_CORTEX_M Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -433,7 +433,11 @@ void set_main_stack(void) {
433
433
#if defined (__CC_ARM )
434
434
435
435
#ifdef __MICROLIB
436
+
437
+ int main (void );
436
438
void _main_init (void ) __attribute__((section (".ARM.Collect$$$$000000FF" )));
439
+ void $Super$$__cpp_initialize__aeabi_ (void );
440
+
437
441
void _main_init (void ) {
438
442
osKernelInitialize ();
439
443
#ifdef __MBED_CMSIS_RTOS_CM
@@ -443,6 +447,19 @@ void _main_init (void) {
443
447
osKernelStart ();
444
448
for (;;);
445
449
}
450
+
451
+ void $Sub$$__cpp_initialize__aeabi_ (void )
452
+ {
453
+ // this should invoke C++ initializers prior _main_init, we keep this empty and
454
+ // invoke them after _main_init (=starts RTX kernel)
455
+ }
456
+
457
+ void pre_main ()
458
+ {
459
+ $Super$$__cpp_initialize__aeabi_ ();
460
+ main ();
461
+ }
462
+
446
463
#else
447
464
448
465
void * armcc_heap_base ;
You can’t perform that action at this time.
0 commit comments