diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/target/arm/tcc780x/crt0.S | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/firmware/target/arm/tcc780x/crt0.S b/firmware/target/arm/tcc780x/crt0.S index f6eb6afbe9..1612973866 100644 --- a/firmware/target/arm/tcc780x/crt0.S +++ b/firmware/target/arm/tcc780x/crt0.S | |||
@@ -74,14 +74,18 @@ start_loc: | |||
74 | ldr r0, =0xf005a000 | 74 | ldr r0, =0xf005a000 |
75 | ldr r0, [r0, #0x20] /* Read GPIO A */ | 75 | ldr r0, [r0, #0x20] /* Read GPIO A */ |
76 | tst r0, #0x8 | 76 | tst r0, #0x8 |
77 | ldrne pc, [pc, #-28] /* Jump to original firmware if HOLD not pressed */ | 77 | ldreq pc, [pc, #-28] /* Jump to original firmware if HOLD pressed */ |
78 | ldr r0, =0xf005a000 | ||
79 | ldr r0, [r0, #0x60] /* Read GPIO C */ | ||
80 | tst r0, #0x4000000 | ||
81 | ldreq pc, [pc, #-44] /* Jump to original firmware if usb connected */ | ||
78 | #else | 82 | #else |
79 | #error No bootup key detection implemented for this target | 83 | #error No bootup key detection implemented for this target |
80 | #endif | 84 | #endif |
81 | 85 | ||
82 | /* Copy bootloader to safe area - 0x21F00000 (end of DRAM) */ | 86 | /* Copy bootloader to safe area - 0x21F00000 (end of DRAM) */ |
83 | /* TODO: Adjust this for other targets - DRAM + DRAMSIZE - 0x100000 */ | 87 | /* TODO: Adjust this for other targets - DRAM + DRAMSIZE - 0x100000 */ |
84 | ldr r0, [pc, #-28] | 88 | ldr r0, [pc, #-44] |
85 | mov r1, #0x22000000 | 89 | mov r1, #0x22000000 |
86 | sub r1, r1, #0x100000 | 90 | sub r1, r1, #0x100000 |
87 | ldr r2, =_dataend | 91 | ldr r2, =_dataend |