void startup_entry( const ICall_RemoteTaskArg *arg0, void *arg1 ) { extern int stack_main( void *arg ); #if defined(__IAR_SYSTEMS_ICC__) extern void __iar_data_init3(void); __iar_data_init3(); #elif defined(__TI_COMPILER_VERSION__) extern void __TI_auto_init(void); __TI_auto_init(); #else #error "Error: Must specify a compiler!" #endif ICall_dispatcher = arg0->dispatch; ICall_enterCriticalSection = arg0->entercs; ICall_leaveCriticalSection = arg0->leavecs; #if defined( FLASH_ROM_BUILD ) // initialize the Common ROM CommonROM_Init(); // initialize the BLE Controller ROM ROM_Init(); #endif // FLASH_ROM_BUILD stack_main( arg1 ); }
void __iar_program_start(void) { /* the calls below are normally made in IAR cstartup */ __iar_init_core(); __iar_init_vfp(); /* the calls below are normally made in IAR cmain * * The function "__low_level_init" is a user overrideable hook * that does nothing by default. Returning zero means that * ram initialization should be skipped. Skipping ram initialization * is not allowed by mbed. * * The function "__iar_data_init3" is an IAR function which * initializes ram. * */ __low_level_init(); __iar_data_init3(); /* mbed specific code */ mbed_heap_start = (unsigned char *)__section_begin("HEAP"); mbed_heap_size = (uint32_t)__section_size("HEAP"); mbed_stack_isr_start = (unsigned char *)__section_begin("CSTACK"); mbed_stack_isr_size = (uint32_t)__section_size("CSTACK"); mbed_init(); mbed_rtos_start(); }
int __low_level_init(void) { // call IAR table copy function. __iar_data_init3(); rt_hw_interrupt_disable(); rtthread_startup(); return 0; }