Running RTX on M0 core of lpc4370

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

Running RTX on M0 core of lpc4370

412 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ali_asadzadeh on Sun Apr 05 05:29:22 MST 2015
Hi,
I can write working programs on LPC4370 M4 and M0 cores, But when ever I try to use RTX on M0 Core,The M0 app will crash on M0_SVC_Handler

I can run RTX successfully on M4 core,
Do you have any Idea what's wrong? what I have missed?
Labels (1)
0 Kudos
3 Replies

373 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ali_asadzadeh on Sun Apr 05 06:59:17 MST 2015
I have found the problem
It was stupid keil generating startup file and changed the SVC_Handler  to M0_SVC_Handler

to solve the problem you should change the M0_SVC_Handler name in startup.s to SVC_Handler,because RTX use that name!
Also to prevent M0 core to run the code you could add this line in start up file

BKPT  0
0 Kudos

373 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ali_asadzadeh on Sun Apr 05 06:11:34 MST 2015
Thanks, I'm using Keil, and J-link as debugger,
I have used this simple code to trap M0 from code execution, and when I connect with j-link I can clear the lockM0 in watch so I can debug it,
The problem is that before the main starts the hard Fault will happen, here is the register file content,Please take a look at attached pictures,
Also I have attached the start-up source file,(I have changed the extension to .C so the stupid forum allow me to attach it)

http://www.imageupload.co.uk/image/Zciq
http://www.imageupload.co.uk/image/Zci1

Thanks in advance
0 Kudos

373 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Sun Apr 05 05:38:40 MST 2015
Who knows? You've given us no information to be able to help you.

How about starting with what you mean by 'crash'? Do you mean a Hard Fault? If so, have you determined the reason? See
http://www.lpcware.com/content/faq/lpcxpresso/debugging-hard-fault
0 Kudos