diff --git a/boards.txt b/boards.txt index 2b41fa80d7..b883dfc2fc 100644 --- a/boards.txt +++ b/boards.txt @@ -795,6 +795,7 @@ GenF1.build.mcu=cortex-m3 GenF1.build.series=STM32F1xx GenF1.build.cmsis_lib_gcc=arm_cortexM3l_math GenF1.build.extra_flags=-D{build.product_line} {build.enable_usb} {build.xSerial} {build.bootloader_flags} +GenF1.build.openocd_script=openocd.cfg # BLUEPILL_F103C6 board GenF1.menu.pnum.BLUEPILL_F103C6=BluePill F103C6 (32K) @@ -803,6 +804,8 @@ GenF1.menu.pnum.BLUEPILL_F103C6.upload.maximum_data_size=10240 GenF1.menu.pnum.BLUEPILL_F103C6.build.board=BLUEPILL_F103C6 GenF1.menu.pnum.BLUEPILL_F103C6.build.product_line=STM32F103x6 GenF1.menu.pnum.BLUEPILL_F103C6.build.variant=PILL_F103XX +GenF1.menu.pnum.BLUEPILL_F103C6.hid_bootloader=hid-bootloader/F103/low_and_medium_density/hid_generic_pc13.bin +GenF1.menu.pnum.BLUEPILL_F103C6.stm32duino_bootloader=stm32duino-bootloader/generic_boot20_pc13.bin # BLUEPILL_F103C8 board GenF1.menu.pnum.BLUEPILL_F103C8=BluePill F103C8 @@ -811,6 +814,8 @@ GenF1.menu.pnum.BLUEPILL_F103C8.upload.maximum_data_size=20480 GenF1.menu.pnum.BLUEPILL_F103C8.build.board=BLUEPILL_F103C8 GenF1.menu.pnum.BLUEPILL_F103C8.build.product_line=STM32F103xB GenF1.menu.pnum.BLUEPILL_F103C8.build.variant=PILL_F103XX +GenF1.menu.pnum.BLUEPILL_F103C8.hid_bootloader=hid-bootloader/F103/low_and_medium_density/hid_generic_pc13.bin +GenF1.menu.pnum.BLUEPILL_F103C8.stm32duino_bootloader=stm32duino-bootloader/generic_boot20_pc13.bin GenF1.menu.pnum.BLUEPILL_F103C8B=BluePill F103C8 (128k) GenF1.menu.pnum.BLUEPILL_F103C8B.upload.maximum_size=131072 @@ -818,6 +823,8 @@ GenF1.menu.pnum.BLUEPILL_F103C8B.upload.maximum_data_size=20480 GenF1.menu.pnum.BLUEPILL_F103C8B.build.board=BLUEPILL_F103C8 GenF1.menu.pnum.BLUEPILL_F103C8B.build.product_line=STM32F103xB GenF1.menu.pnum.BLUEPILL_F103C8B.build.variant=PILL_F103XX +GenF1.menu.pnum.BLUEPILL_F103C8B.hid_bootloader=hid-bootloader/F103/low_and_medium_density/hid_generic_pc13.bin +GenF1.menu.pnum.BLUEPILL_F103C8B.stm32duino_bootloader=stm32duino-bootloader/generic_boot20_pc13.bin # BLACKPILL_F103C8 board GenF1.menu.pnum.BLACKPILL_F103C8=BlackPill F103C8 @@ -826,6 +833,8 @@ GenF1.menu.pnum.BLACKPILL_F103C8.upload.maximum_data_size=20480 GenF1.menu.pnum.BLACKPILL_F103C8.build.board=BLACKPILL_F103C8 GenF1.menu.pnum.BLACKPILL_F103C8.build.product_line=STM32F103xB GenF1.menu.pnum.BLACKPILL_F103C8.build.variant=PILL_F103XX +GenF1.menu.pnum.BLACKPILL_F103C8.hid_bootloader=hid-bootloader/F103/low_and_medium_density/hid_generic_pc13.bin +GenF1.menu.pnum.BLACKPILL_F103C8.stm32duino_bootloader=stm32duino-bootloader/generic_boot20_pc13.bin GenF1.menu.pnum.BLACKPILL_F103C8B=BlackPill F103C8 (128k) GenF1.menu.pnum.BLACKPILL_F103C8B.upload.maximum_size=131072 @@ -833,6 +842,8 @@ GenF1.menu.pnum.BLACKPILL_F103C8B.upload.maximum_data_size=20480 GenF1.menu.pnum.BLACKPILL_F103C8B.build.board=BLACKPILL_F103C8 GenF1.menu.pnum.BLACKPILL_F103C8B.build.product_line=STM32F103xB GenF1.menu.pnum.BLACKPILL_F103C8B.build.variant=PILL_F103XX +GenF1.menu.pnum.BLACKPILL_F103C8B.hid_bootloader=hid-bootloader/F103/low_and_medium_density/hid_generic_pc13.bin +GenF1.menu.pnum.BLACKPILL_F103C8B.stm32duino_bootloader=stm32duino-bootloader/generic_boot20_pc13.bin # Generic STM32F103Rx boards (Blue button) GenF1.menu.pnum.Generic_F103R8T6=Generic F103R8T6 (Blue Button) @@ -956,6 +967,7 @@ GenF1.menu.upload_method.hidMethod.upload.protocol=hid22 GenF1.menu.upload_method.hidMethod.upload.tool=hid_upload GenF1.menu.upload_method.hidMethod.build.flash_offset=0x800 GenF1.menu.upload_method.hidMethod.build.bootloader_flags=-DBL_HID -DVECT_TAB_OFFSET={build.flash_offset} +GenF1.menu.upload_method.hidMethod.bootloader.file={hid_bootloader} GenF1.menu.upload_method.dfu2Method=Maple DFU Bootloader 2.0 GenF1.menu.upload_method.dfu2Method.upload.protocol=maple @@ -964,6 +976,7 @@ GenF1.menu.upload_method.dfu2Method.upload.usbID=1EAF:0003 GenF1.menu.upload_method.dfu2Method.upload.altID=2 GenF1.menu.upload_method.dfu2Method.build.flash_offset=0x2000 GenF1.menu.upload_method.dfu2Method.build.bootloader_flags=-DBL_LEGACY_LEAF -DVECT_TAB_OFFSET={build.flash_offset} +GenF1.menu.upload_method.dfu2Method.bootloader.file={stm32duino_bootloader} GenF1.menu.upload_method.dfuoMethod=Maple DFU Bootloader original GenF1.menu.upload_method.dfuoMethod.upload.protocol=maple diff --git a/bootloaders/hid-bootloader/F103/high_density/hid_generic_pa1.bin b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pa1.bin new file mode 100644 index 0000000000..4dbb06b76f Binary files /dev/null and b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pa1.bin differ diff --git a/bootloaders/hid-bootloader/F103/high_density/hid_generic_pa9.bin b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pa9.bin new file mode 100644 index 0000000000..bf01d05307 Binary files /dev/null and b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pa9.bin differ diff --git a/bootloaders/hid-bootloader/F103/high_density/hid_generic_pb0.bin b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pb0.bin new file mode 100644 index 0000000000..bcfbb26c46 Binary files /dev/null and b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pb0.bin differ diff --git a/bootloaders/hid-bootloader/F103/high_density/hid_generic_pb12.bin b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pb12.bin new file mode 100644 index 0000000000..6dd6e8bf42 Binary files /dev/null and b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pb12.bin differ diff --git a/bootloaders/hid-bootloader/F103/high_density/hid_generic_pb7.bin b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pb7.bin new file mode 100644 index 0000000000..56d3d1b56f Binary files /dev/null and b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pb7.bin differ diff --git a/bootloaders/hid-bootloader/F103/high_density/hid_generic_pb9.bin b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pb9.bin new file mode 100644 index 0000000000..c85b96515f Binary files /dev/null and b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pb9.bin differ diff --git a/bootloaders/hid-bootloader/F103/high_density/hid_generic_pc13.bin b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pc13.bin new file mode 100644 index 0000000000..ce17f6c25b Binary files /dev/null and b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pc13.bin differ diff --git a/bootloaders/hid-bootloader/F103/high_density/hid_generic_pd1.bin b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pd1.bin new file mode 100644 index 0000000000..4666df9b9e Binary files /dev/null and b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pd1.bin differ diff --git a/bootloaders/hid-bootloader/F103/high_density/hid_generic_pd2.bin b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pd2.bin new file mode 100644 index 0000000000..e47bf66cc8 Binary files /dev/null and b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pd2.bin differ diff --git a/bootloaders/hid-bootloader/F103/high_density/hid_generic_pe2.bin b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pe2.bin new file mode 100644 index 0000000000..e08d1c3444 Binary files /dev/null and b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pe2.bin differ diff --git a/bootloaders/hid-bootloader/F103/high_density/hid_generic_pe5.bin b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pe5.bin new file mode 100644 index 0000000000..dc3bc7e488 Binary files /dev/null and b/bootloaders/hid-bootloader/F103/high_density/hid_generic_pe5.bin differ diff --git a/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pa1.bin b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pa1.bin new file mode 100644 index 0000000000..ebff7654b8 Binary files /dev/null and b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pa1.bin differ diff --git a/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pa9.bin b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pa9.bin new file mode 100644 index 0000000000..2a0a6200b4 Binary files /dev/null and b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pa9.bin differ diff --git a/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pb0.bin b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pb0.bin new file mode 100644 index 0000000000..cffaa0e4c3 Binary files /dev/null and b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pb0.bin differ diff --git a/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pb12.bin b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pb12.bin new file mode 100644 index 0000000000..5d848000f0 Binary files /dev/null and b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pb12.bin differ diff --git a/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pb7.bin b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pb7.bin new file mode 100644 index 0000000000..eab373bbb1 Binary files /dev/null and b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pb7.bin differ diff --git a/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pb9.bin b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pb9.bin new file mode 100644 index 0000000000..27468661a8 Binary files /dev/null and b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pb9.bin differ diff --git a/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pc13.bin b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pc13.bin new file mode 100644 index 0000000000..fe6cfa281c Binary files /dev/null and b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pc13.bin differ diff --git a/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pd1.bin b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pd1.bin new file mode 100644 index 0000000000..d8da4e0904 Binary files /dev/null and b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pd1.bin differ diff --git a/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pd2.bin b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pd2.bin new file mode 100644 index 0000000000..a114b124e2 Binary files /dev/null and b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pd2.bin differ diff --git a/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pe2.bin b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pe2.bin new file mode 100644 index 0000000000..653586b78d Binary files /dev/null and b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pe2.bin differ diff --git a/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pe5.bin b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pe5.bin new file mode 100644 index 0000000000..375c0b08ac Binary files /dev/null and b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_generic_pe5.bin differ diff --git a/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_maple_mini.bin b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_maple_mini.bin new file mode 100644 index 0000000000..1f2259f467 Binary files /dev/null and b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_maple_mini.bin differ diff --git a/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_mini-stm32v3.bin b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_mini-stm32v3.bin new file mode 100644 index 0000000000..6b5e9a22e3 Binary files /dev/null and b/bootloaders/hid-bootloader/F103/low_and_medium_density/hid_mini-stm32v3.bin differ diff --git a/bootloaders/hid-bootloader/F407/diymroe_stm32f407vgt_pe0.bin b/bootloaders/hid-bootloader/F407/diymroe_stm32f407vgt_pe0.bin new file mode 100644 index 0000000000..19e3095cfb Binary files /dev/null and b/bootloaders/hid-bootloader/F407/diymroe_stm32f407vgt_pe0.bin differ diff --git a/bootloaders/stm32duino-bootloader/cc3d.bin b/bootloaders/stm32duino-bootloader/cc3d.bin new file mode 100755 index 0000000000..67bb88b5ef Binary files /dev/null and b/bootloaders/stm32duino-bootloader/cc3d.bin differ diff --git a/bootloaders/stm32duino-bootloader/dso138_boot20.bin b/bootloaders/stm32duino-bootloader/dso138_boot20.bin new file mode 100644 index 0000000000..8285f15b0e Binary files /dev/null and b/bootloaders/stm32duino-bootloader/dso138_boot20.bin differ diff --git a/bootloaders/stm32duino-bootloader/gd32f1_frankenmaple.bin b/bootloaders/stm32duino-bootloader/gd32f1_frankenmaple.bin new file mode 100644 index 0000000000..9053f681e1 Binary files /dev/null and b/bootloaders/stm32duino-bootloader/gd32f1_frankenmaple.bin differ diff --git a/bootloaders/stm32duino-bootloader/gd32f1_generic_boot20_pc13.bin b/bootloaders/stm32duino-bootloader/gd32f1_generic_boot20_pc13.bin new file mode 100644 index 0000000000..e8b980aec2 Binary files /dev/null and b/bootloaders/stm32duino-bootloader/gd32f1_generic_boot20_pc13.bin differ diff --git a/bootloaders/stm32duino-bootloader/generic-none_bootloader.bin b/bootloaders/stm32duino-bootloader/generic-none_bootloader.bin new file mode 100755 index 0000000000..ddb20716d2 Binary files /dev/null and b/bootloaders/stm32duino-bootloader/generic-none_bootloader.bin differ diff --git a/bootloaders/stm32duino-bootloader/generic_boot20_hytiny.bin b/bootloaders/stm32duino-bootloader/generic_boot20_hytiny.bin new file mode 100644 index 0000000000..a10cc90d9d Binary files /dev/null and b/bootloaders/stm32duino-bootloader/generic_boot20_hytiny.bin differ diff --git a/bootloaders/stm32duino-bootloader/generic_boot20_pa1.bin b/bootloaders/stm32duino-bootloader/generic_boot20_pa1.bin new file mode 100644 index 0000000000..674751ad59 Binary files /dev/null and b/bootloaders/stm32duino-bootloader/generic_boot20_pa1.bin differ diff --git a/bootloaders/stm32duino-bootloader/generic_boot20_pa1_button_pa8.bin b/bootloaders/stm32duino-bootloader/generic_boot20_pa1_button_pa8.bin new file mode 100644 index 0000000000..2f961b19a1 Binary files /dev/null and b/bootloaders/stm32duino-bootloader/generic_boot20_pa1_button_pa8.bin differ diff --git a/bootloaders/stm32duino-bootloader/generic_boot20_pa9.bin b/bootloaders/stm32duino-bootloader/generic_boot20_pa9.bin new file mode 100644 index 0000000000..1a00631267 Binary files /dev/null and b/bootloaders/stm32duino-bootloader/generic_boot20_pa9.bin differ diff --git a/bootloaders/stm32duino-bootloader/generic_boot20_pb0.bin b/bootloaders/stm32duino-bootloader/generic_boot20_pb0.bin new file mode 100644 index 0000000000..4e3e6623c0 Binary files /dev/null and b/bootloaders/stm32duino-bootloader/generic_boot20_pb0.bin differ diff --git a/bootloaders/stm32duino-bootloader/generic_boot20_pb12.bin b/bootloaders/stm32duino-bootloader/generic_boot20_pb12.bin new file mode 100644 index 0000000000..517873716f Binary files /dev/null and b/bootloaders/stm32duino-bootloader/generic_boot20_pb12.bin differ diff --git a/bootloaders/stm32duino-bootloader/generic_boot20_pb7.bin b/bootloaders/stm32duino-bootloader/generic_boot20_pb7.bin new file mode 100644 index 0000000000..62ceb7a897 Binary files /dev/null and b/bootloaders/stm32duino-bootloader/generic_boot20_pb7.bin differ diff --git a/bootloaders/stm32duino-bootloader/generic_boot20_pb9.bin b/bootloaders/stm32duino-bootloader/generic_boot20_pb9.bin new file mode 100644 index 0000000000..dab292d4eb Binary files /dev/null and b/bootloaders/stm32duino-bootloader/generic_boot20_pb9.bin differ diff --git a/bootloaders/stm32duino-bootloader/generic_boot20_pc13.bin b/bootloaders/stm32duino-bootloader/generic_boot20_pc13.bin new file mode 100644 index 0000000000..33218e9a12 Binary files /dev/null and b/bootloaders/stm32duino-bootloader/generic_boot20_pc13.bin differ diff --git a/bootloaders/stm32duino-bootloader/generic_boot20_pc13_fastboot.bin b/bootloaders/stm32duino-bootloader/generic_boot20_pc13_fastboot.bin new file mode 100644 index 0000000000..5e788f8144 Binary files /dev/null and b/bootloaders/stm32duino-bootloader/generic_boot20_pc13_fastboot.bin differ diff --git a/bootloaders/stm32duino-bootloader/generic_boot20_pd1.bin b/bootloaders/stm32duino-bootloader/generic_boot20_pd1.bin new file mode 100644 index 0000000000..5639db6913 Binary files /dev/null and b/bootloaders/stm32duino-bootloader/generic_boot20_pd1.bin differ diff --git a/bootloaders/stm32duino-bootloader/generic_boot20_pd2.bin b/bootloaders/stm32duino-bootloader/generic_boot20_pd2.bin new file mode 100644 index 0000000000..3e273a120a Binary files /dev/null and b/bootloaders/stm32duino-bootloader/generic_boot20_pd2.bin differ diff --git a/bootloaders/stm32duino-bootloader/generic_boot20_pe2.bin b/bootloaders/stm32duino-bootloader/generic_boot20_pe2.bin new file mode 100644 index 0000000000..b65e798626 Binary files /dev/null and b/bootloaders/stm32duino-bootloader/generic_boot20_pe2.bin differ diff --git a/bootloaders/stm32duino-bootloader/generic_boot20_pe5.bin b/bootloaders/stm32duino-bootloader/generic_boot20_pe5.bin new file mode 100644 index 0000000000..39728892d6 Binary files /dev/null and b/bootloaders/stm32duino-bootloader/generic_boot20_pe5.bin differ diff --git a/bootloaders/stm32duino-bootloader/generic_boot20_pe5_button_pa0.bin b/bootloaders/stm32duino-bootloader/generic_boot20_pe5_button_pa0.bin new file mode 100644 index 0000000000..d9183db3df Binary files /dev/null and b/bootloaders/stm32duino-bootloader/generic_boot20_pe5_button_pa0.bin differ diff --git a/bootloaders/stm32duino-bootloader/generic_boot20_pg15.bin b/bootloaders/stm32duino-bootloader/generic_boot20_pg15.bin new file mode 100644 index 0000000000..967b245f8a Binary files /dev/null and b/bootloaders/stm32duino-bootloader/generic_boot20_pg15.bin differ diff --git a/bootloaders/stm32duino-bootloader/maple_mini_boot20.bin b/bootloaders/stm32duino-bootloader/maple_mini_boot20.bin new file mode 100644 index 0000000000..33df270b1f Binary files /dev/null and b/bootloaders/stm32duino-bootloader/maple_mini_boot20.bin differ diff --git a/bootloaders/stm32duino-bootloader/maple_rev3_boot20.bin b/bootloaders/stm32duino-bootloader/maple_rev3_boot20.bin new file mode 100644 index 0000000000..018d93f0e3 Binary files /dev/null and b/bootloaders/stm32duino-bootloader/maple_rev3_boot20.bin differ diff --git a/bootloaders/stm32duino-bootloader/maple_rev5_boot20.bin b/bootloaders/stm32duino-bootloader/maple_rev5_boot20.bin new file mode 100644 index 0000000000..acb9868291 Binary files /dev/null and b/bootloaders/stm32duino-bootloader/maple_rev5_boot20.bin differ diff --git a/bootloaders/stm32duino-bootloader/naze32_boot20.bin b/bootloaders/stm32duino-bootloader/naze32_boot20.bin new file mode 100644 index 0000000000..67bb88b5ef Binary files /dev/null and b/bootloaders/stm32duino-bootloader/naze32_boot20.bin differ diff --git a/bootloaders/stm32duino-bootloader/smart-v2.bin b/bootloaders/stm32duino-bootloader/smart-v2.bin new file mode 100755 index 0000000000..ce07353c0f Binary files /dev/null and b/bootloaders/stm32duino-bootloader/smart-v2.bin differ diff --git a/bootloaders/stm32duino-bootloader/stbee_boot20.bin b/bootloaders/stm32duino-bootloader/stbee_boot20.bin new file mode 100644 index 0000000000..5451713b6a Binary files /dev/null and b/bootloaders/stm32duino-bootloader/stbee_boot20.bin differ diff --git a/platform.txt b/platform.txt index f9109293f1..63dd96dea7 100644 --- a/platform.txt +++ b/platform.txt @@ -155,8 +155,9 @@ recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).* # ------------------- # Upload to board via mass storage -tools.massStorageCopy.cmd=massStorageCopy.sh +tools.massStorageCopy.cmd=massStorageCopy tools.massStorageCopy.cmd.windows=massStorageCopy.bat +tools.massStorageCopy.cmd.macosx=massStorageCopyMacOsX tools.massStorageCopy.path={runtime.tools.STM32Tools.path}/tools/win tools.massStorageCopy.path.macosx={runtime.tools.STM32Tools.path}/tools/macosx tools.massStorageCopy.path.linux={runtime.tools.STM32Tools.path}/tools/linux @@ -166,6 +167,7 @@ tools.massStorageCopy.upload.pattern="{path}/{cmd}" {upload.verbose} -I "{build. # STM32CubeProgrammer upload tools.stm32CubeProg.cmd=stm32CubeProg.sh +tools.stm32CubeProg.cmd.macosx=stm32CubeProg tools.stm32CubeProg.cmd.windows=stm32CubeProg.bat tools.stm32CubeProg.path.linux={runtime.tools.STM32Tools.path}/tools/linux tools.stm32CubeProg.path.macosx={runtime.tools.STM32Tools.path}/tools/macosx @@ -193,7 +195,7 @@ tools.hid_upload.upload.params.quiet=n tools.hid_upload.upload.pattern="{path}/{cmd}" "{build.path}/{build.project_name}.bin" {serial.port.file} # Upload using Maple bootloader over DFU -tools.maple_upload.cmd=maple_upload.sh +tools.maple_upload.cmd=maple_upload tools.maple_upload.cmd.windows=maple_upload.bat tools.maple_upload.path={runtime.tools.STM32Tools.path}/tools/win tools.maple_upload.path.macosx={runtime.tools.STM32Tools.path}/tools/macosx @@ -210,3 +212,34 @@ tools.remoteproc_gen.script=run_arduino_gen.sh tools.remoteproc_gen.upload.params.verbose= tools.remoteproc_gen.upload.params.quiet= tools.remoteproc_gen.upload.pattern="{busybox}" sh "{path}/{script}" generate "{build.path}/{build.project_name}.elf" "{build.path}/run_arduino_{build.project_name}.sh" + +# +# OpenOCD, for upload using programmer +# +tools.openocd.path={runtime.tools.openocd-0.10.0-arduino7.path} +tools.openocd.cmd=bin/openocd +tools.openocd.cmd.windows=bin/openocd.exe +tools.openocd.init_args=-c "telnet_port disabled" -s "{path}/share/openocd/scripts/" +tools.openocd.interface_args=-c "source [find interface/{program.interface}]" +tools.openocd.board_args=-f "{runtime.platform.path}/variants/{build.variant}/{build.openocd_script}" +# This looks up the flash base address and puts it in the flash_base variable +# This uses the flash list command that returns a list of flash banks, +# using lindex to extract the first bank, which is a list of name/value +# pairs, which is transformed to an (associative) array with array set, +# and then the 'base' element is extracted. +tools.openocd.flash_base_args=-c "array set flash_bank [lindex [flash list] 0]; set flash_base $flash_bank(base)" + +tools.openocd.program.params.verbose=-d2 +tools.openocd.program.params.quiet=-d0 +tools.openocd.program.program_args=-c "program {{build.path}/{build.project_name}.elf} verify reset; shutdown" +tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} {init_args} {interface_args} {board_args} {program.program_args} + +# Used for burn bootloader, must exist even if empty +tools.openocd.erase.params.verbose=-d2 +tools.openocd.erase.params.quiet=-d0 +tools.openocd.erase.pattern= + +tools.openocd.bootloader.params.verbose=-d2 +tools.openocd.bootloader.params.quiet=-d0 +tools.openocd.bootloader.program_args={flash_base_args} -c "program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset $flash_base; shutdown" +tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} {init_args} {interface_args} {board_args} {bootloader.program_args} diff --git a/programmers.txt b/programmers.txt index e69de29bb2..d207f02f9d 100644 --- a/programmers.txt +++ b/programmers.txt @@ -0,0 +1,17 @@ +cmsis_dap.name=CMSIS-DAP compatible programmer +cmsis_dap.communication=USB +cmsis_dap.protocol= +cmsis_dap.program.protocol= +cmsis_dap.program.interface=cmsis-dap.cfg +cmsis_dap.program.tool=openocd +cmsis_dap.program.extra_params= +cmsis_dap.bootloader.tool=openocd + +stlink.name=ST-LINK +stlink.communication=USB +stlink.protocol= +stlink.program.protocol= +stlink.program.interface=stlink.cfg +stlink.program.tool=openocd +stlink.program.extra_params= +stlink.bootloader.tool=openocd diff --git a/variants/PILL_F103XX/openocd.cfg b/variants/PILL_F103XX/openocd.cfg new file mode 100644 index 0000000000..0938a078a1 --- /dev/null +++ b/variants/PILL_F103XX/openocd.cfg @@ -0,0 +1 @@ +source [find target/stm32f1x.cfg]