|
From: | Odd Lindahl |
Subject: | [Gdb] assembler version of "set $cpsr = 0xd3" |
Date: | Wed, 13 Jun 2001 14:23:25 +0200 |
Hi all,
I have writen a program to my AT91EB40 boards flash at 0x10100000
and I want to execute it after reset by putting the switch, SW1, in the UPPER MEM position.
The program doesn't work correctly though :-(
But if I boot in Angel mode and issue the gdb commands:
set rdiromatzero 1
set remotebaud 9600
target rdi com1
set $cpsr = 0xd3
jump *0x01010000
( or either of jump *0x01000000 and jump *0x01010000 with the switch in UPPER MEM position)
it starts up fine!!
But if I skipp the "set $cpsr = 0xd3" command it wont run correctly.
So what exactly does the "set" command do and how do I replace the mode switch in software that I can flash.
I have tried with:
mrs r0, cpsr
bic r0, r0, #0x1f
orr r0, r0, #0xd3
msr cpsr, r0
at address 0x01010000 and onwards just before the rest of the code. But this didn't do the trick.
Kind Regards
Odd
[Prev in Thread] | Current Thread | [Next in Thread] |