Modify the timing at which mbed_main() is called in IAR compiler.

Renesas modified the timing at which mbed_main() is called in IAR compiler.
Because we fail about test "mbed call before main" in IAR compiler.
pull/2120/head
tomoyuki yamanaka 2016-07-07 21:58:01 +09:00
parent 9f33ba87b0
commit 8331d5641c
1 changed files with 3 additions and 0 deletions

View File

@ -523,12 +523,15 @@ 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 mbed_main(void);
extern int main(void);
static uint8_t low_level_init_needed;
void pre_main(void) {
if (low_level_init_needed) {
__iar_dynamic_initialization();
}
mbed_main();
main();
}