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(); }
//------------------------------------------------------------------------------ void Reset_Handler() { if( __low_level_init() ) { memcpy(__data_start, __idata_start, __data_end - __data_start); // copy initialized variables memset(__bss_start, 0, __bss_end - __bss_start); // zero-fill uninitialized variables __libc_init_array(); // low-level init & ctor loop } main(); }