File tree Expand file tree Collapse file tree 3 files changed +13
-17
lines changed
variants/arduino_zero/linker_scripts/gcc Expand file tree Collapse file tree 3 files changed +13
-17
lines changed Original file line number Diff line number Diff line change @@ -106,26 +106,22 @@ static void check_start_application(void)
106
106
}
107
107
else
108
108
{
109
- switch (BOOT_DOUBLE_TAP_DATA ) {
110
- case 0 :
111
- /* First tap */
112
- BOOT_DOUBLE_TAP_DATA = DOUBLE_TAP_MAGIC ;
113
-
114
- for (uint32_t i = 0 ; i < 125000 ; i ++ ) /* 500ms */
115
- /* force compiler to not optimize this... */
116
- __asm__ __volatile__("" );
117
-
118
- /* Timeout happened, continue boot... */
119
- BOOT_DOUBLE_TAP_DATA = 0 ;
120
- break ;
121
- case DOUBLE_TAP_MAGIC :
109
+ if (BOOT_DOUBLE_TAP_DATA == DOUBLE_TAP_MAGIC ) {
122
110
/* Second tap, stay in bootloader */
123
111
BOOT_DOUBLE_TAP_DATA = 0 ;
124
112
return ;
125
- default :
126
- /* Fallback... reset counter and continue boot */
127
- BOOT_DOUBLE_TAP_DATA = 0 ;
128
113
}
114
+
115
+ /* First tap */
116
+ BOOT_DOUBLE_TAP_DATA = DOUBLE_TAP_MAGIC ;
117
+
118
+ /* Wait 0.5sec to see if the user tap reset again */
119
+ for (uint32_t i = 0 ; i < 125000 ; i ++ ) /* 500ms */
120
+ /* force compiler to not optimize this... */
121
+ __asm__ __volatile__("" );
122
+
123
+ /* Timeout happened, continue boot... */
124
+ BOOT_DOUBLE_TAP_DATA = 0 ;
129
125
}
130
126
#endif
131
127
Original file line number Diff line number Diff line change 26
26
MEMORY
27
27
{
28
28
FLASH (rx) : ORIGIN = 0x00000000+0x2000, LENGTH = 0x00040000-0x2000 /* First 8KB used by bootloader */
29
- RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000-0x0004 /* Last 4B used by bootloader */
29
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000
30
30
}
31
31
32
32
/* Linker script to place sections and symbol values. Should be used together
You can’t perform that action at this time.
0 commit comments