Skip to content

Commit

Permalink
Add flash mode: STM32CubeProgrammer (#3204)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien-B committed Dec 18, 2023
1 parent e0d188a commit 751edc5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
9 changes: 9 additions & 0 deletions conf/Makefile.stm32-upload
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
16 changes: 16 additions & 0 deletions conf/flash_modes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,22 @@
<board name="holybro_.*"/>
</boards>
</mode>
<mode name="USB CubeProgrammer">
<variable name="FLASH_MODE" value="DFU_CUBE"/>
<boards>
<board name="apogee_.*"/>
<board name="li[s]?a_mx_.*"/>
<board name="elle*"/>
<board name="openpilot_revo.*"/>
<board name="chimera_.*"/>
<board name="tawaki_.*"/>
<board name="crazybee_f4_.*"/>
<board name="crazyflie_.*"/>
<board name="nucleo.*"/>
<board name="matek_.*"/>
<board name="holybro_.*"/>
</boards>
</mode>
<mode name="STLink (SWD)">
<variable name="FLASH_MODE" value="STLINK"/>
<boards>
Expand Down

0 comments on commit 751edc5

Please sign in to comment.