This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Starterware: Board can't boot up without debug---me too

Other Parts Discussed in Thread: HALCOGEN

Tool/software: Starterware

Hi Sir:

I used RM48L952ZWT & HAL CoGen

The same condition : Board can't boot up without debug(J-TAG)

 find it on E2E Community:

Hello,

My team has developed a board based on RM48L952ZWT microcontroller, and we're using our own start up code.

Whenever I try to debug my code everything works properly. I can restart it, reset it, and everything works without any problems. The problem comes when I remove power from the board and then plug it back again. It sets de nError pin and my code doesn't boot up. In order to test this I programmed my board using halcogen and put a dummy application in it (infinite loop) and I can see that everything works properly.

Just in case I also tested my code in the RM48HDK and I can see that sometimes it works. If I turn it off WITH the debugging cable connected, my application works, if I do the same without the debugger plugged in it doesn't work.

This is obviously a firmware problem, I must be configuring something wrong, but I have no idea what. I'll post my code as soon as I clean it up and remove proprietary code.

In reply to Enrique Lizarraga:

Sorry for taking such a long time to answer your reply. I found my mistake 10 minutes after I posted my question. It was a really dumb mistake. I was making a call to init the VFP module and at the beginning of the function I was doing a

stmfd sp!, {r0}

Which is ok IF THE STACK POINTER AND REGISTERS HAVE ALREADY BEEN INITIALIZED. As I was following the Initialization manual, and it stated that the VFP should be the first thing initialized I did it, but I didn't think about the stack pointer. After noticing this I changed the location of the initVFP() function. but I could've also removed the stmfd instruction (and its analog instruction) and it also would've worked ok. 
 

I don't know

I was making a call to init the VFP module and at the beginning of the function I was doing a

stmfd sp!, {r0}

Which is ok IF THE STACK POINTER AND REGISTERS HAVE ALREADY BEEN INITIALIZED.

How to modify on HALCoGen asm & C module

exe.   sys_code.asm  &  sys_startup.c( void _c_int00(void) )

Best Regards

By Ken Lin