migrate kds2 to kds3 got compiler error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

migrate kds2 to kds3 got compiler error

Jump to solution
693 Views
danielzhang_11
Contributor I

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'

41187_41187.pngpastedImage_6.png

I checked the build settings:

41186_41186.pngpastedImage_5.png

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.

Labels (1)
0 Kudos
1 Solution
539 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

I just saw Erich posted a very useful document:

Kinetis Design Studio: Migrating KDS V2.0.0 Projects to GNU Tools for ARM Embedded (Launchpad, KDS V...

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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
6 Replies
539 Views
BlackNight
NXP Employee
NXP Employee

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

Wrong or missing Thumb mode

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

0 Kudos
539 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
539 Views
danielzhang_11
Contributor I

can you give me your email address?

0 Kudos
540 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

I just saw Erich posted a very useful document:

Kinetis Design Studio: Migrating KDS V2.0.0 Projects to GNU Tools for ARM Embedded (Launchpad, KDS V...

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!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
539 Views
danielzhang_11
Contributor I

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?

0 Kudos
539 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

I just sent you email. you can send me email.

0 Kudos