circuitpython/ports/stm32/boards/LEGO_HUB_NO7/mpconfigboard.mk
David Lechner 10f85fee18 stm32/boards/LEGO_HUB_NO7: Add LEGO Hub No. 7 board definition.
This adds support for the LEGO Hub No. 7, aka LEGO Technic Small hub, aka
LEGO SPIKE Essential hub.  This board is largely similar to Hub No. 6:

- Same MCU (STM32F413 - different packaging with fewer pins).
- Same Bluetooth chip (TI CC2564).
- Same IMU chip.
- Similar external flash chip - 4MiB instead of 32MiB.
- 2 I/O ports instead of 6.
- No display - only status and battery LEDs.
- Different LED driver chip.
- Only 1 button which is also the power button.
- No speaker.

Signed-off-by: David Lechner <david@pybricks.com>
2022-08-06 00:01:31 +10:00

51 lines
1.4 KiB
Makefile

MCU_SERIES = f4
CMSIS_MCU = STM32F413xx
AF_FILE = boards/stm32f413_af.csv
LD_FILES = boards/LEGO_HUB_NO6/stm32f413xg.ld boards/common_bl.ld
TEXT0_ADDR = 0x08010000
BOOTLOADER_DFU_USB_VID ?= 0x0694
BOOTLOADER_DFU_USB_PID ?= 0x000C
# MicroPython settings
MICROPY_PY_BLUETOOTH ?= 1
MICROPY_BLUETOOTH_NIMBLE ?= 0
MICROPY_BLUETOOTH_BTSTACK ?= 1
MICROPY_VFS_LFS2 ?= 1
# Board specific frozen modules
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py
SRC_HAL += $(STM32LIB_HAL_BASE)/Src/stm32f4xx_hal_fmpi2c.c
ifneq ($(BUILDING_MBOOT),1)
LIB_SRC_C += lib/btstack/chipset/cc256x/btstack_chipset_cc256x.c
endif
# Bootloader settings
MBOOT_TEXT0_ADDR = 0x08008000
MBOOT_LD_FILES = ../boards/LEGO_HUB_NO6/mboot_memory.ld stm32_sections.ld
# Backup/restore original Hub firmware
HUB_FIRMWARE = lego_hub_firmware.dfu
HUB_FIRMWARE_ADDR = $(MBOOT_TEXT0_ADDR)
HUB_FIRMWARE_SIZE = 0xf8000
backup-hub-firmware:
$(Q)$(DFU_UTIL) -a 0 \
-d $(BOOTLOADER_DFU_USB_VID):$(BOOTLOADER_DFU_USB_PID) \
-U $(HUB_FIRMWARE).bin \
-s $(HUB_FIRMWARE_ADDR):$(HUB_FIRMWARE_SIZE)
$(Q)$(PYTHON) $(DFU) \
-b $(HUB_FIRMWARE_ADDR):$(HUB_FIRMWARE).bin \
-D $(BOOTLOADER_DFU_USB_VID):$(BOOTLOADER_DFU_USB_PID) \
$(HUB_FIRMWARE)
$(Q)$(RM) $(HUB_FIRMWARE).bin
$(ECHO) "Backup created in $(HUB_FIRMWARE)"
restore-hub-firmware:
$(Q)$(DFU_UTIL) -a 0 \
-d $(BOOTLOADER_DFU_USB_VID):$(BOOTLOADER_DFU_USB_PID) \
-D $(HUB_FIRMWARE)