mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-07-07 23:17:28 -06:00
Rename, clean up boards/variants (#21655)
* Consolidate variant scripts * Rename Marlin-local boards * Simplify variants where possible * Rename variants * CHITU_F103 and MEEB_3DP: Maple platform `platformio-build-stm32f1.py` uses the 'board' name, not 'board_build.variant' so folder names match 'board' and not `board_build.variant`.
This commit is contained in:
parent
69d85cce2d
commit
ee016e605c
167 changed files with 340 additions and 840 deletions
|
@ -1,36 +1,22 @@
|
|||
#
|
||||
# STM32F103VE_longer.py
|
||||
# buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
|
||||
# Customizations for env:STM32F103VE_longer
|
||||
#
|
||||
import os
|
||||
Import("env")
|
||||
|
||||
# Relocate firmware from 0x08000000 to 0x08010000
|
||||
for define in env['CPPDEFINES']:
|
||||
if define[0] == "VECT_TAB_ADDR":
|
||||
env['CPPDEFINES'].remove(define)
|
||||
env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08010000"))
|
||||
|
||||
custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/STM32F103VE_longer.ld")
|
||||
for i, flag in enumerate(env["LINKFLAGS"]):
|
||||
if "-Wl,-T" in flag:
|
||||
env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script
|
||||
elif flag == "-T":
|
||||
env["LINKFLAGS"][i + 1] = custom_ld_script
|
||||
import os,marlin
|
||||
|
||||
# Rename ${PROGNAME}.bin and save it as 'project.bin' (No encryption on the Longer3D)
|
||||
def encrypt(source, target, env):
|
||||
firmware = open(target[0].path, "rb")
|
||||
marlin_alfa = open(target[0].dir.path +'/project.bin', "wb")
|
||||
renamed = open(target[0].dir.path + '/project.bin', "wb")
|
||||
length = os.path.getsize(target[0].path)
|
||||
position = 0
|
||||
try:
|
||||
while position < length:
|
||||
byte = firmware.read(1)
|
||||
marlin_alfa.write(byte)
|
||||
renamed.write(byte)
|
||||
position += 1
|
||||
finally:
|
||||
firmware.close()
|
||||
marlin_alfa.close()
|
||||
renamed.close()
|
||||
|
||||
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt);
|
||||
marlin.add_post_action(encrypt);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue