Skip to content

cmain IAR: add mbed main #4604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cmsis/TOOLCHAIN_IAR/cmain.S
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
EXTERN exit
EXTERN __iar_dynamic_initialization
EXTERN mbed_sdk_init
EXTERN mbed_main
EXTERN SystemInit

THUMB
Expand Down Expand Up @@ -87,6 +88,10 @@ _call_main:
FUNCALL __cmain, __iar_argc_argv
BL __iar_argc_argv ; Maybe setup command line

MOVS r0,#0 ; No parameters
FUNCALL __cmain, mbed_main
BL mbed_main

FUNCALL __cmain, main
BL main
_main:
Expand Down