Skip to content

Commit

Permalink
combine shared ini fields
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jul 4, 2022
1 parent f37e21f commit a156cf6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 28 deletions.
6 changes: 3 additions & 3 deletions buildroot/share/PlatformIO/scripts/openblt.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

board = env.BoardConfig()
board_keys = board.get("build").keys()
if 'encode_openblt' in board_keys:
if 'encode' in board_keys:
env.AddPostAction(
join("$BUILD_DIR", "${PROGNAME}.bin"),
env.VerboseAction(" ".join([
"$OBJCOPY", "-O", "srec",
"\"$BUILD_DIR/${PROGNAME}.elf\"", "\"" + join("$BUILD_DIR", board.get("build.encode_openblt")) + "\""
]), "Building " + board.get("build.encode_openblt"))
"\"$BUILD_DIR/${PROGNAME}.elf\"", "\"" + join("$BUILD_DIR", board.get("build.encode")) + "\""
]), "Building " + board.get("build.encode"))
)
49 changes: 24 additions & 25 deletions ini/stm32f4.ini
Original file line number Diff line number Diff line change
Expand Up @@ -106,37 +106,35 @@ extra_scripts = ${stm32_variant.extra_scripts}

#
# Anet ET4-MB_V1.x/ET4P-MB_V1.x (STM32F407VGT6 ARM Cortex-M4)
# using davidtgbe's build of OpenBLT bootloader https://github.com/davidtgbe/openblt/releases
#
[env:Anet_ET4_OpenBLT]
[Anet_ET4]
extends = stm32_variant
board = marlin_STM32F407VGT6_CCM
board_build.variant = MARLIN_F4x7Vx
board_build.encode_openblt = firmware.srec
board_build.offset = 0x10000
board_upload.offset_address = 0x08010000
build_flags = ${stm32_variant.build_flags}
-DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
build_unflags = ${stm32_variant.build_unflags}
-DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
extra_scripts = ${stm32_variant.extra_scripts}
buildroot/share/PlatformIO/scripts/openblt.py

#
# Anet ET4-MB_V1.x/ET4P-MB_V1.x (STM32F407VGT6 ARM Cortex-M4)
# using direct flashing with st-link
# Anet ET4 directly flashed via ST-Link
#
[env:Anet_ET4_no_bootloader]
extends = stm32_variant
board = marlin_STM32F407VGT6_CCM
board_build.variant = MARLIN_F4x7Vx
build_flags = ${stm32_variant.build_flags}
-DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED
build_unflags = ${stm32_variant.build_unflags}
-DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483
extends = Anet_ET4
debug_tool = stlink
upload_protocol = stlink

#
# Anet ET4 with OpenBLT from https://github.com/davidtgbe/openblt/releases
#
[env:Anet_ET4_OpenBLT]
extends = Anet_ET4
board_build.encode = firmware.srec
board_build.offset = 0x10000
board_upload.offset_address = 0x08010000
extra_scripts = ${stm32_variant.extra_scripts}
buildroot/share/PlatformIO/scripts/openblt.py

#
# BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
#
Expand Down Expand Up @@ -557,28 +555,29 @@ build_unflags = -DUSBD_USE_CDC

#
# TH3D EZBoard v2.0 (STM32F405RGT6 ARM Cortex-M4)
# direct fashing with st-link
#
[env:TH3D_EZBoard_V2_no_bootloader]
[TH3D_EZBoard_V2]
extends = stm32_variant
board = genericSTM32F405RG
board_build.variant = MARLIN_TH3D_EZBOARD_V2
build_flags = ${stm32_variant.build_flags} -DHSE_VALUE=12000000U -O0

#
# TH3D EZBoard v2.0 directly flashed via ST-Link
#
[env:TH3D_EZBoard_V2_no_bootloader]
extends = TH3D_EZBoard_V2
debug_tool = stlink
upload_protocol = stlink

#
# TH3D EZBoard v2.0 (STM32F405RGT6 ARM Cortex-M4)
# using OpenBLT bootloader from https://github.com/rhapsodyv/OpenBLT-STM32
# TH3D EZBoard v2.0 with OpenBLT from https://github.com/rhapsodyv/OpenBLT-STM32
#
[env:TH3D_EZBoard_V2_OpenBLT]
extends = stm32_variant
board = genericSTM32F405RG
board_build.variant = MARLIN_TH3D_EZBOARD_V2
board_build.encode_openblt = firmware.bin
extends = TH3D_EZBoard_V2
board_build.encode = firmware.bin
board_build.offset = 0xC000
board_upload.offset_address = 0x0800C000
build_flags = ${stm32_variant.build_flags} -DHSE_VALUE=12000000U -O0
extra_scripts = ${stm32_variant.extra_scripts}
buildroot/share/PlatformIO/scripts/openblt.py

Expand Down

0 comments on commit a156cf6

Please sign in to comment.