migrate kds2 to kds3 got compiler error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

migrate kds2 to kds3 got compiler error

跳至解决方案
1,634 次查看
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.

标签 (1)
0 项奖励
回复
1 解答
1,480 次查看
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 项奖励
回复
6 回复数
1,480 次查看
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 项奖励
回复
1,480 次查看
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 项奖励
回复
1,480 次查看
danielzhang_11
Contributor I

can you give me your email address?

0 项奖励
回复
1,481 次查看
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 项奖励
回复
1,480 次查看
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 项奖励
回复
1,480 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

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

0 项奖励
回复