Topic : Debugging startup code

Forum : ARM

Original Post
Post Information Post
September 2, 2009 - 2:16pm
Guest

Hi,

When debugging the startup code, I do not understand the behavior:

_startup:
_start:
B Reset_Handler
B UndefinedHandler
B SWIHandler
B PrefetchAbortHandler
B DataAbortHandler
nop /*; Reserved vector*/
B IRQHandler
B FIQHandler

In memory at address 0 : 41 00 000 EA 0D 00 00 EA 13 00 00 EA, but after a run, address 0 looks like:
00 10 4F E1 (MRS R1 SPSR) or 02 00 BD E8 (LDMIA R13!, {R1}

Most of the time the program ends in an Abort handler or somewhere in non existing memory.

In the Simulator the program behaves as expected.

Replies
Post Information Post
+1
0
-1
September 2, 2009 - 5:02pm
Guest

Hi

Can you precse software versions you use and what is your target?

Regards,
Matloub

+1
0
-1
September 3, 2009 - 9:23am
Guest

Hi,

Ride7 7.22.09.0203
Rkit ARM 1.20.09.0154

Target is STR911FAM44X6

Bank 0 at 0, Boot from bank 0 (everything default)

The program also does not behave as expected without the RLink attached. It is supposed to toggle some IO pins (with external 10k pull-up), but the oscilloscope show only a noisy high.

The strange thing is also that the program ran correctly on 2 targets, and then suddenly stopped working, also on a 3rd target. The running off into non existing memory is probably caused by an exception handler returning without the stack set up correctly.

The phenomena occurs with 2 different RLinks.

The external 12 MHz clock is running

I am happy to share the code, please indicate the best way of doing so if it is required.

Regards, Wim

+1
0
-1
September 7, 2009 - 9:43am
Raisonance Support Team

Hi,

The most probable explanation I can imagine for what you describe is that the CSX bit in the configuration is set, which places bank1 at address 0, and that you don't erase it.

Please make sure that the programming of the configuration is activated in the advanced debug options, and that the boot bank is selected as you wish in the Ride project options.

Best Regards,

Vincent