File tree Expand file tree Collapse file tree 15 files changed +29
-24
lines changed
adafruit-grand-central-m4-express
adafruit-metro-m4-express
common/samdx1-arduino-bootloader Expand file tree Collapse file tree 15 files changed +29
-24
lines changed Original file line number Diff line number Diff line change 1- CFLAGS += -DBOOTLOADER_UF2
2-
31PROG_TTY_BOARD_FILTER := --vendor 'Adafruit Industries' --model 'Grand Central M4 Express'
42
53# Include all definitions for flashing with bossa other USB
Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ extern "C" {
8585#endif
8686/** @} */
8787
88+ #define BOOTLOADER_UF2 1 /**< This board uses the UF2 bootloader */
89+
8890#ifdef __cplusplus
8991}
9092#endif
Original file line number Diff line number Diff line change 1- CFLAGS += -DBOOTLOADER_UF2
2-
31# Include all definitions for flashing with bossa other USB
42include $(RIOTBOARD)/common/samdx1-arduino-bootloader/Makefile.include
53# Include handling of serial and non-bossa programmers (if selected by user)
Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ extern "C" {
6060#define XTIMER_HZ (1000000ul)
6161/** @} */
6262
63+ #define BOOTLOADER_UF2 1 /**< This board uses the UF2 bootloader */
64+
6365#ifdef __cplusplus
6466}
6567#endif
Original file line number Diff line number Diff line change 1- CFLAGS += -DBOOTLOADER_UF2
2-
31PROG_TTY_BOARD_FILTER := --vendor 'Adafruit Industries' --model 'Metro M4 Express'
42
53# Include all definitions for flashing with bossa other USB
Original file line number Diff line number Diff line change @@ -66,6 +66,8 @@ extern "C" {
6666#define MTD_0 mtd_dev_get(0) /**< MTD device for the 8 MiB QSPI Flash */
6767/** @} */
6868
69+ #define BOOTLOADER_UF2 1 /**< This board uses the UF2 bootloader */
70+
6971#ifdef __cplusplus
7072}
7173#endif
Original file line number Diff line number Diff line change 1- CFLAGS += -DBOOTLOADER_UF2
2-
31# stdio over usb takes several seconds to be up after flashing
42TERM_DELAY ?= 4
53
Original file line number Diff line number Diff line change @@ -107,6 +107,8 @@ extern "C" {
107107#define XTIMER_HZ (1000000ul) /**< Default timer runs at 1MHz */
108108/** @} */
109109
110+ #define BOOTLOADER_UF2 1 /**< This board uses the UF2 bootloader */
111+
110112#ifdef __cplusplus
111113}
112114#endif
Original file line number Diff line number Diff line change 2020
2121#define USB_H_USER_IS_RIOT_INTERNAL
2222
23+ #include "board.h"
2324#include "cpu.h"
2425#include "usb_board_reset.h"
2526
2627#ifdef HMCRAMC0_ADDR
27- #define DBL_TAP_PTR ((volatile uint32_t *)(HMCRAMC0_ADDR + HMCRAMC0_SIZE - 4))
28+ # define DBL_TAP_PTR ((volatile uint32_t *)(HMCRAMC0_ADDR + HMCRAMC0_SIZE - 4))
2829#else
29- #define DBL_TAP_PTR ((volatile uint32_t *)(HSRAM_ADDR + HSRAM_SIZE - 4))
30+ # define DBL_TAP_PTR ((volatile uint32_t *)(HSRAM_ADDR + HSRAM_SIZE - 4))
3031#endif
3132
32- #ifdef BOOTLOADER_UF2
33- #define SAMD21_DOUBLE_TAP_ADDR DBL_TAP_PTR
34- #define SAMD21_DOUBLE_TAP_MAGIC_NUMBER (0xF01669EFUL)
33+ #if BOOTLOADER_UF2
34+ # define SAMD21_DOUBLE_TAP_ADDR DBL_TAP_PTR
35+ # define SAMD21_DOUBLE_TAP_MAGIC_NUMBER (0xF01669EFUL)
3536#else
36- #define SAMD21_DOUBLE_TAP_ADDR (0x20007FFCUL)
37- #define SAMD21_DOUBLE_TAP_MAGIC_NUMBER (0x07738135UL)
37+ # define SAMD21_DOUBLE_TAP_ADDR (0x20007FFCUL)
38+ # define SAMD21_DOUBLE_TAP_MAGIC_NUMBER (0x07738135UL)
3839#endif
3940
4041void usb_board_reset_in_bootloader (void )
Original file line number Diff line number Diff line change 1- # Boards after around 2018 use the more modern UF2 bootloader.
2- # Comment out for the old BOSSA bootloader or upgrade to
3- # the UF2 bootloader.
4- CFLAGS += -DBOOTLOADER_UF2
5-
61# setup the flash tool used
72ifeq ($(PROGRAMMER),jlink)
83 # in case J-Link is attached to SWD pins, use a plain CPU memory model
You can’t perform that action at this time.
0 commit comments