Skip to content

Commit 330065e

Browse files
committed
boards: Add mboot target to CUSTOM_PYBD_SF2.
Signed-off-by: Damien George <[email protected]>
1 parent 789d9ed commit 330065e

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

boards/CUSTOM_PYBD_SF2/Makefile

+7
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,12 @@ firmware:
3030
BOARD_DIR=$(BOARD_DIR) \
3131
BUILD=$(BUILD)
3232

33+
mboot:
34+
$(Q)$(MAKE) -C $(MICROPY_TOP)/ports/stm32/mboot \
35+
PROJECT_TOP=$(abspath ../..) \
36+
BOARD=$(BOARD) \
37+
BOARD_DIR=$(BOARD_DIR) \
38+
BUILD=$(BUILD)-mboot
39+
3340
deploy:
3441
$(PYTHON) $(MICROPY_TOP)/tools/pydfu.py -u $(BUILD)/firmware.dfu

boards/CUSTOM_PYBD_SF2/board_init.c

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// Use PYBD_SF2 implementation, but add extra initialisation.
55
#include "boards/PYBD_SF2/board_init.c"
66

7+
#if !BUILDING_MBOOT
8+
79
void board_early_init_custom(void) {
810
// Call PYBD_SF2's board init function.
911
board_early_init();
@@ -23,3 +25,5 @@ int board_run_boot_py(boardctrl_state_t *state) {
2325
mp_printf(&mp_plat_print, "Starting custom board\n");
2426
return boardctrl_run_boot_py(state);
2527
}
28+
29+
#endif

0 commit comments

Comments
 (0)