Clone of mbed rtos 2 for easy accessibility.
Fork of mbed-rtos by
Diff: rtx/TARGET_CORTEX_M/RTX_CM_lib.h
- Revision:
- 56:2b2a7cc13e28
- Parent:
- 53:c35dab33c427
- Child:
- 57:430de2831ec7
--- a/rtx/TARGET_CORTEX_M/RTX_CM_lib.h Wed Dec 03 13:15:24 2014 +0000 +++ b/rtx/TARGET_CORTEX_M/RTX_CM_lib.h Mon Dec 15 09:00:24 2014 +0000 @@ -436,21 +436,34 @@ #elif defined (__ICCARM__) +extern void* __vector_table; extern int __low_level_init(void); extern void __iar_data_init3(void); +extern __weak void __iar_init_core( void ); +extern __weak void __iar_init_vfp( void ); +extern void __iar_dynamic_initialization(void); +extern void mbed_sdk_init(void); extern void exit(int arg); -__noreturn __stackless void __cmain(void) { +#pragma required=__vector_table +void __iar_program_start( void ) +{ + __iar_init_core(); + __iar_init_vfp(); + int a; if (__low_level_init() != 0) { __iar_data_init3(); - } + mbed_sdk_init(); + __iar_dynamic_initialization(); + } osKernelInitialize(); set_main_stack(); osThreadCreate(&os_thread_def_main, NULL); a = osKernelStart(); - exit(a); + exit(a); + } #endif