[En-Nut-Discussion] AT91SAM7X512 - Changing app entry point
Dave Warren
dwarren at luescher.com
Thu May 21 11:30:43 CEST 2009
Juan, the short answer is you can't because on power up 0x100000 is mapped
to address 0x0 as well which is where the vectors have to be.
You can of course link any app to a different address but you have to start
it from maybe a bootloader that starts at 0x100000. Be sure to copy the
vectors to RAM 0x200000 and remap 0x0 to RAM if you need interrupts. Here is
some code I use to start an app at 0x110000 in my bootloader
/* Slow down the clock */
PMC_MCKR = 0;
while ((PMC_SR & 1<<PMC_SR_MCKRDY_BIT) == 0);
/* Toggle external hardware reset pin. (and reset all periperals ) */
RSTC_MR = RSTC_MR_KEY | (2 << RSTC_MR_ERSTL_BIT) | RSTC_MR_URSTEN;
RSTC_CR = RSTC_CR_KEY | RSTC_CR_EXTRST | RSTC_CR_PERRST;
while ((RSTC_SR & RSTC_SR_NRSTL) == 0);
/* branch to app (no way back) */
asm volatile ("ldr r0,=0x110000" "\n\t" "bx r0" "\n\t");
Note if you don't slow the clock restart may fail.
Hope this helps
Dave W
----- Original Message -----
From: "Jason Bourne" <jucanpo at hotmail.com>
To: "ARM Discussion" <en-nut-discussion at egnite.de>
Sent: Thursday, May 21, 2009 10:00 AM
Subject: [En-Nut-Discussion] AT91SAM7X512 - Changing app entry point
Hi,
I am using the AT91SAM7X-EX evaluation board, by default the application
entry point is 0x100000. How can I change the application entry point to
0x120000?
Thank you
Juan
_________________________________________________________________
Hotmail® goes with you.
http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion
More information about the En-Nut-Discussion
mailing list