🔨 Update build scripts

This commit is contained in:
Scott Lahteine
2025-12-23 19:12:37 -06:00
parent 5554ccb52f
commit 652a619549
7 changed files with 148 additions and 121 deletions

View File

@@ -1,56 +1,62 @@
#!/usr/bin/env python
#
# STM32F1/build_flags.py
# Add build_flags for the base STM32F1_maple environment (stm32f1-maple.ini)
#
from __future__ import print_function
import sys
#dynamic build flags for generic compile options
# Dynamic build flags for generic compile options
if __name__ == "__main__":
args = " ".join([ "-std=gnu++14",
"-Os",
"-mcpu=cortex-m3",
"-mthumb",
"-fsigned-char",
"-fno-move-loop-invariants",
"-fno-strict-aliasing",
"-fsingle-precision-constant",
"--specs=nano.specs",
"--specs=nosys.specs",
"-IMarlin/src/HAL/STM32F1",
"-MMD",
"-MP",
"-DTARGET_STM32F1"
])
for i in range(1, len(sys.argv)):
args += " " + sys.argv[i]
print(args)
# extra script for linker options
else:
import pioutil
if pioutil.is_pio_build():
from SCons.Script import DefaultEnvironment
env = DefaultEnvironment()
env.Append(
ARFLAGS=["rcs"],
ASFLAGS=["-x", "assembler-with-cpp"],
CXXFLAGS=[
"-fabi-version=0",
"-fno-use-cxa-atexit",
"-fno-threadsafe-statics"
],
LINKFLAGS=[
# Print these plus the given args when running directly on the command-line
args = [
"-std=gnu++14",
"-Os",
"-mcpu=cortex-m3",
"-ffreestanding",
"-mthumb",
"-fsigned-char",
"-fno-move-loop-invariants",
"-fno-strict-aliasing",
"--specs=nano.specs",
"--specs=nosys.specs",
"-u_printf_float",
],
)
"-MMD", "-MP",
"-IMarlin/src/HAL/STM32F1",
"-DTARGET_STM32F1",
"-DARDUINO_ARCH_STM32",
"-DPLATFORM_M997_SUPPORT"
] + sys.argv[1:]
print(" ".join(args))
else:
# Extra script for stm32f1-maple.ini build_flags
import pioutil
if pioutil.is_pio_build():
pioutil.env.Append(
ARFLAGS=["rcs"],
ASFLAGS=["-x", "assembler-with-cpp"],
CXXFLAGS=[
"-fabi-version=0",
"-fno-use-cxa-atexit",
"-fno-threadsafe-statics"
],
LINKFLAGS=[
"-Os",
"-mcpu=cortex-m3",
"-ffreestanding",
"-mthumb",
"--specs=nano.specs",
"--specs=nosys.specs",
"-u_printf_float",
],
)

View File

@@ -4,15 +4,15 @@
#
import pioutil
if pioutil.is_pio_build():
import struct,uuid,marlin
import struct, uuid, marlin
board = marlin.env.BoardConfig()
board = pioutil.env.BoardConfig()
def calculate_crc(contents, seed):
accumulating_xor_value = seed
for i in range(0, len(contents), 4):
value = struct.unpack('<I', contents[ i : i + 4])[0]
value = struct.unpack("<I", contents[i : i + 4])[0]
accumulating_xor_value = accumulating_xor_value ^ value
return accumulating_xor_value
@@ -29,12 +29,12 @@ if pioutil.is_pio_build():
# This is the block counter
block_number = xor_seed * block_number
#load the xor key from the file
r7 = file_key
# load the xor key from the file
r7 = file_key
for loop_counter in range(0, block_size):
# meant to make sure different bits of the key are used.
xor_seed = int(loop_counter / key_length)
xor_seed = loop_counter // key_length
# IP is a scratch register / R12
ip = loop_counter - (key_length * xor_seed)
@@ -54,10 +54,10 @@ if pioutil.is_pio_build():
# and then with IP
xor_seed = xor_seed ^ ip
#Now store the byte back
# Now store the byte back
r1[loop_counter] = xor_seed & 0xFF
#increment the loop_counter
# increment the loop_counter
loop_counter = loop_counter + 1
def encrypt_file(input, output_file, file_length):
@@ -82,15 +82,15 @@ if pioutil.is_pio_build():
# write the file_key
output_file.write(struct.pack("<I", file_key))
#TODO - how to enforce that the firmware aligns to block boundaries?
block_count = int(len(input_file) / block_size)
print ("Block Count is ", block_count)
# TODO: - how to enforce that the firmware aligns to block boundaries?
block_count = len(input_file) // block_size
print("Block Count is ", block_count)
for block_number in range(0, block_count):
block_offset = (block_number * block_size)
block_offset = block_number * block_size
block_end = block_offset + block_size
block_array = bytearray(input_file[block_offset: block_end])
block_array = bytearray(input_file[block_offset:block_end])
xor_block(block_array, block_array, block_number, block_size, file_key)
for n in range (0, block_size):
for n in range(0, block_size):
input_file[block_offset + n] = block_array[n]
# update the expected CRC value.

View File

@@ -5,17 +5,19 @@
import pioutil
if pioutil.is_pio_build():
Import("env")
env = pioutil.env
cxxflags = [
# "-Wno-incompatible-pointer-types",
# "-Wno-unused-const-variable",
# "-Wno-maybe-uninitialized",
# "-Wno-sign-compare"
# "-Wno-sign-compare",
"-fno-sized-deallocation"
]
if "teensy" not in env["PIOENV"]:
if "teensy" not in env["PIOENV"] and "esp32" not in env["PIOENV"]:
cxxflags += ["-Wno-register"]
env.Append(CXXFLAGS=cxxflags)
env.Append(CFLAGS=["-Wno-implicit-function-declaration"])
#
# Add CPU frequency as a compile time constant instead of a runtime variable
@@ -27,8 +29,8 @@ if pioutil.is_pio_build():
# Useful for JTAG debugging
#
# It will separate release and debug build folders.
# It useful to keep two live versions: a debug version for debugging and another for
# release, for flashing when upload is not done automatically by jlink/stlink.
# This is useful to keep two live versions: a debug version and a release version,
# for flashing when upload is not done automatically by jlink/stlink.
# Without this, PIO needs to recompile everything twice for any small change.
if env.GetBuildType() == "debug" and env.get("UPLOAD_PROTOCOL") not in ["jlink", "stlink", "custom"]:
env["BUILD_DIR"] = "$PROJECT_BUILD_DIR/$PIOENV/debug"

View File

@@ -2,10 +2,11 @@
# pioutil.py
#
from SCons.Script import DefaultEnvironment
env = DefaultEnvironment()
# Make sure 'vscode init' is not the current command
def is_pio_build():
from SCons.Script import DefaultEnvironment
env = DefaultEnvironment()
if "IsCleanTarget" in dir(env) and env.IsCleanTarget(): return False
return not env.IsIntegrationDump()

View File

@@ -30,10 +30,10 @@ extends = env:linux_native
extra_scripts = ${common.extra_scripts}
post:buildroot/share/PlatformIO/scripts/collect-code-tests.py
build_src_filter = ${env:linux_native.build_src_filter} +<tests>
lib_deps = throwtheswitch/Unity@^2.5.2
lib_deps = throwtheswitch/Unity@^2.6.0
test_build_src = true
build_unflags =
build_flags = ${env:linux_native.build_flags} -Werror
build_flags = ${env:linux_native.build_flags} -Werror -DNO_USER_FEEDBACK_WARNING
#
# Native Simulation
@@ -58,7 +58,7 @@ debug_build_flags = -fstack-protector-strong -g -g3 -ggdb
lib_compat_mode = off
build_src_filter = ${common.default_src_filter} +<src/HAL/NATIVE_SIM>
lib_deps = ${common.lib_deps}
MarlinSimUI=https://github.com/p3p/MarlinSimUI/archive/afe7c1c293.zip
MarlinSimUI=https://github.com/p3p/MarlinSimUI/archive/29c11d4f63.zip
Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/c6b319f447.zip
LiquidCrystal=https://github.com/p3p/LiquidCrystal/archive/322fb5fc23.zip
extra_scripts = ${common.extra_scripts}
@@ -81,11 +81,15 @@ build_flags = ${simulator_linux.build_flags} ${simulator_linux.release_flags}
# Simulator for macOS (MacPorts)
#
#
# Use the script buildroot/bin/mac_gcc to prepare your environment.
#
# MacPorts:
# https://www.macports.org/install.php
#
# sudo port install gcc14 glm mesa libsdl2 libsdl2_net
#
# cd /opt/local/bin
# cd $(dirname "$(which port)")
# sudo rm gcc g++ cc ld
# sudo ln -s gcc-mp-14 gcc ; sudo ln -s g++-mp-14 g++ ; sudo ln -s g++ cc
# sudo ln -s ld-classic ld
@@ -99,7 +103,7 @@ build_flags = ${simulator_linux.build_flags} ${simulator_linux.release_flags}
#
# brew install gcc@14 glm mesa sdl2 sdl2_net
#
# cd /opt/homebrew/bin
# cd "$(brew --prefix)/bin"
# sudo rm -f gcc g++ cc
# sudo ln -s gcc-14 gcc ; sudo ln -s g++-14 g++ ; sudo ln -s g++ cc
# cd -
@@ -111,7 +115,7 @@ build_flags = -g2
-DHAS_LIBBSD
-I/opt/local/include
-I/opt/local/include/freetype2
-I/opt/local/include/SDL2/
-I/opt/local/include/SDL2
-L/opt/local/lib
-Wl,-framework,OpenGl
-Wl,-framework,CoreFoundation

View File

@@ -23,7 +23,7 @@
# HAL/STM32F1 Common Environment values
#
[STM32F1_maple]
platform = ststm32@~12.1
platform = ststm32@~15.4.1
board_build.core = maple
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
${common.build_flags} -DARDUINO_ARCH_STM32 -DMAPLE_STM32F1 -DPLATFORM_M997_SUPPORT
@@ -31,13 +31,18 @@ build_unflags = -std=gnu11 -std=gnu++11
build_src_filter = ${common.default_src_filter} +<src/HAL/STM32F1> -<src/HAL/STM32F1/tft>
lib_ignore = SPI, FreeRTOS701, FreeRTOS821
lib_deps = ${common.lib_deps}
SoftwareSerialM
SoftwareSerialM
platform_packages = tool-stm32duino
toolchain-gccarmnoneeabi@1.120301.0 # Otherwise it's GCC 7.2.1
extra_scripts = ${common.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/fix_framework_weakness.py
pre:buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py
buildroot/share/PlatformIO/scripts/custom_board.py
buildroot/share/PlatformIO/scripts/offset_and_rename.py
custom_marlin.HAS_SPI_TFT = build_src_filter=+<src/HAL/STM32F1/tft/tft_spi.cpp>
custom_marlin.HAS_TFT_XPT2046 = build_src_filter=+<src/HAL/STM32F1/tft/xpt2046.cpp>
custom_marlin.HAS_FSMC_TFT = build_src_filter=+<src/HAL/STM32F1/tft/tft_fsmc.cpp>
custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/ccccmagicboy/Adafruit_NeoPixel#meeb_3dp_use
#
# Generic STM32F103RC environment
@@ -61,6 +66,8 @@ monitor_speed = 115200
[env:STM32F103RC_meeb_maple]
extends = env:STM32F103RC_maple
board = marlin_maple_MEEB_3DP
platform_packages = ${env:STM32F103RC_maple.platform_packages}
platformio/tool-dfuutil@~1.11.0
build_flags = ${env:STM32F103RC_maple.build_flags}
-DDEBUG_LEVEL=0
-DSS_TIMER=4
@@ -69,13 +76,13 @@ build_flags = ${env:STM32F103RC_maple.build_flags}
-DUSE_USB_COMPOSITE
-DVECT_TAB_OFFSET=0x2000
-DGENERIC_BOOTLOADER
-DNO_MAPLE_WARNING
board_build.ldscript = STM32F103RC_MEEB_3DP.ld
extra_scripts = ${env:STM32F103RC_maple.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py
lib_deps = ${env:STM32F103RC_maple.lib_deps}
USBComposite for STM32F1@0.91
custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/ccccmagicboy/Adafruit_NeoPixel#meeb_3dp_use
USBComposite for STM32F1@1.0.9
debug_tool = stlink
upload_protocol = dfu
@@ -83,13 +90,13 @@ upload_protocol = dfu
# FYSETC STM32F103RC
#
[env:STM32F103RC_fysetc_maple]
extends = env:STM32F103RC_maple
extra_scripts = ${env:STM32F103RC_maple.extra_scripts}
buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
build_flags = ${env:STM32F103RC_maple.build_flags} -DDEBUG_LEVEL=0
lib_ldf_mode = chain
debug_tool = stlink
upload_protocol = serial
extends = env:STM32F103RC_maple
extra_scripts = ${env:STM32F103RC_maple.extra_scripts}
buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
build_flags = ${env:STM32F103RC_maple.build_flags} -DDEBUG_LEVEL=0
lib_ldf_mode = chain
debug_tool = stlink
upload_protocol = serial
#
# BigTreeTech SKR Mini V1.1 / SKR Mini E3 & MZ (STM32F103RCT6 ARM Cortex-M3)
@@ -108,7 +115,7 @@ monitor_speed = 115200
extends = env:STM32F103RC_btt_maple
build_flags = ${env:STM32F103RC_btt_maple.build_flags} -DUSE_USB_COMPOSITE
lib_deps = ${env:STM32F103RC_btt_maple.lib_deps}
USBComposite for STM32F1@0.91
USBComposite for STM32F1@1.0.9
#
# Creality 512K (STM32F103RET6)
@@ -160,7 +167,7 @@ upload_protocol = stlink
extends = env:STM32F103RE_btt_maple
build_flags = ${env:STM32F103RE_btt_maple.build_flags} -DUSE_USB_COMPOSITE
lib_deps = ${env:STM32F103RE_btt_maple.lib_deps}
USBComposite for STM32F1@0.91
USBComposite for STM32F1@1.0.9
#
# Geeetech GTM32 (STM32F103VET6)
@@ -185,7 +192,7 @@ board_build.address = 0x08010000
board_build.rename = project.bin
board_build.ldscript = STM32F103VE_longer.ld
build_flags = ${STM32F1_maple.build_flags}
-DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12
-DMCU_STM32F103VE -DSTM32F1xx -DSERIAL_USB -DU20 -DTS_V12
build_unflags = ${STM32F1_maple.build_unflags}
-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
@@ -236,6 +243,7 @@ board_build.ldscript = mks_robin_pro.ld
#
[env:trigorilla_pro_maple]
extends = env:mks_robin_maple
build_flags = ${env:mks_robin_maple.build_flags} -DSTM32_FLASH_SIZE=512
#
# MKS Robin E3D (STM32F103RCT6) and
@@ -311,14 +319,15 @@ lib_ignore = ${STM32F1_maple.lib_ignore}
# Chitu boards like Tronxy X5s (STM32F103ZET6)
#
[env:chitu_f103_maple]
extends = STM32F1_maple
board = marlin_maple_CHITU_F103
extra_scripts = ${STM32F1_maple.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
buildroot/share/PlatformIO/scripts/chitu_crypt.py
build_flags = ${STM32F1_maple.build_flags} -DSTM32F1xx -DSTM32_XL_DENSITY
build_unflags = ${STM32F1_maple.build_unflags}
-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
extends = STM32F1_maple
board = marlin_maple_CHITU_F103
extra_scripts = ${STM32F1_maple.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
buildroot/share/PlatformIO/scripts/chitu_crypt.py
build_flags = ${STM32F1_maple.build_flags} -DSTM32F1xx -DSTM32_XL_DENSITY -DSTM32_FLASH_SIZE=512
build_unflags = ${STM32F1_maple.build_unflags}
-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
board_build.crypt_chitu = update.cbd
#
# Some Chitu V5 boards have a problem with GPIO init.
@@ -353,8 +362,8 @@ board_upload.maximum_size = 237568
build_flags = ${STM32F1_maple.build_flags}
-D__STM32F1__=1 -DDEBUG_LEVEL=0 -DSS_TIMER=4 -DSERIAL_USB
lib_deps = ${STM32F1_maple.lib_deps}
USBComposite for STM32F1@0.91
lib_ignore = Adafruit NeoPixel, SPI, SailfishLCD, SailfishRGB_LED, SlowSoftI2CMaster, TMCStepper
USBComposite for STM32F1@1.0.9
lib_ignore = Adafruit NeoPixel, SPI, SailfishLCD, SailfishRGB_LED, SlowSoftI2CMaster
[env:STM32F103RC_ZM3E2_USB_maple]
extends = ZONESTAR_ZM3E_maple
@@ -385,6 +394,7 @@ build_flags = ${STM32F1_maple.build_flags}
-DMCU_STM32F103VE -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1
-DDEBUG_LEVEL=DEBUG_NONE -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1
-DSS_TIMER=4
-DNO_MAPLE_WARNING
board_build.variant = MARLIN_F103Vx
board_build.ldscript = eryone_ery32_mini.ld
board_build.address = 0x08004000
@@ -395,7 +405,7 @@ build_unflags = ${STM32F1_maple.build_unflags}
#
[env:GD32F103RET6_sovol_maple]
extends = env:STM32F103RE_maple
build_flags = ${STM32F1_maple.build_flags} -DTEMP_TIMER_CHAN=4
build_flags = ${STM32F1_maple.build_flags} -DTEMP_TIMER_CHAN=4 -DNO_MAPLE_WARNING
board_build.address = 0x08007000
board_build.ldscript = sovol.ld
board_build.rename = firmware-{date}-{time}.bin

View File

@@ -63,15 +63,15 @@ build_flags = ${common_STM32F103RC_variant.build_flags}
board_build.offset = 0x7000
board_upload.offset_address = 0x08007000
[USBD_CDC_MSC]
build_flags = -DUSE_USB_FS -DUSBD_USE_CDC_MSC -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6
build_unflags = -DUSBD_USE_CDC
[env:STM32F103RC_btt_USB]
extends = env:STM32F103RC_btt
platform_packages = ${stm_flash_drive.platform_packages}
build_flags = ${env:STM32F103RC_btt.build_flags}
-DUSE_USB_FS
-DUSBD_IRQ_PRIO=5
-DUSBD_IRQ_SUBPRIO=6
-DUSBD_USE_CDC_MSC
build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC
build_flags = ${env:STM32F103RC_btt.build_flags} ${USBD_CDC_MSC.build_flags}
build_unflags = ${env:STM32F103RC_btt.build_unflags} ${USBD_CDC_MSC.build_unflags}
#
# Panda Pi V2.9 - Standalone (STM32F103RC)
@@ -83,8 +83,8 @@ build_flags = ${common_STM32F103RC_variant.build_flags}
-DTIMER_SERVO=TIM1
board_build.offset = 0x5000
board_upload.offset_address = 0x08005000
lib_deps =
markyue/Panda_SoftMasterI2C@1.0.3
lib_deps = markyue/Panda_SoftMasterI2C@1.0.3
#
# MKS Robin (STM32F103ZET6)
# Uses HAL STM32 to support Marlin UI for TFT screen with optional touch panel
@@ -95,6 +95,7 @@ board = genericSTM32F103ZE
board_build.variant = MARLIN_F103Zx
board_build.encrypt_mks = Robin.bin
board_build.offset = 0x7000
board_build.offset_address = 0x08007000
build_flags = ${stm32_variant.build_flags}
-DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
build_unflags = ${stm32_variant.build_unflags}
@@ -121,8 +122,8 @@ debug_tool = stlink
extends = stm32_variant
board_build.variant = MARLIN_F103Rx
board_build.offset = 0x7000
board_build.rename = firmware-{date}-{time}.bin
board_upload.offset_address = 0x08007000
board_build.rename = firmware-{date}-{time}.bin
build_flags = ${stm32_variant.build_flags}
-DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED
-DSS_TIMER=4 -DTIMER_SERVO=TIM5
@@ -177,6 +178,7 @@ board_upload.offset_address = 0x08010000
extends = env:STM32F103RE_creality
board_build.offset = 0x8000
board_upload.offset_address = 0x08008000
board_build.rename = main_board_{date}_{time}.bin
#
# Creality 256K (STM32F103RC)
@@ -199,7 +201,7 @@ board = genericSTM32F103RC
extends = STM32F103Rx_creality
board = genericSTM32F103VE
board_build.variant = MARLIN_F103Vx
build_flags = ${stm32_variant.build_flags}
build_flags = ${STM32F103Rx_creality.build_flags}
-DSS_TIMER=4 -DTIMER_SERVO=TIM5
-DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
#
@@ -225,10 +227,8 @@ upload_protocol = jlink
[env:STM32F103RE_btt_USB]
extends = env:STM32F103RE_btt
platform_packages = ${stm_flash_drive.platform_packages}
build_flags = ${env:STM32F103RE_btt.build_flags}
-DUSE_USB_FS -DUSBD_IRQ_PRIO=5
-DUSBD_IRQ_SUBPRIO=6 -DUSBD_USE_CDC_MSC
build_unflags = ${env:STM32F103RE_btt.build_unflags} -DUSBD_USE_CDC
build_flags = ${env:STM32F103RE_btt.build_flags} ${USBD_CDC_MSC.build_flags}
build_unflags = ${env:STM32F103RE_btt.build_unflags} ${USBD_CDC_MSC.build_unflags}
#
# Mingda MPX_ARM_MINI
@@ -238,6 +238,7 @@ extends = stm32_variant
board = genericSTM32F103ZE
board_build.variant = MARLIN_F103Zx
board_build.offset = 0x10000
board_build.offset_address = 0x08010000
build_flags = ${stm32_variant.build_flags}
-DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
build_unflags = ${stm32_variant.build_unflags}
@@ -252,7 +253,7 @@ board = malyanm200_f103cb
build_flags = ${common_stm32.build_flags}
-DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB
-DHAL_UART_MODULE_ENABLED
build_src_filter = ${common.default_src_filter} +<src/HAL/STM32> -<src/HAL/STM32/tft>
build_src_filter = ${common_stm32.build_src_filter} +<src/HAL/STM32> -<src/HAL/STM32/tft>
#
# FLYmaker FLY Mini (STM32F103RCT6)
@@ -263,7 +264,7 @@ board = genericSTM32F103RC
board_build.variant = MARLIN_F103Rx
board_build.offset = 0x5000
board_upload.offset_address = 0x08005000
build_flags = ${stm32_variant.build_flags} -DSS_TIMER=4
build_flags = ${stm32_variant.build_flags} -DSS_TIMER=4 -DSTM32_FLASH_SIZE=256
#
# (STM32F103VE_robin)
@@ -361,6 +362,8 @@ board_build.offset = 0xA000
board_upload.offset_address = 0x0800A000
build_flags = ${stm32_variant.build_flags}
-DSTM32F1xx -DSTM32_XL_DENSITY
build_unflags = ${stm32_variant.build_unflags}
-DUSBCON -DUSBD_USE_CDC
extra_scripts = ${stm32_variant.extra_scripts}
buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
@@ -402,7 +405,7 @@ extends = stm32_variant
board = genericSTM32F103ZE
board_build.variant = MARLIN_F103Zx
build_flags = ${stm32_variant.build_flags}
-DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
-DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5 -DSTM32_FLASH_SIZE=512
build_unflags = ${stm32_variant.build_unflags}
-DUSBCON -DUSBD_USE_CDC
@@ -416,6 +419,7 @@ board = genericSTM32F103ZE
board_build.crypt_chitu = update.zw
board_build.variant = MARLIN_F103Zx
board_build.offset = 0x8800
board_build.offset_address = 0x08008800
build_flags = ${stm32_variant.build_flags}
-DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
build_unflags = ${stm32_variant.build_unflags}
@@ -433,8 +437,8 @@ board = genericSTM32F103ZE
board_build.crypt_chitu = update.cbd
board_build.variant = MARLIN_F103Zx
board_build.offset = 0x8800
build_flags = ${stm32_variant.build_flags}
-DSTM32F1xx
board_build.offset_address = 0x08008800
build_flags = ${stm32_variant.build_flags} -DSTM32F1xx -DSTM32_FLASH_SIZE=512
build_unflags = ${stm32_variant.build_unflags}
extra_scripts = ${stm32_variant.extra_scripts}
buildroot/share/PlatformIO/scripts/chitu_crypt.py
@@ -457,13 +461,13 @@ build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX
[ZONESTAR_ZM3E]
extends = stm32_variant
platform_packages = ${stm_flash_drive.platform_packages}
board_upload.offset_address = 0x08005000
board_build.offset = 0x5000
board_upload.offset_address = 0x08005000
board_upload.maximum_size = 237568
extra_scripts = ${stm32_variant.extra_scripts}
build_flags = ${common_stm32.build_flags}
-DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DUSE_USB_FS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 -DUSBD_USE_CDC_MSC
build_unflags = ${stm32_variant.build_unflags} -DUSBD_USE_CDC
build_flags = ${stm32_variant.build_flags} ${USBD_CDC_MSC.build_flags}
-DSS_TIMER=4 -DTIMER_SERVO=TIM5
build_unflags = ${stm32_variant.build_unflags} ${USBD_CDC_MSC.build_unflags}
[env:STM32F103RC_ZM3E2_USB]
extends = ZONESTAR_ZM3E