KDS: Switching Between MCUs

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

KDS: Switching Between MCUs

1,016件の閲覧回数
philhale
Contributor IV

I have an interesting problem that I am hopeful someone might have some ideas how to resolve.

I am using KDS 3.2.0. I am migrating an application from K64 to KL27. I am getting a hard fault that occurs anytime I am using standard library functions from, particularly, string.h.  Strtok, Strlen, etc.  Commenting these lines out and everything works fine.

It seems obvious that just changing the Target Processor isn't enough to point KDS to the correct standard libraries.

Any suggestions?

Phil

ラベル(2)
0 件の賞賛
返信
3 返答(返信)

899件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Hi Phil,

did you switch from M4F to M0+?

pastedImage_1.png

Otherwise the library will use M4(F) instructions which are not available on M0+. The logical consequence will be a hard fault.

I hope this helps,

Erich

0 件の賞賛
返信

899件の閲覧回数
philhale
Contributor IV

Thank you for your kind reply, Erich.

Yes, I changed the Target Processor to "cortex-m0plus".  I verify this during compilation in the console.

Everything seems to be working just fine except standard library String.h functions. Strlen and Strtok are a few that trigger hard faults.

I must be missing something or inadvertently broke something but I don't know how I COULD.  Defining the Target Processor points to the standard cortex-m0plus libraries, from how I understand the system. Strange.

If you think of any other ideas, please let me know.

Thank you again for your reply, Erich.

Phil 

0 件の賞賛
返信

899件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Hi Phil,

Usually I do port projects with the 'create new, then copy' method, but I have changed a few projects 'in-place' too. I have documented the process in Tutorial: Changing ARM Cortex Core or Microcontroller in Eclipse CDT Projects | MCU on Eclipse , maybe there is something you have missed?

I hope this helps,

Erich

0 件の賞賛
返信