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(); }
/* * mbed entry point for the GCC toolchain * * Override gcc boot hook software_init_hook to run code before main. */ void software_init_hook(void) { mbed_stack_isr_start = (unsigned char *) &__StackLimit; mbed_stack_isr_size = (uint32_t) &__StackTop - (uint32_t) &__StackLimit; mbed_heap_start = (unsigned char *) &__end__; mbed_heap_size = (uint32_t) &__HeapLimit - (uint32_t) &__end__; mbed_init(); mbed_rtos_start(); }
void _main_init(void) { /* microlib only supports the two region memory model */ mbed_stack_isr_start = (unsigned char *) Image$$ARM_LIB_STACK$$ZI$$Base; mbed_stack_isr_size = (uint32_t) Image$$ARM_LIB_STACK$$ZI$$Length; mbed_heap_start = (unsigned char *) Image$$ARM_LIB_HEAP$$ZI$$Base; mbed_heap_size = (uint32_t) Image$$ARM_LIB_HEAP$$ZI$$Length; mbed_init(); mbed_rtos_start(); }
void _main_init(void) { /* microlib only supports the two region memory model */ mbed_heap_start = (unsigned char *)__heap_base; mbed_heap_size = (uint32_t)__heap_base - (uint32_t)__heap_limit; mbed_stack_isr_start = (unsigned char *)((uint32_t)__initial_sp - ISR_STACK_SIZE); mbed_stack_isr_size = ISR_STACK_SIZE; mbed_init(); mbed_rtos_start(); }
/* * mbed entry point for the ARM standard toolchain * * Override the ARM standard library function __rt_entry to run code earlier in * the boot sequence. This is after scatter loading has taken place but before * the C library has been initialized. */ void __rt_entry(void) { unsigned char *free_start = HEAP_START; uint32_t free_size = HEAP_SIZE; #ifdef ISR_STACK_START /* Interrupt stack explicitly specified */ mbed_stack_isr_size = ISR_STACK_SIZE; mbed_stack_isr_start = ISR_STACK_START; #else /* Interrupt stack - reserve space at the end of the free block */ mbed_stack_isr_size = ISR_STACK_SIZE < free_size ? ISR_STACK_SIZE : free_size; mbed_stack_isr_start = free_start + free_size - mbed_stack_isr_size; free_size -= mbed_stack_isr_size; #endif /* Heap - everything else */ mbed_heap_size = free_size; mbed_heap_start = free_start; mbed_init(); _platform_post_stackheap_init(); mbed_rtos_start(); }