Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 6 months ago.
mbed online compiler flags
I am trying to export a program from the mbed online compiler to Keil uVision, however mbed does not support this export for my board Wiznet W7500P:
So I have exported manually and it seems to work properly except for the printf function that went crazy (prints "▒▒▒▒J▒▒▒" or "▒FOFO▒OVO" or "▒▒OVF▒▒RO" instead of "[INFO: /src/main.cpp:1320]").
I think this issue is related to the compiler flags I am using at Keil uVision, but I haven't been able to find anywhere what flags are being used in the online compiler, whose binary works perfectly. Can someone advise me in this point? Where can I find these flags?
If anyone has any insight about something else that might be causing the printf issue, please let me know.
1 Answer
8 years, 6 months ago.
Hi Pedro,
I am using the STM L4 Disco board export to Keil MDK 5.2, the export works but I had to to go menu Project->Manage to convert it into a Keil 5 project.
The online compile flags you can see when you select verbose in the online compiler (the verbose switch is where the error messages appear.
Hi Helmut,
Thanks for your time and information shared.
Did you select the Keil uVision 4 as the Export Toolchain in the online compiler? (Because for my board this option is disabled so I had to manually convert the project to Keil)
About the flags, if I select the verbose option, I receive the following two lines:
Info: Macros: -DTARGET_WIZWIKI_W7500P -DTARGET_M0 -DTARGET_CORTEX_M -DTARGET_LIKE_CORTEX_M0 -DTARGET_WIZNET -DTARGET_W7500x -DTARGET_WIZwiki_W7500P -DTOOLCHAIN_ARM_STD -DTOOLCHAIN_ARM -DCORTEX_M0 -DARM_MATH_CM0 -DCMSIS_RTOS -DMBED_CMSIS_RTOS_CM -DMBED_USERNAME=pedroherig -DMBED_BUILD_TIMESTAMP=1463681120.44 -DMBED=1
Success: Success!
Is there something else I should set in order to see the compiler flags?
posted by 19 May 2016Helmut,
I have managed to see the compiler flags. I set the verbose flag, deleted and uploaded the startup.S file, recompiled and the flags were displayed. Thanks.
posted by 19 May 2016Pedro, yes I see the uVision export, I can open the exported archive in uVision 5.2, select menu Project->Manage->Convert to v5 and the build works without changing other settings. For a simple test you can create a Blinky project for the STM32L4 Nucleo board, export this and check of the uVision compiler can compile it.
posted by 19 May 2016Thanks Helmut. This is the same behavior that I have seen in some NXP boards, it compiles fine in my uVision 5.2.
I think my printf issue is related to some frequency configuration that might be different at uVision because I updated the compiler flags to be exactly as the ones in the online compiler and the issue persists. I will open a new question about the printf issue.
posted by 19 May 2016