File tree 3 files changed +14
-1
lines changed 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -274,6 +274,7 @@ SRC_C += \
274
274
drivers/ticker.c \
275
275
drivers/bluetooth/ble_drv.c \
276
276
drivers/bluetooth/ble_uart.c \
277
+ $(wildcard boards/$(BOARD ) /* .c) \
277
278
278
279
ifeq ($(MCU_SUB_VARIANT ) , nrf52840)
279
280
Original file line number Diff line number Diff line change @@ -107,9 +107,13 @@ extern uint32_t _heap_start;
107
107
extern uint32_t _heap_end ;
108
108
D265
td>109
109
int main (int argc , char * * argv ) {
110
+ // Hook for a board to run code at start up, for example check if a
111
+ // bootloader should be entered instead of the main application.
112
+ MICROPY_BOARD_STARTUP ();
110
113
111
-
114
+ MICROPY_BOARD_EARLY_INIT ();
112
115
soft_reset :
116
+
113
117
#if MICROPY_PY_TIME_TICKS
114
118
rtc1_init_time_ticks ();
115
119
#endif
Original file line number Diff line number Diff line change @@ -366,3 +366,11 @@ extern const struct _mp_obj_module_t music_module;
366
366
#ifndef MP_NEED_LOG2
367
367
#define MP_NEED_LOG2 (1)
368
368
#endif
369
+
370
+ #ifndef MICROPY_BOARD_STARTUP
371
+ #define MICROPY_BOARD_STARTUP ()
372
+ #endif
373
+
374
+ #ifndef MICROPY_BOARD_EARLY_INIT
375
+ #define MICROPY_BOARD_EARLY_INIT ()
376
+ #endif
You can’t perform that action at this time.
0 commit comments