File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
libraries/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 @@ -448,7 +448,11 @@ void set_main_stack(void) {
448
448
#if defined (__CC_ARM )
449
449
450
450
#ifdef __MICROLIB
451
+
452
+ int main (void );
451
453
void _main_init (void ) __attribute__((section (".ARM.Collect$$$$000000FF" )));
454
+ void $Super$$__cpp_initialize__aeabi_ (void );
455
+
452
456
void _main_init (void ) {
453
457
osKernelInitialize ();
454
458
#ifdef __MBED_CMSIS_RTOS_CM
@@ -458,6 +462,19 @@ void _main_init (void) {
458
462
osKernelStart ();
459
463
for (;;);
460
464
}
465
+
466
+ void $Sub$$__cpp_initialize__aeabi_ (void )
467
+ {
468
+ // this should invoke C++ initializers prior _main_init, we keep this empty and
469
+ // invoke them after _main_init (=starts RTX kernel)
470
+ }
471
+
472
+ void pre_main ()
473
+ {
474
+ $Super$$__cpp_initialize__aeabi_ ();
475
+ main ();
476
+ }
477
+
461
478
#else
462
479
463
480
void * armcc_heap_base ;
You can’t perform that action at this time.
0 commit comments