MQX bsp_init.c trouble

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

MQX bsp_init.c trouble

399 Views
sbaccam
Contributor I

Hi,

I ported the MQX from m52223evb to an MCF52221CAE66 custom board. I modify the .mem, the .lcf and the .cfg files. When I try to debbug it using the PE USB Multilink Universal, it starts fine. It executed the boot.c assembler instructions and it jumped to the bsp_init.c file using a JSR assembler instruction. Here is the problem, in the first assembler instruction of the bsp_init.c file it stop the excecution and it shows Exception 12 in the debug Window. At this point it tries to execute a LINK instruction but it can't. Only the VBR register reserved bits are changing when I try to exceute again the instruction.

Exception.JPG

I don't know why the debug is suspended automatically at this point.

Sergio David Bacca

0 Kudos
2 Replies

268 Views
Monica
Senior Contributor III

Hey there sbaccam!

How's the project going?

Are these answers helping you throughout it? We'd appreciate the feedback, too :smileywink:

Best regards!

0 Kudos

268 Views
Martin_
NXP Employee
NXP Employee

what is the value in the register A7 (=SP) before you attempt to execute the "link" instruction ?
the link instruction attempts to write 4 bytes (32-bits) to the stack, so the stack pointer should have a valid address in the internal SRAM at this moment.

I think the register gets loaded with the value of linker generated symbol __BOOT_STACK_ADDRESS.
Does it point to the end of 16 KB SRAM for MCF52221. (0x20004000) ?

0 Kudos