feat(swan_r5): UF2 support, with UF2 family IDs assigned to stm32 chipsets.
This commit is contained in:
parent
38f91539dc
commit
b607631ae1
@ -302,11 +302,11 @@ $(BUILD)/firmware.hex: $(BUILD)/firmware.elf
|
||||
|
||||
$(BUILD)/firmware.uf2: $(BUILD)/firmware.hex
|
||||
$(ECHO) "Create $@"
|
||||
$(PYTHON) $(TOP)/tools/uf2/utils/uf2conv.py -f 0x57755a57 -b $(BOOTLOADER_OFFSET) -c -o "$(BUILD)/firmware.uf2" $^
|
||||
$(PYTHON) $(TOP)/tools/uf2/utils/uf2conv.py -f $(UF2_FAMILY_ID) -b $(BOOTLOADER_OFFSET) -c -o "$(BUILD)/firmware.uf2" $^
|
||||
|
||||
flash: $(BUILD)/firmware.bin
|
||||
$(ECHO) "Writing $< to the board"
|
||||
dfu-util -a 0 --dfuse-address 0x08000000 -D $(BUILD)/firmware.bin
|
||||
dfu-util -a 0 --dfuse-address $(BOOTLOADER_OFFSET) -D $(BUILD)/firmware.bin
|
||||
|
||||
include $(TOP)/py/mkrules.mk
|
||||
|
||||
|
@ -14,6 +14,7 @@ LD_DEFAULT = boards/STM32L4R5_default.ld
|
||||
# UF2 boot option
|
||||
LD_BOOT = boards/STM32L4R5_boot.ld
|
||||
UF2_OFFSET = 0x8010000
|
||||
UF2_BOOTLOADER ?= 1
|
||||
|
||||
# Turn all of the below off while trying to get the thing to run
|
||||
# These modules are implemented in ports/<port>/common-hal:
|
||||
|
@ -8,6 +8,7 @@ ifeq ($(MCU_VARIANT),$(filter $(MCU_VARIANT),STM32F405xx STM32F407xx))
|
||||
CIRCUITPY_SDIOIO ?= 1
|
||||
# Number of USB endpoint pairs.
|
||||
USB_NUM_ENDPOINT_PAIRS = 4
|
||||
UF2_FAMILY_ID ?= 0x6d0922fa
|
||||
endif
|
||||
|
||||
ifeq ($(MCU_SERIES),F4)
|
||||
@ -25,6 +26,7 @@ ifeq ($(MCU_SERIES),F4)
|
||||
CIRCUITPY_ROTARYIO ?= 0
|
||||
CIRCUITPY_RTC ?= 0
|
||||
USB_NUM_ENDPOINT_PAIRS = 4
|
||||
UF2_FAMILY_ID ?= 0x57755a57
|
||||
endif
|
||||
|
||||
ifeq ($(MCU_SERIES),H7)
|
||||
@ -43,6 +45,7 @@ ifeq ($(MCU_SERIES),H7)
|
||||
CIRCUITPY_RTC ?= 0
|
||||
|
||||
USB_NUM_ENDPOINT_PAIRS = 9
|
||||
UF2_FAMILY_ID ?= 0x6db66082
|
||||
endif
|
||||
|
||||
ifeq ($(MCU_SERIES),F7)
|
||||
@ -59,6 +62,7 @@ ifeq ($(MCU_SERIES),F7)
|
||||
CIRCUITPY_RTC ?= 0
|
||||
|
||||
USB_NUM_ENDPOINT_PAIRS = 6
|
||||
UF2_FAMILY_ID ?= 0x53b80f00
|
||||
endif
|
||||
|
||||
ifeq ($(MCU_SERIES),L4)
|
||||
@ -77,6 +81,7 @@ ifeq ($(MCU_SERIES),L4)
|
||||
# This slide deck https://www.st.com/content/ccc/resource/training/technical/product_training/98/89/c8/6c/3e/e9/49/79/STM32L4_Peripheral_USB.pdf/files/STM32L4_Peripheral_USB.pdf/jcr:content/translations/en.STM32L4_Peripheral_USB.pdf
|
||||
# cites 16 endpoints, 8 endpoint pairs, while section 3.39 of the L4R5 datasheet states 6 endpoint pairs.
|
||||
USB_NUM_ENDPOINT_PAIRS = 6
|
||||
UF2_FAMILY_ID ?= 0x00ff6919
|
||||
endif
|
||||
|
||||
CIRCUITPY_PARALLELDISPLAY := 0
|
||||
|
Loading…
Reference in New Issue
Block a user