Skip to content

Commit a75e94f

Browse files
committed
DM: updated magic number to match circuitpython stuff
1 parent 4f128a7 commit a75e94f

File tree

7 files changed

+464
-7
lines changed

7 files changed

+464
-7
lines changed
7.1 KB
Binary file not shown.
1.2 MB
Binary file not shown.

bootloaders/metroM4/METRO_M4_sam_ba.hex

Lines changed: 457 additions & 0 deletions
Large diffs are not rendered by default.

bootloaders/metroM4/board_definitions_feather_m4.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
* BOOT_DOUBLE_TAP_ADDRESS must point to a free SRAM cell that must not
3636
* be touched from the loaded application.
3737
*/
38-
#define BOOT_DOUBLE_TAP_ADDRESS (0x2002FFFCul)
39-
#define BOOT_DOUBLE_TAP_DATA (*((volatile uint32_t *) BOOT_DOUBLE_TAP_ADDRESS))
38+
#define BOOT_DOUBLE_TAP_ADDRESS (HSRAM_ADDR + HSRAM_SIZE - 4)
39+
#define BOOT_DOUBLE_TAP_DATA (*((volatile uint32_t *)BOOT_DOUBLE_TAP_ADDRESS))
4040

4141
/*
4242
* If BOOT_LOAD_PIN is defined the bootloader is started if the selected

bootloaders/metroM4/board_definitions_metro_m4.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
* BOOT_DOUBLE_TAP_ADDRESS must point to a free SRAM cell that must not
3636
* be touched from the loaded application.
3737
*/
38-
#define BOOT_DOUBLE_TAP_ADDRESS (0x2002FFFCul)
39-
#define BOOT_DOUBLE_TAP_DATA (*((volatile uint32_t *) BOOT_DOUBLE_TAP_ADDRESS))
38+
#define BOOT_DOUBLE_TAP_ADDRESS (HSRAM_ADDR + HSRAM_SIZE - 4)
39+
#define BOOT_DOUBLE_TAP_DATA (*((volatile uint32_t *)BOOT_DOUBLE_TAP_ADDRESS))
4040

4141
/*
4242
* If BOOT_LOAD_PIN is defined the bootloader is started if the selected

bootloaders/metroM4/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ uint32_t* pulSketch_Start_Address;
7878
}
7979

8080
#if defined(BOOT_DOUBLE_TAP_ADDRESS)
81-
#define DOUBLE_TAP_MAGIC 0x07738135
81+
#define DOUBLE_TAP_MAGIC 0xf01669efUL
8282
//if (PM->RCAUSE.bit.POR)
8383
if( RSTC->RCAUSE.bit.POR )
8484
{

cores/arduino/Reset.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ static void banzai() {
5555

5656
#if defined(__SAMD51__)
5757
//THESE MUST MATCH THE BOOTLOADER
58-
#define DOUBLE_TAP_MAGIC 0x07738135
59-
#define BOOT_DOUBLE_TAP_ADDRESS 0x2002FFFCul
58+
#define DOUBLE_TAP_MAGIC 0xf01669efUL
59+
#define BOOT_DOUBLE_TAP_ADDRESS (HSRAM_ADDR + HSRAM_SIZE - 4)
6060

6161
unsigned long *a = (unsigned long *)BOOT_DOUBLE_TAP_ADDRESS;
6262
*a = DOUBLE_TAP_MAGIC;

0 commit comments

Comments
 (0)