diff --git a/conf/Makefile.stm32-upload b/conf/Makefile.stm32-upload index 35ed7f8a76..68e369451a 100644 --- a/conf/Makefile.stm32-upload +++ b/conf/Makefile.stm32-upload @@ -84,6 +84,15 @@ ifeq ($(VERIFY),1) $(Q)rm -f $(OBJDIR)/verify.bla endif +# +# DFU flash with STM32CubeProgrammer +else ifeq ($(FLASH_MODE),DFU_CUBE) + +CUBE_PROGRAMMER = /usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI + +upload: $(OBJDIR)/$(TARGET).elf + $(CUBE_PROGRAMMER) -c port=usb1 -d $^ + # # serial flash mode else ifeq ($(FLASH_MODE),SERIAL) diff --git a/conf/flash_modes.xml b/conf/flash_modes.xml index a248ca7e56..ea17ba902a 100644 --- a/conf/flash_modes.xml +++ b/conf/flash_modes.xml @@ -36,6 +36,22 @@ + + + + + + + + + + + + + + + +