From 0c687c9701893d05c9c977b1bbd347456be9d5ec Mon Sep 17 00:00:00 2001 From: ALTracer <11005378+ALTracer@users.noreply.github.com> Date: Tue, 7 Jan 2025 15:09:18 +0300 Subject: [PATCH 1/3] feat(platform): add BMP upload method to 3rd party boards --- boards.txt | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/boards.txt b/boards.txt index 08b4d3fa7e..494bbfd73a 100644 --- a/boards.txt +++ b/boards.txt @@ -12930,6 +12930,10 @@ GenWL.menu.upload_method.OpenOCDDapLink.upload.tool=openocd_upload 3dprinter.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} 3dprinter.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +3dprinter.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +3dprinter.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +3dprinter.menu.upload_method.bmpMethod.upload.tool=bmp_upload + 3dprinter.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) 3dprinter.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink 3dprinter.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -13006,6 +13010,10 @@ Blues.menu.upload_method.dfuMethod.upload.protocol=dfu Blues.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} Blues.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +Blues.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +Blues.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +Blues.menu.upload_method.bmpMethod.upload.tool=bmp_upload + Blues.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) Blues.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink Blues.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -13060,6 +13068,10 @@ Elecgator.menu.upload_method.dfuMethod.upload.protocol=dfu Elecgator.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} Elecgator.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +Elecgator.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +Elecgator.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +Elecgator.menu.upload_method.bmpMethod.upload.tool=bmp_upload + Elecgator.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) Elecgator.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink Elecgator.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -13130,6 +13142,10 @@ ESC_board.menu.upload_method.dfuMethod.upload.protocol=dfu ESC_board.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} ESC_board.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +ESC_board.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +ESC_board.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +ESC_board.menu.upload_method.bmpMethod.upload.tool=bmp_upload + ESC_board.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) ESC_board.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink ESC_board.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -13378,6 +13394,10 @@ IotContinuum.menu.upload_method.dfuMethod.upload.protocol=dfu IotContinuum.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} IotContinuum.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +IotContinuum.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +IotContinuum.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +IotContinuum.menu.upload_method.bmpMethod.upload.tool=bmp_upload + IotContinuum.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) IotContinuum.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink IotContinuum.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -13558,6 +13578,10 @@ LoRa.menu.upload_method.dfuMethod.upload.protocol=dfu LoRa.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} LoRa.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +LoRa.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +LoRa.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +LoRa.menu.upload_method.bmpMethod.upload.tool=bmp_upload + LoRa.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) LoRa.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink LoRa.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -13621,6 +13645,10 @@ Midatronics.menu.upload_method.dfuMethod.upload.protocol=dfu Midatronics.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} Midatronics.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +Midatronics.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +Midatronics.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +Midatronics.menu.upload_method.bmpMethod.upload.tool=bmp_upload + Midatronics.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) Midatronics.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink Midatronics.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -13700,6 +13728,10 @@ SparkFun.menu.upload_method.dfuMethod.upload.protocol=dfu SparkFun.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} SparkFun.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +SparkFun.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +SparkFun.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +SparkFun.menu.upload_method.bmpMethod.upload.tool=bmp_upload + SparkFun.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) SparkFun.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink SparkFun.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload From eb82540e271974274424e2f1b0058e7fb651dce1 Mon Sep 17 00:00:00 2001 From: ALTracer <11005378+ALTracer@users.noreply.github.com> Date: Tue, 7 Jan 2025 18:56:38 +0300 Subject: [PATCH 2/3] feat(platform): add BMP upload support to ST Nucleo/Disco/Eval boards --- boards.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/boards.txt b/boards.txt index 494bbfd73a..a311f0416d 100644 --- a/boards.txt +++ b/boards.txt @@ -389,6 +389,10 @@ Nucleo_144.menu.upload_method.dfuMethod.upload.protocol=dfu Nucleo_144.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} Nucleo_144.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +Nucleo_144.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +Nucleo_144.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +Nucleo_144.menu.upload_method.bmpMethod.upload.tool=bmp_upload + Nucleo_144.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) Nucleo_144.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink Nucleo_144.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -910,6 +914,10 @@ Nucleo_64.menu.upload_method.dfuMethod.upload.protocol=dfu Nucleo_64.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} Nucleo_64.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +Nucleo_64.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +Nucleo_64.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +Nucleo_64.menu.upload_method.bmpMethod.upload.tool=bmp_upload + Nucleo_64.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) Nucleo_64.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink Nucleo_64.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -1086,6 +1094,10 @@ Nucleo_32.menu.upload_method.dfuMethod.upload.protocol=dfu Nucleo_32.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} Nucleo_32.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +Nucleo_32.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +Nucleo_32.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +Nucleo_32.menu.upload_method.bmpMethod.upload.tool=bmp_upload + Nucleo_32.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) Nucleo_32.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink Nucleo_32.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -1420,6 +1432,10 @@ Disco.menu.upload_method.dfuMethod.upload.protocol=dfu Disco.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} Disco.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +Disco.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +Disco.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +Disco.menu.upload_method.bmpMethod.upload.tool=bmp_upload + Disco.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) Disco.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink Disco.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -1504,6 +1520,10 @@ Eval.menu.upload_method.dfuMethod.upload.protocol=dfu Eval.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} Eval.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +Eval.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +Eval.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +Eval.menu.upload_method.bmpMethod.upload.tool=bmp_upload + Eval.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) Eval.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink Eval.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload From c6b57c0e7c27981e8bd0516465c025c040d9f16d Mon Sep 17 00:00:00 2001 From: ALTracer <11005378+ALTracer@users.noreply.github.com> Date: Tue, 7 Jan 2025 14:52:51 +0300 Subject: [PATCH 3/3] feat(platform): add BMP upload support to Generic boards * Only GenF1, GenF3, GenF4, GenL0 and GenFlight allowed this by now, so extend support to the rest of chip families supported by BMP v2.0 * GenU0 and GenWBA are not supported. --- boards.txt | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/boards.txt b/boards.txt index a311f0416d..714227fc8e 100644 --- a/boards.txt +++ b/boards.txt @@ -1738,6 +1738,10 @@ GenC0.menu.upload_method.serialMethod.upload.protocol=serial GenC0.menu.upload_method.serialMethod.upload.options=-c {serial.port.file} GenC0.menu.upload_method.serialMethod.upload.tool=stm32CubeProg +GenC0.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +GenC0.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +GenC0.menu.upload_method.bmpMethod.upload.tool=bmp_upload + GenC0.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) GenC0.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink GenC0.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -2659,6 +2663,10 @@ GenF0.menu.upload_method.dfuMethod.upload.protocol=dfu GenF0.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} GenF0.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +GenF0.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +GenF0.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +GenF0.menu.upload_method.bmpMethod.upload.tool=bmp_upload + GenF0.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) GenF0.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink GenF0.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -3984,6 +3992,10 @@ GenF2.menu.upload_method.dfuMethod.upload.protocol=dfu GenF2.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} GenF2.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +GenF2.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +GenF2.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +GenF2.menu.upload_method.bmpMethod.upload.tool=bmp_upload + GenF2.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) GenF2.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink GenF2.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -6023,6 +6035,10 @@ GenF7.menu.upload_method.dfuMethod.upload.protocol=dfu GenF7.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} GenF7.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +GenF7.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +GenF7.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +GenF7.menu.upload_method.bmpMethod.upload.tool=bmp_upload + GenF7.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) GenF7.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink GenF7.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -7447,6 +7463,10 @@ GenG0.menu.upload_method.dfuMethod.upload.protocol=dfu GenG0.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} GenG0.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +GenG0.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +GenG0.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +GenG0.menu.upload_method.bmpMethod.upload.tool=bmp_upload + GenG0.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) GenG0.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink GenG0.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -8736,6 +8756,10 @@ GenG4.menu.upload_method.dfuMethod.upload.protocol=dfu GenG4.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} GenG4.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +GenG4.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +GenG4.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +GenG4.menu.upload_method.bmpMethod.upload.tool=bmp_upload + GenG4.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) GenG4.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink GenG4.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -8921,6 +8945,10 @@ GenH5.menu.upload_method.dfuMethod.upload.protocol=dfu GenH5.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} GenH5.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +GenH5.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +GenH5.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +GenH5.menu.upload_method.bmpMethod.upload.tool=bmp_upload + #GenH5.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) #GenH5.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink #GenH5.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -9570,6 +9598,10 @@ GenH7.menu.upload_method.dfuMethod.upload.protocol=dfu GenH7.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} GenH7.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +GenH7.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +GenH7.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +GenH7.menu.upload_method.bmpMethod.upload.tool=bmp_upload + GenH7.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) GenH7.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink GenH7.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -11198,6 +11230,10 @@ GenL1.menu.upload_method.dfuMethod.upload.protocol=dfu GenL1.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} GenL1.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +GenL1.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +GenL1.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +GenL1.menu.upload_method.bmpMethod.upload.tool=bmp_upload + GenL1.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) GenL1.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink GenL1.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -12011,6 +12047,10 @@ GenL4.menu.upload_method.dfuMethod.upload.protocol=dfu GenL4.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} GenL4.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +GenL4.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +GenL4.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +GenL4.menu.upload_method.bmpMethod.upload.tool=bmp_upload + GenL4.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) GenL4.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink GenL4.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -12085,6 +12125,10 @@ GenL5.menu.upload_method.dfuMethod.upload.protocol=dfu GenL5.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} GenL5.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +GenL5.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +GenL5.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +GenL5.menu.upload_method.bmpMethod.upload.tool=bmp_upload + GenL5.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) GenL5.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink GenL5.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -12340,6 +12384,10 @@ GenU5.menu.upload_method.dfuMethod.upload.protocol=dfu GenU5.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} GenU5.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +GenU5.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +GenU5.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +GenU5.menu.upload_method.bmpMethod.upload.tool=bmp_upload + GenU5.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) GenU5.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink GenU5.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -12459,6 +12507,10 @@ GenWB.menu.upload_method.dfuMethod.upload.protocol=dfu GenWB.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} GenWB.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +GenWB.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +GenWB.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +GenWB.menu.upload_method.bmpMethod.upload.tool=bmp_upload + GenWB.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) GenWB.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink GenWB.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload @@ -12706,6 +12758,10 @@ GenWL.menu.upload_method.dfuMethod.upload.protocol=dfu GenWL.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} GenWL.menu.upload_method.dfuMethod.upload.tool=stm32CubeProg +GenWL.menu.upload_method.bmpMethod=BMP (Black Magic Probe) +GenWL.menu.upload_method.bmpMethod.upload.protocol=gdb_bmp +GenWL.menu.upload_method.bmpMethod.upload.tool=bmp_upload + GenWL.menu.upload_method.OpenOCDSTLink=OpenOCD STLink (SWD) GenWL.menu.upload_method.OpenOCDSTLink.upload.protocol=stlink GenWL.menu.upload_method.OpenOCDSTLink.upload.tool=openocd_upload