forked from mirrors/qmk_userspace
Add support for producing UF2-format binaries. (#12435)
* First stab at enabling builds of UF2-format binaries. * Add description on producing a UF2 file.
This commit is contained in:
parent
3ce8c9fc8f
commit
64a0f5a659
6 changed files with 373 additions and 8 deletions
|
@ -139,6 +139,9 @@ ifneq ($(findstring STM32F042, $(MCU)),)
|
|||
# Options to pass to dfu-util when flashing
|
||||
DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
|
||||
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
|
||||
|
||||
# UF2 settings
|
||||
UF2_FAMILY ?= STM32F0
|
||||
endif
|
||||
|
||||
ifneq ($(findstring STM32F072, $(MCU)),)
|
||||
|
@ -172,6 +175,9 @@ ifneq ($(findstring STM32F072, $(MCU)),)
|
|||
# Options to pass to dfu-util when flashing
|
||||
DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
|
||||
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
|
||||
|
||||
# UF2 settings
|
||||
UF2_FAMILY ?= STM32F0
|
||||
endif
|
||||
|
||||
ifneq ($(findstring STM32F103, $(MCU)),)
|
||||
|
@ -205,6 +211,9 @@ ifneq ($(findstring STM32F103, $(MCU)),)
|
|||
# Options to pass to dfu-util when flashing
|
||||
DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
|
||||
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
|
||||
|
||||
# UF2 settings
|
||||
UF2_FAMILY ?= STM32F1
|
||||
endif
|
||||
|
||||
ifneq ($(findstring STM32F303, $(MCU)),)
|
||||
|
@ -238,6 +247,9 @@ ifneq ($(findstring STM32F303, $(MCU)),)
|
|||
# Options to pass to dfu-util when flashing
|
||||
DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
|
||||
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
|
||||
|
||||
# UF2 settings
|
||||
UF2_FAMILY ?= STM32F3
|
||||
endif
|
||||
|
||||
ifneq ($(findstring STM32F401, $(MCU)),)
|
||||
|
@ -271,6 +283,9 @@ ifneq ($(findstring STM32F401, $(MCU)),)
|
|||
# Options to pass to dfu-util when flashing
|
||||
DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
|
||||
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
|
||||
|
||||
# UF2 settings
|
||||
UF2_FAMILY ?= STM32F4
|
||||
endif
|
||||
|
||||
ifneq ($(findstring STM32F411, $(MCU)),)
|
||||
|
@ -304,6 +319,9 @@ ifneq ($(findstring STM32F411, $(MCU)),)
|
|||
# Options to pass to dfu-util when flashing
|
||||
DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
|
||||
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
|
||||
|
||||
# UF2 settings
|
||||
UF2_FAMILY ?= STM32F4
|
||||
endif
|
||||
|
||||
ifneq ($(findstring STM32G431, $(MCU)),)
|
||||
|
@ -337,6 +355,9 @@ ifneq ($(findstring STM32G431, $(MCU)),)
|
|||
# Options to pass to dfu-util when flashing
|
||||
DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
|
||||
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
|
||||
|
||||
# UF2 settings
|
||||
UF2_FAMILY ?= STM32G4
|
||||
endif
|
||||
|
||||
ifneq ($(findstring STM32G474, $(MCU)),)
|
||||
|
@ -370,6 +391,9 @@ ifneq ($(findstring STM32G474, $(MCU)),)
|
|||
# Options to pass to dfu-util when flashing
|
||||
DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
|
||||
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
|
||||
|
||||
# UF2 settings
|
||||
UF2_FAMILY ?= STM32G4
|
||||
endif
|
||||
|
||||
ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue