I have a project build on cortex-m0plus, currently using kds2.0
after i had opened it in kds3.0, I change the link flag from -nanolibc to -specs=nano.specs -specs=nosys.specs
there is a compiler error saying :
selected processor does not support Thumb mode 'mrs R0, MSP'
I checked the build settings:
I found that the compiler option is missing -mcpu= cortex-m0plus,
if I add -mcpu= cortex-m0plus in the Other target flags, then it builds without the error, So why this option is not included in the compiler option list automatically? because I already select the ARM family to cortex-m0plus like in the above image.
I checked this project in KDS2.0, that also does not include this option, but in kds2.0, it is default to build for cortex-m0plus, so there is no compiler error.
Solved! Go to Solution.
I just saw Erich posted a very useful document:
this may help you.
Have a great day,
Zhang Jun
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Daniel,
It looks like some projects somehow have a problem (still puzzled about that). And yes, I confirm that in these cases you have to add that to the compiler settings. The root cause seems to me that the launchpad tools are using ARM (not thumb) by default, and despite you have selected Cortex-M0+ in the settings, that option somehow is not passed.
I have added a section
to Kinetis Design Studio: Migrating KDS V2.0.0 Projects to GNU Tools for ARM Embedded (Launchpad, KDS V... to have this documented, so thanks for reporting this.
Erich
hi,
can you please upload your KDS2.0 project here? I will test it on my side.
thanks!
Have a great day,
Zhang Jun
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
can you give me your email address?
I just saw Erich posted a very useful document:
this may help you.
Have a great day,
Zhang Jun
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I did follow the steps in the link
the compiler error can be eliminated by adding the -mcpu flag
but the issue that the KDS upgrade assistant can't detect my project is still not fixed.
Have you tried the project i sent to you?
I just sent you email. you can send me email.