diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-07-24 10:31:15 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-07-24 10:31:15 +0200 |
commit | 7dd5963915d405866595439aef4c47b8eee83edf (patch) | |
tree | 51f2be7ef2ba381551a26b8d45d2f3ac71534c63 /at91lib | |
parent | cb24139232205d2764a12e00fa64ac7cc1b53ff0 (diff) |
SAM7DFU: Add a new 'flash_dfu' memory type
this will build *-flash_dfu.{bin,elf} targets which are targetted
not for the 'raw' SAM7 hardware, but for the sam7dfu boot loader
already running in it.
Diffstat (limited to 'at91lib')
-rw-r--r-- | at91lib/boards/at91sam7s-ek/board.mak | 2 | ||||
-rw-r--r-- | at91lib/boards/at91sam7s-ek/board_cstartup.S | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/at91lib/boards/at91sam7s-ek/board.mak b/at91lib/boards/at91sam7s-ek/board.mak index 5cc5885..6164a5c 100644 --- a/at91lib/boards/at91sam7s-ek/board.mak +++ b/at91lib/boards/at91sam7s-ek/board.mak @@ -28,4 +28,4 @@ # Defines which are the available memory targets for the AT91SAM7S-EK board.
-MEMORIES = flash sram
+MEMORIES = flash_dfu flash sram
diff --git a/at91lib/boards/at91sam7s-ek/board_cstartup.S b/at91lib/boards/at91sam7s-ek/board_cstartup.S index 22a3269..92bcf8b 100644 --- a/at91lib/boards/at91sam7s-ek/board_cstartup.S +++ b/at91lib/boards/at91sam7s-ek/board_cstartup.S @@ -57,7 +57,7 @@ /* Exception vectors
*******************/
.section .vectors, "a"
-
+#ifndef flash_dfu
resetVector:
ldr pc, =resetHandler /* Reset */
undefVector:
@@ -114,7 +114,7 @@ irqHandler: ldmia sp!, {r0, lr}
msr SPSR_cxsf, lr
ldmia sp!, {pc}^
-
+#endif /* flash_dfu */
//------------------------------------------------------------------------------
/// Initializes the chip and branches to the main() function.
//------------------------------------------------------------------------------
@@ -124,6 +124,7 @@ irqHandler: entry:
resetHandler:
+#ifndef flash_dfu
/* Dummy access to the .vectors section so it does not get optimized */
ldr r0, =resetVector
@@ -137,7 +138,7 @@ resetHandler: ldr r0, =LowLevelInit
mov lr, pc
bx r0
-
+#endif /* flash_dfu */
/* Initialize the relocate segment */
ldr r0, =_efixed
@@ -158,6 +159,7 @@ resetHandler: strcc r2, [r0], #4
bcc 1b
+#ifndef flash_dfu
/* Setup stacks
**************/
/* IRQ mode */
@@ -168,7 +170,7 @@ resetHandler: /* Supervisor mode (interrupts enabled) */
msr CPSR_c, #ARM_MODE_SVC | F_BIT
mov sp, r4
-
+#endif /* flash_dfu */
/* Branch to main()
******************/
ldr r0, =main
|