From fde778217adeacfc64026a4b230f2fbb336c05af Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 20 Apr 2021 00:11:52 -0500 Subject: [PATCH 01/17] Consolidate variant scripts --- .../scripts/STM32F103RC_MEEB_3DP.py | 10 +-- .../scripts/STM32F103RC_SKR_MINI.py | 23 ------- .../PlatformIO/scripts/STM32F103RC_fysetc.py | 15 +---- .../scripts/STM32F103RET6_creality.py | 20 ------ .../scripts/STM32F103RE_SKR_E3_DIP.py | 19 ------ .../PlatformIO/scripts/STM32F103VE_longer.py | 26 ++------ .../share/PlatformIO/scripts/chitu_crypt.py | 24 ++----- .../copy_marlin_variant_to_framework.py | 49 -------------- .../share/PlatformIO/scripts/custom_board.py | 13 ++++ .../PlatformIO/scripts/download_mks_assets.py | 3 +- .../share/PlatformIO/scripts/fly_mini.py | 20 ------ .../scripts/generic_create_variant.py | 59 +++++++++++++---- .../jgaurora_a5s_a1_with_bootloader.py | 51 ++++++-------- buildroot/share/PlatformIO/scripts/lerdge.py | 17 +++-- buildroot/share/PlatformIO/scripts/marlin.py | 66 +++++++++++++++++++ .../share/PlatformIO/scripts/mks_encrypt.py | 44 ++++++------- .../share/PlatformIO/scripts/mks_robin.py | 44 ++----------- .../share/PlatformIO/scripts/mks_robin_e3.py | 45 ++----------- .../share/PlatformIO/scripts/mks_robin_e3p.py | 45 ++----------- .../PlatformIO/scripts/mks_robin_lite.py | 45 ++----------- .../PlatformIO/scripts/mks_robin_lite3.py | 45 ++----------- .../PlatformIO/scripts/mks_robin_mini.py | 45 ++----------- .../PlatformIO/scripts/mks_robin_nano.py | 45 ++----------- .../PlatformIO/scripts/mks_robin_nano35.py | 45 ++----------- .../share/PlatformIO/scripts/mks_robin_pro.py | 44 ++----------- .../PlatformIO/scripts/stm32_bootloader.py | 33 ++++------ ini/avr.ini | 4 +- ini/stm32f1.ini | 19 +++++- ini/stm32f4.ini | 8 ++- 29 files changed, 277 insertions(+), 649 deletions(-) delete mode 100644 buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py delete mode 100644 buildroot/share/PlatformIO/scripts/STM32F103RET6_creality.py delete mode 100644 buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py delete mode 100644 buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py create mode 100644 buildroot/share/PlatformIO/scripts/custom_board.py delete mode 100644 buildroot/share/PlatformIO/scripts/fly_mini.py create mode 100644 buildroot/share/PlatformIO/scripts/marlin.py diff --git a/buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py b/buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py index 6d7f21942e9e..03e121c435d3 100644 --- a/buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py +++ b/buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py @@ -1,5 +1,5 @@ # -# STM32F103RC_MEEB_3DP.py +# buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py # try: import configparser @@ -54,9 +54,5 @@ def after_upload(source, target, env): print('Use the {0:s} address as the marlin app entry point.'.format(vect_tab_addr)) print('Use the {0:d}KB flash version of stm32f103rct6 chip.'.format(flash_size)) -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/STM32F103RC_MEEB_3DP.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 marlin +marlin.custom_ld_script("STM32F103RC_MEEB_3DP.ld") diff --git a/buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py b/buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py deleted file mode 100644 index 7e9dc676b6fb..000000000000 --- a/buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py +++ /dev/null @@ -1,23 +0,0 @@ -# -# STM32F103RC_SKR_MINI.py -# -import os -Import("env") - -STM32_FLASH_SIZE = 256 - -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) - if define[0] == "STM32_FLASH_SIZE": - STM32_FLASH_SIZE = define[1] - -# Relocate firmware from 0x08000000 to 0x08007000 -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/STM32F103RC_SKR_MINI_" + str(STM32_FLASH_SIZE) + "K.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 diff --git a/buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py b/buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py index 1a7cc34edb8f..f64f928787e7 100644 --- a/buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py +++ b/buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py @@ -1,24 +1,11 @@ # -# STM32F103RC_fysetc.py +# buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py # import os from os.path import join from os.path import expandvars Import("env") -# Relocate firmware from 0x08000000 to 0x08008000 -#for define in env['CPPDEFINES']: -# if define[0] == "VECT_TAB_ADDR": -# env['CPPDEFINES'].remove(define) -#env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08008000")) - -#custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/fysetc_stm32f103rc.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 - # Custom HEX from ELF env.AddPostAction( join("$BUILD_DIR","${PROGNAME}.elf"), diff --git a/buildroot/share/PlatformIO/scripts/STM32F103RET6_creality.py b/buildroot/share/PlatformIO/scripts/STM32F103RET6_creality.py deleted file mode 100644 index e3ef98b03ff0..000000000000 --- a/buildroot/share/PlatformIO/scripts/STM32F103RET6_creality.py +++ /dev/null @@ -1,20 +0,0 @@ -# -# STM32F103RET6_creality.py -# -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08007000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) - -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/creality.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 diff --git a/buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py b/buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py deleted file mode 100644 index 06e586f7f807..000000000000 --- a/buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py +++ /dev/null @@ -1,19 +0,0 @@ -# -# STM32F103RE_SKR_E3_DIP.py -# -import os -Import("env") - -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) - -# Relocate firmware from 0x08000000 to 0x08007000 -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/STM32F103RE_SKR_E3_DIP.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 diff --git a/buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py b/buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py index 321dd01b8d9c..c98059729fe8 100644 --- a/buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py +++ b/buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py @@ -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); diff --git a/buildroot/share/PlatformIO/scripts/chitu_crypt.py b/buildroot/share/PlatformIO/scripts/chitu_crypt.py index 3d4854b51f56..f9ff10787220 100644 --- a/buildroot/share/PlatformIO/scripts/chitu_crypt.py +++ b/buildroot/share/PlatformIO/scripts/chitu_crypt.py @@ -1,21 +1,13 @@ # -# chitu_crypt.py +# buildroot/share/PlatformIO/scripts/chitu_crypt.py # Customizations for Chitu boards # -Import("env") -import os,random,struct,uuid +import os,random,struct,uuid,marlin # Relocate firmware from 0x08000000 to 0x08008800 -env['CPPDEFINES'].remove(("VECT_TAB_ADDR", "0x8000000")) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08008800")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/chitu_f103.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 +marlin.relocate_firmware("0x08008800") +marlin.custom_ld_script("chitu_f103.ld") def calculate_crc(contents, seed): accumulating_xor_value = seed; @@ -43,7 +35,7 @@ def xor_block(r0, r1, block_number, block_size, 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 = int(loop_counter / key_length) # IP is a scratch register / R12 ip = loop_counter - (key_length * xor_seed) @@ -69,7 +61,6 @@ def xor_block(r0, r1, block_number, block_size, file_key): #increment the loop_counter loop_counter = loop_counter + 1 - def encrypt_file(input, output_file, file_length): input_file = bytearray(input.read()) block_size = 0x800 @@ -113,11 +104,10 @@ def encrypt_file(input, output_file, file_length): output_file.write(input_file) return - # Encrypt ${PROGNAME}.bin and save it as 'update.cbd' def encrypt(source, target, env): firmware = open(target[0].path, "rb") - update = open(target[0].dir.path +'/update.cbd', "wb") + update = open(target[0].dir.path + '/update.cbd', "wb") length = os.path.getsize(target[0].path) encrypt_file(firmware, update, length) @@ -125,4 +115,4 @@ def encrypt(source, target, env): firmware.close() update.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +marlin.add_post_action(encrypt); diff --git a/buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py b/buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py deleted file mode 100644 index 15c953156caf..000000000000 --- a/buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py +++ /dev/null @@ -1,49 +0,0 @@ -# -# copy_marlin_variant_to_framework.py -# -import os,shutil -from SCons.Script import DefaultEnvironment -from platformio import util -from platformio.package.meta import PackageSpec - -def copytree(src, dst, symlinks=False, ignore=None): - for item in os.listdir(src): - s = os.path.join(src, item) - d = os.path.join(dst, item) - if os.path.isdir(s): - shutil.copytree(s, d, symlinks, ignore) - else: - shutil.copy2(s, d) - -env = DefaultEnvironment() -platform = env.PioPlatform() -board = env.BoardConfig() -variant = board.get("build.variant") - -platform_packages = env.GetProjectOption('platform_packages') -# if there's no framework defined, take it from the class name of platform -framewords = { - "Ststm32Platform": "framework-arduinoststm32", - "AtmelavrPlatform": "framework-arduino-avr" -} -if len(platform_packages) == 0: - platform_name = framewords[platform.__class__.__name__] -else: - platform_name = PackageSpec(platform_packages[0]).name - -FRAMEWORK_DIR = platform.get_package_dir(platform_name) -assert os.path.isdir(FRAMEWORK_DIR) -assert os.path.isdir("buildroot/share/PlatformIO/variants") - -variant_dir = os.path.join(FRAMEWORK_DIR, "variants", variant) - -source_dir = os.path.join("buildroot/share/PlatformIO/variants", variant) -assert os.path.isdir(source_dir) - -if os.path.isdir(variant_dir): - shutil.rmtree(variant_dir) - -if not os.path.isdir(variant_dir): - os.mkdir(variant_dir) - -copytree(source_dir, variant_dir) diff --git a/buildroot/share/PlatformIO/scripts/custom_board.py b/buildroot/share/PlatformIO/scripts/custom_board.py new file mode 100644 index 000000000000..5d3ca3c65214 --- /dev/null +++ b/buildroot/share/PlatformIO/scripts/custom_board.py @@ -0,0 +1,13 @@ +# +# buildroot/share/PlatformIO/scripts/custom_board.py +# +import marlin +board = marlin.env.BoardConfig() + +address = board.get("build.address", "") +if address: + marlin.relocate_firmware(address) + +ldscript = board.get("build.ldscript", "") +if ldscript: + marlin.custom_ld_script(ldscript) diff --git a/buildroot/share/PlatformIO/scripts/download_mks_assets.py b/buildroot/share/PlatformIO/scripts/download_mks_assets.py index 33acab9e12c0..e922fed2be11 100644 --- a/buildroot/share/PlatformIO/scripts/download_mks_assets.py +++ b/buildroot/share/PlatformIO/scripts/download_mks_assets.py @@ -1,5 +1,6 @@ # -# download_mks_assets.py +# buildroot/share/PlatformIO/scripts/download_mks_assets.py +# Added by HAS_TFT_LVGL_UI to download assets from Makerbase repo # Import("env") import os,requests,zipfile,tempfile,shutil diff --git a/buildroot/share/PlatformIO/scripts/fly_mini.py b/buildroot/share/PlatformIO/scripts/fly_mini.py deleted file mode 100644 index 9c5df359ad76..000000000000 --- a/buildroot/share/PlatformIO/scripts/fly_mini.py +++ /dev/null @@ -1,20 +0,0 @@ -# -# fly_mini.py -# Customizations for env:FLY_MINI -# -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08005000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08005000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/fly_mini.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 - diff --git a/buildroot/share/PlatformIO/scripts/generic_create_variant.py b/buildroot/share/PlatformIO/scripts/generic_create_variant.py index aa79d39b5122..7ea5ef022cdc 100644 --- a/buildroot/share/PlatformIO/scripts/generic_create_variant.py +++ b/buildroot/share/PlatformIO/scripts/generic_create_variant.py @@ -1,30 +1,63 @@ # -# Generate a generic variant +# generic_create_variant.py +# +# Copy one of the variants from buildroot/platformio/variants into +# the appropriate framework variants folder, so that its contents +# will be picked up by PlatformIO just like any other variant. # import os,shutil from SCons.Script import DefaultEnvironment from platformio import util env = DefaultEnvironment() + +def copytree(src, dst, symlinks=False, ignore=None): + for item in os.listdir(src): + s = os.path.join(src, item) + d = os.path.join(dst, item) + if os.path.isdir(s): + shutil.copytree(s, d, symlinks, ignore) + else: + shutil.copy2(s, d) + +# +# Get the platform name from the 'platform_packages' option, +# or look it up by the platform.class.name. +# platform = env.PioPlatform() -board = env.BoardConfig() -FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoststm32") +from platformio.package.meta import PackageSpec +platform_packages = env.GetProjectOption('platform_packages') +if len(platform_packages) == 0: + framewords = { + "Ststm32Platform": "framework-arduinoststm32", + "AtmelavrPlatform": "framework-arduino-avr" + } + platform_name = framewords[platform.__class__.__name__] +else: + platform_name = PackageSpec(platform_packages[0]).name + +if platform_name in [ "usb-host-msc", "usb-host-msc-cdc-msc", "tool-stm32duino" ]: + platform_name = "framework-arduinoststm32" + +FRAMEWORK_DIR = platform.get_package_dir(platform_name) assert os.path.isdir(FRAMEWORK_DIR) -assert os.path.isdir("buildroot/share/PlatformIO/variants") -mcu_type = board.get("build.mcu")[:-2] +board = env.BoardConfig() + +#mcu_type = board.get("build.mcu")[:-2] variant = board.get("build.variant") -series = mcu_type[:7].upper() + "xx" +#series = mcu_type[:7].upper() + "xx" + +# Prepare a new empty folder at the destination variant_dir = os.path.join(FRAMEWORK_DIR, "variants", variant) +if os.path.isdir(variant_dir): + shutil.rmtree(variant_dir) +if not os.path.isdir(variant_dir): + os.mkdir(variant_dir) +# Source dir is a local variant sub-folder source_dir = os.path.join("buildroot/share/PlatformIO/variants", variant) assert os.path.isdir(source_dir) -if not os.path.isdir(variant_dir): - os.mkdir(variant_dir) - -for file_name in os.listdir(source_dir): - full_file_name = os.path.join(source_dir, file_name) - if os.path.isfile(full_file_name): - shutil.copy(full_file_name, variant_dir) +copytree(source_dir, variant_dir) diff --git a/buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py b/buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py index 6c8a4f6034c2..a4001a240ca1 100644 --- a/buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py +++ b/buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py @@ -1,30 +1,21 @@ -import os -Import("env") +# +# buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py +# Customizations for env:jgaurora_a5s_a1 +# +import os,marlin -# Relocate firmware from 0x08000000 to 0x0800A000 -env['CPPDEFINES'].remove(("VECT_TAB_ADDR", "0x8000000")) -#alternatively, for STSTM <=5.1.0 use line below -#env['CPPDEFINES'].remove(("VECT_TAB_ADDR", 134217728)) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x0800A000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/jgaurora_a5s_a1.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 - -#append ${PROGNAME}.bin firmware after bootloader and save it as 'jgaurora_firmware.bin' -def addboot(source,target,env): +# Append ${PROGNAME}.bin firmware after bootloader and save it as 'jgaurora_firmware.bin' +def addboot(source, target, env): firmware = open(target[0].path, "rb") lengthfirmware = os.path.getsize(target[0].path) - bootloader_dir = "buildroot/share/PlatformIO/scripts/jgaurora_bootloader.bin" - bootloader = open(bootloader_dir, "rb") - lengthbootloader = os.path.getsize(bootloader_dir) - firmware_with_boothloader_dir = target[0].dir.path +'/firmware_with_bootloader.bin' - if os.path.exists(firmware_with_boothloader_dir): - os.remove(firmware_with_boothloader_dir) - firmwareimage = open(firmware_with_boothloader_dir, "wb") + bootloader_bin = "buildroot/share/PlatformIO/scripts/" + "jgaurora_bootloader.bin" + bootloader = open(bootloader_bin, "rb") + lengthbootloader = os.path.getsize(bootloader_bin) + + firmware_with_boothloader_bin = target[0].dir.path + '/firmware_with_bootloader.bin' + if os.path.exists(firmware_with_boothloader_bin): + os.remove(firmware_with_boothloader_bin) + firmwareimage = open(firmware_with_boothloader_bin, "wb") position = 0 while position < lengthbootloader: byte = bootloader.read(1) @@ -38,11 +29,11 @@ def addboot(source,target,env): bootloader.close() firmware.close() firmwareimage.close() - firmware_without_bootloader_dir = target[0].dir.path+'/firmware_for_sd_upload.bin' - if os.path.exists(firmware_without_bootloader_dir): - os.remove(firmware_without_bootloader_dir) - os.rename(target[0].path, firmware_without_bootloader_dir) - #os.rename(target[0].dir.path+'/firmware_with_bootloader.bin', target[0].dir.path+'/firmware.bin') -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", addboot); + firmware_without_bootloader_bin = target[0].dir.path + '/firmware_for_sd_upload.bin' + if os.path.exists(firmware_without_bootloader_bin): + os.remove(firmware_without_bootloader_bin) + os.rename(target[0].path, firmware_without_bootloader_bin) + #os.rename(target[0].dir.path+'/firmware_with_bootloader.bin', target[0].dir.path+'/firmware.bin') +marlin.add_post_action(addboot); diff --git a/buildroot/share/PlatformIO/scripts/lerdge.py b/buildroot/share/PlatformIO/scripts/lerdge.py index ff4f5e446ba7..19218332f51b 100644 --- a/buildroot/share/PlatformIO/scripts/lerdge.py +++ b/buildroot/share/PlatformIO/scripts/lerdge.py @@ -1,8 +1,11 @@ # -# lerdge.py -# Customizations for Lerdge build environments +# buildroot/share/PlatformIO/scripts/lerdge.py +# Customizations for Lerdge build environments: +# env:LERDGEX env:LERDGEX_usb_flash_drive +# env:LERDGES env:LERDGES_usb_flash_drive +# env:LERDGEK env:LERDGEK_usb_flash_drive # -import os,sys +import os,marlin Import("env") from SCons.Script import DefaultEnvironment @@ -35,16 +38,16 @@ def encrypt_file(input, output_file, file_length): def encrypt(source, target, env): print("Encrypting to:", board.get("build.firmware")) firmware = open(target[0].path, "rb") - result = open(target[0].dir.path + "/" + board.get("build.firmware"), "wb") + renamed = open(target[0].dir.path + "/" + board.get("build.firmware"), "wb") length = os.path.getsize(target[0].path) - encrypt_file(firmware, result, length) + encrypt_file(firmware, renamed, length) firmware.close() - result.close() + renamed.close() if 'firmware' in board.get("build").keys(): - env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); + marlin.add_post_action(encrypt); else: print("You need to define output file via board_build.firmware = 'filename' parameter") exit(1); diff --git a/buildroot/share/PlatformIO/scripts/marlin.py b/buildroot/share/PlatformIO/scripts/marlin.py new file mode 100644 index 000000000000..3e0ca2daefb5 --- /dev/null +++ b/buildroot/share/PlatformIO/scripts/marlin.py @@ -0,0 +1,66 @@ +# +# buildroot/share/PlatformIO/scripts/marlin.py +# Helper module with some commonly-used functions +# +import os + +from SCons.Script import DefaultEnvironment +env = DefaultEnvironment() + +def replace_define(field, value): + for define in env['CPPDEFINES']: + if define[0] == field: + env['CPPDEFINES'].remove(define) + env['CPPDEFINES'].append((field, value)) + +# Relocate the firmware to a new address, such as "0x08005000" +def relocate_firmware(address): + replace_define("VECT_TAB_ADDR", address) + +# Relocate the vector table with a new offset +def relocate_vtab(address): + replace_define("VECT_TAB_OFFSET", address) + +# Replace the existing -Wl,-T with the given ldscript path +def custom_ld_script(ldname): + apath = os.path.abspath("buildroot/share/PlatformIO/ldscripts/" + ldname) + for i, flag in enumerate(env["LINKFLAGS"]): + if "-Wl,-T" in flag: + env["LINKFLAGS"][i] = "-Wl,-T" + apath + elif flag == "-T": + env["LINKFLAGS"][i + 1] = apath + +# Encrypt ${PROGNAME}.bin and save it with a new name +# Called by specific encrypt() functions, mostly for MKS boards +def encrypt_mks(source, target, env, new_name): + import sys + + key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] + + firmware = open(target[0].path, "rb") + renamed = open(target[0].dir.path + "/" + new_name, "wb") + length = os.path.getsize(target[0].path) + position = 0 + try: + while position < length: + byte = firmware.read(1) + if position >= 320 and position < 31040: + byte = chr(ord(byte) ^ key[position & 31]) + if sys.version_info[0] > 2: + byte = bytes(byte, 'latin1') + renamed.write(byte) + position += 1 + finally: + firmware.close() + renamed.close() + +def add_post_action(action): + env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", action); + +# Apply customizations for a MKS Robin +def prepare_robin(address, ldname, fwname): + def encrypt(source, target, env): + encrypt_mks(source, target, env, fwname) + relocate_firmware(address) + custom_ld_script(ldname) + add_post_action(encrypt); diff --git a/buildroot/share/PlatformIO/scripts/mks_encrypt.py b/buildroot/share/PlatformIO/scripts/mks_encrypt.py index 0d53cdfbe934..78d7cf349db9 100644 --- a/buildroot/share/PlatformIO/scripts/mks_encrypt.py +++ b/buildroot/share/PlatformIO/scripts/mks_encrypt.py @@ -1,32 +1,28 @@ -import os,sys +# +# buildroot/share/PlatformIO/scripts/mks_encrypt.py +# +# Apply encryption and save as 'build.firmware' for these environments: +# - env:mks_robin_stm32 +# - env:flsun_hispeedv1 +# - env:mks_robin_nano35_stm32 +# Import("env") from SCons.Script import DefaultEnvironment board = DefaultEnvironment().BoardConfig() -# Encrypt ${PROGNAME}.bin and save it as build.firmware ('Robin.bin') -def encrypt(source, target, env): - key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] +if 'firmware' in board.get("build").keys(): - firmware = open(target[0].path, "rb") - robin = open(target[0].dir.path +'/'+ board.get("build.firmware"), "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - if position >= 320 and position < 31040: - byte = chr(ord(byte) ^ key[position & 31]) - if sys.version_info[0] > 2: - byte = bytes(byte, 'latin1') - robin.write(byte) - position += 1 - finally: - firmware.close() - robin.close() + import marlin + + # Encrypt ${PROGNAME}.bin and save it as build.firmware + def encrypt(source, target, env): + marlin.encrypt_mks(source, target, env, "build.firmware") + + marlin.add_post_action(encrypt); -if 'firmware' in board.get("build").keys(): - env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); else: - print("You need to define output file via board_build.firmware = 'filename' parameter", file=sys.stderr) - exit(1); + + import sys + print("You need to define output file via board_build.firmware = 'filename' parameter", file=sys.stderr) + env.Exit(1); diff --git a/buildroot/share/PlatformIO/scripts/mks_robin.py b/buildroot/share/PlatformIO/scripts/mks_robin.py index dd2342bf0df2..8c5e4ae27665 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin.py @@ -1,39 +1,5 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08007000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/mks_robin.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 - -# Encrypt ${PROGNAME}.bin and save it as 'Robin.bin' -def encrypt(source, target, env): - import sys - - key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] - - firmware = open(target[0].path, "rb") - robin = open(target[0].dir.path +'/Robin.bin', "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - if position >= 320 and position < 31040: - byte = chr(ord(byte) ^ key[position & 31]) - if sys.version_info[0] > 2: - byte = bytes(byte, 'latin1') - robin.write(byte) - position += 1 - finally: - firmware.close() - robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +# +# buildroot/share/PlatformIO/scripts/mks_robin.py +# +import marlin +marlin.prepare_robin("0x08007000", "mks_robin.ld", "Robin.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_e3.py b/buildroot/share/PlatformIO/scripts/mks_robin_e3.py index 3af623cce0d7..7f6f538d6a21 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_e3.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_e3.py @@ -1,40 +1,5 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08005000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08005000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/mks_robin_e3.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 - - -# Encrypt ${PROGNAME}.bin and save it as 'mksLite.bin' -def encrypt(source, target, env): - import sys - - key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] - - firmware = open(target[0].path, "rb") - robin = open(target[0].dir.path +'/Robin_e3.bin', "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - if position >= 320 and position < 31040: - byte = chr(ord(byte) ^ key[position & 31]) - if sys.version_info[0] > 2: - byte = bytes(byte, 'latin1') - robin.write(byte) - position += 1 - finally: - firmware.close() - robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +# +# buildroot/share/PlatformIO/scripts/mks_robin_e3.py +# +import marlin +marlin.prepare_robin("0x08005000", "mks_robin_e3.ld", "Robin_e3.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_e3p.py b/buildroot/share/PlatformIO/scripts/mks_robin_e3p.py index 2aab14bab788..1f3cacf87336 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_e3p.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_e3p.py @@ -1,40 +1,5 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08007000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/mks_robin_e3p.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 - - -# Encrypt ${PROGNAME}.bin and save it as 'mks_robin_e3p.bin' -def encrypt(source, target, env): - import sys - - key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] - - firmware = open(target[0].path, "rb") - robin = open(target[0].dir.path +'/Robin_e3p.bin', "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - if position >= 320 and position < 31040: - byte = chr(ord(byte) ^ key[position & 31]) - if sys.version_info[0] > 2: - byte = bytes(byte, 'latin1') - robin.write(byte) - position += 1 - finally: - firmware.close() - robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +# +# buildroot/share/PlatformIO/scripts/mks_robin_e3p.py +# +import marlin +marlin.prepare_robin("0x08007000", "mks_robin_e3p.ld", "Robin_e3p.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_lite.py b/buildroot/share/PlatformIO/scripts/mks_robin_lite.py index 2f3ae1fa9a17..b8c039ada88d 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_lite.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_lite.py @@ -1,40 +1,5 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08005000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08005000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/mks_robin_lite.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 - - -# Encrypt ${PROGNAME}.bin and save it as 'mksLite.bin' -def encrypt(source, target, env): - import sys - - key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] - - firmware = open(target[0].path, "rb") - robin = open(target[0].dir.path +'/mksLite.bin', "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - if position >= 320 and position < 31040: - byte = chr(ord(byte) ^ key[position & 31]) - if sys.version_info[0] > 2: - byte = bytes(byte, 'latin1') - robin.write(byte) - position += 1 - finally: - firmware.close() - robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +# +# buildroot/share/PlatformIO/scripts/mks_robin_lite.py +# +import marlin +marlin.prepare_robin("0x08005000", "mks_robin_lite.ld", "mksLite.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_lite3.py b/buildroot/share/PlatformIO/scripts/mks_robin_lite3.py index 67ad442d8212..bea8b80ace6c 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_lite3.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_lite3.py @@ -1,40 +1,5 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08005000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08005000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/mks_robin_lite.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 - - -# Encrypt ${PROGNAME}.bin and save it as 'mksLite.bin' -def encrypt(source, target, env): - import sys - - key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] - - firmware = open(target[0].path, "rb") - robin = open(target[0].dir.path +'/mksLite3.bin', "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - if position >= 320 and position < 31040: - byte = chr(ord(byte) ^ key[position & 31]) - if sys.version_info[0] > 2: - byte = bytes(byte, 'latin1') - robin.write(byte) - position += 1 - finally: - firmware.close() - robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +# +# buildroot/share/PlatformIO/scripts/mks_robin_lite3.py +# +import marlin +marlin.prepare_robin("0x08005000", "mks_robin_lite.ld", "mksLite3.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_mini.py b/buildroot/share/PlatformIO/scripts/mks_robin_mini.py index d38669830158..4c52035965c6 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_mini.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_mini.py @@ -1,40 +1,5 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08007000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/mks_robin_mini.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 - - -# Encrypt ${PROGNAME}.bin and save it as 'Robin_mini.bin' -def encrypt(source, target, env): - import sys - - key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] - - firmware = open(target[0].path, "rb") - robin = open(target[0].dir.path +'/Robin_mini.bin', "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - if position >= 320 and position < 31040: - byte = chr(ord(byte) ^ key[position & 31]) - if sys.version_info[0] > 2: - byte = bytes(byte, 'latin1') - robin.write(byte) - position += 1 - finally: - firmware.close() - robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +# +# buildroot/share/PlatformIO/scripts/mks_robin_mini.py +# +import marlin +marlin.prepare_robin("0x08005000", "mks_robin_mini.ld", "Robin_mini.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_nano.py b/buildroot/share/PlatformIO/scripts/mks_robin_nano.py index a68fd308d443..319b4d498202 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_nano.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_nano.py @@ -1,40 +1,5 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08007000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/mks_robin_nano.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 - - -# Encrypt ${PROGNAME}.bin and save it as 'Robin_nano.bin' -def encrypt(source, target, env): - import sys - - key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] - - firmware = open(target[0].path, "rb") - robin = open(target[0].dir.path +'/Robin_nano.bin', "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - if position >= 320 and position < 31040: - byte = chr(ord(byte) ^ key[position & 31]) - if sys.version_info[0] > 2: - byte = bytes(byte, 'latin1') - robin.write(byte) - position += 1 - finally: - firmware.close() - robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +# +# buildroot/share/PlatformIO/scripts/mks_robin_nano.py +# +import marlin +marlin.prepare_robin("0x08007000", "mks_robin_nano.ld", "Robin_nano.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_nano35.py b/buildroot/share/PlatformIO/scripts/mks_robin_nano35.py index 0047289adfd0..310c3d660667 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_nano35.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_nano35.py @@ -1,40 +1,5 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08007000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/mks_robin_nano.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 - - -# Encrypt ${PROGNAME}.bin and save it as 'Robin_nano35.bin' -def encrypt(source, target, env): - import sys - - key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] - - firmware = open(target[0].path, "rb") - robin = open(target[0].dir.path +'/Robin_nano35.bin', "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - if position >= 320 and position < 31040: - byte = chr(ord(byte) ^ key[position & 31]) - if sys.version_info[0] > 2: - byte = bytes(byte, 'latin1') - robin.write(byte) - position += 1 - finally: - firmware.close() - robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +# +# buildroot/share/PlatformIO/scripts/mks_robin_nano35.py +# +import marlin +marlin.prepare_robin("0x08007000", "mks_robin_nano.ld", "Robin_nano35.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_pro.py b/buildroot/share/PlatformIO/scripts/mks_robin_pro.py index 2ebf1ffb9d74..c624663a330c 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_pro.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_pro.py @@ -1,39 +1,5 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08007000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/mks_robin_pro.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 - -# Encrypt ${PROGNAME}.bin and save it as 'Robin.bin' -def encrypt(source, target, env): - import sys - - key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] - - firmware = open(target[0].path, "rb") - robin = open(target[0].dir.path +'/Robin_pro.bin', "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - if position >= 320 and position < 31040: - byte = chr(ord(byte) ^ key[position & 31]) - if sys.version_info[0] > 2: - byte = bytes(byte, 'latin1') - robin.write(byte) - position += 1 - finally: - firmware.close() - robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +# +# buildroot/share/PlatformIO/scripts/mks_robin_pro.py +# +import marlin +marlin.prepare_robin("0x08007000", "mks_robin_pro.ld", "Robin_pro.bin") diff --git a/buildroot/share/PlatformIO/scripts/stm32_bootloader.py b/buildroot/share/PlatformIO/scripts/stm32_bootloader.py index 1ceff84b8f9a..4e7d2d9c0713 100644 --- a/buildroot/share/PlatformIO/scripts/stm32_bootloader.py +++ b/buildroot/share/PlatformIO/scripts/stm32_bootloader.py @@ -1,7 +1,7 @@ # # stm32_bootloader.py # -import os,sys,shutil +import os,sys,shutil,marlin Import("env") from SCons.Script import DefaultEnvironment @@ -11,35 +11,30 @@ # Copy the firmware.bin file to build.firmware, no encryption # def noencrypt(source, target, env): - firmware = os.path.join(target[0].dir.path, board.get("build.firmware")) - shutil.copy(target[0].path, firmware) + firmware = os.path.join(target[0].dir.path, board.get("build.firmware")) + shutil.copy(target[0].path, firmware) # # For build.offset define LD_FLASH_OFFSET, used by ldscript.ld # if 'offset' in board.get("build").keys(): - LD_FLASH_OFFSET = board.get("build.offset") + LD_FLASH_OFFSET = board.get("build.offset") - # Remove an existing VECT_TAB_OFFSET from CPPDEFINES - for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_OFFSET": - env['CPPDEFINES'].remove(define) + marlin.relocate_vtab(LD_FLASH_OFFSET) - # Replace VECT_TAB_OFFSET with our LD_FLASH_OFFSET - env['CPPDEFINES'].append(("VECT_TAB_OFFSET", LD_FLASH_OFFSET)) + # Get upload.maximum_ram_size (defined by /buildroot/share/PlatformIO/boards/VARIOUS.json) + maximum_ram_size = board.get("upload.maximum_ram_size") - # Get upload.maximum_ram_size (defined by /buildroot/share/PlatformIO/boards/VARIOUS.json) - maximum_ram_size = board.get("upload.maximum_ram_size") - - for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,--defsym=LD_FLASH_OFFSET" in flag: - env["LINKFLAGS"][i] = "-Wl,--defsym=LD_FLASH_OFFSET=" + LD_FLASH_OFFSET - if "-Wl,--defsym=LD_MAX_DATA_SIZE" in flag: - env["LINKFLAGS"][i] = "-Wl,--defsym=LD_MAX_DATA_SIZE=" + str(maximum_ram_size - 40) + for i, flag in enumerate(env["LINKFLAGS"]): + if "-Wl,--defsym=LD_FLASH_OFFSET" in flag: + env["LINKFLAGS"][i] = "-Wl,--defsym=LD_FLASH_OFFSET=" + LD_FLASH_OFFSET + if "-Wl,--defsym=LD_MAX_DATA_SIZE" in flag: + env["LINKFLAGS"][i] = "-Wl,--defsym=LD_MAX_DATA_SIZE=" + str(maximum_ram_size - 40) # # Only copy the file if there's no encrypt # board_keys = board.get("build").keys() if 'firmware' in board_keys and not 'encrypt' in board_keys: - env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", noencrypt) + import marlin + marlin.add_post_action(noencrypt) diff --git a/ini/avr.ini b/ini/avr.ini index 1b208400a35b..55bae6d083ad 100644 --- a/ini/avr.ini +++ b/ini/avr.ini @@ -37,7 +37,7 @@ platform = atmelavr extends = env:mega2560 board_build.variant = megaextendedpins extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py + pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py # # ATmega1280 @@ -54,7 +54,7 @@ board = megaatmega1280 extends = common_avr8 board_build.variant = megaextendedpins extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py + pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py upload_speed = 57600 build_flags = ${common.build_flags} -fno-tree-scev-cprop -fno-split-wide-types -Wl,--relax -mcall-prologues diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index a2954e64cf2b..69c4fb3917a9 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -114,8 +114,10 @@ upload_protocol = serial [env:STM32F103RC_btt] platform = ${common_stm32f1.platform} extends = env:STM32F103RC +board_build.address = 0x08007000 +board_build.ldscript = STM32F103RC_SKR_MINI_256K.ld extra_scripts = ${common_stm32f1.extra_scripts} - buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py + buildroot/share/PlatformIO/scripts/custom_board.py build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4 monitor_speed = 115200 @@ -130,6 +132,7 @@ lib_deps = ${env:STM32F103RC_btt.lib_deps} [env:STM32F103RC_btt_512K] platform = ${common_stm32f1.platform} extends = env:STM32F103RC_btt +board_build.ldscript = STM32F103RC_SKR_MINI_512K.ld board_upload.maximum_size=524288 build_flags = ${env:STM32F103RC_btt.build_flags} -DSTM32_FLASH_SIZE=512 @@ -156,8 +159,10 @@ monitor_speed = 115200 [env:STM32F103RE_btt] platform = ${common_stm32f1.platform} extends = env:STM32F103RE +board_build.address = 0x08007000 +board_build.ldscript = STM32F103RE_SKR_E3_DIP.ld extra_scripts = ${common_stm32f1.extra_scripts} - buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py + buildroot/share/PlatformIO/scripts/custom_board.py build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4 debug_tool = stlink upload_protocol = stlink @@ -190,7 +195,10 @@ upload_protocol = serial platform = ${common_stm32f1.platform} extends = common_stm32f1 board = genericSTM32F103VE +board_build.address = 0x08010000 +board_build.ldscript = STM32F103VE_longer.ld extra_scripts = ${common_stm32f1.extra_scripts} + buildroot/share/PlatformIO/scripts/custom_board.py buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py build_flags = ${common_stm32f1.build_flags} -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12 @@ -330,7 +338,10 @@ extra_scripts = ${common_stm32f1.extra_scripts} platform = ${common_stm32f1.platform} extends = common_stm32f1 board = genericSTM32F103ZE +board_build.address = 0x0800A000 +board_build.ldscript = jgaurora_a5s_a1.ld extra_scripts = ${common_stm32f1.extra_scripts} + buildroot/share/PlatformIO/scripts/custom_board.py buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py build_flags = ${common_stm32f1.build_flags} -DSTM32F1xx -DSTM32_XL_DENSITY @@ -379,9 +390,11 @@ build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX platform = ${env:STM32F103RE.platform} extends = env:STM32F103RE build_flags = ${env:STM32F103RE.build_flags} -DTEMP_TIMER_CHAN=4 +board_build.address = 0x08007000 +board_build.ldscript = creality.ld extra_scripts = ${env:STM32F103RE.extra_scripts} pre:buildroot/share/PlatformIO/scripts/random-bin.py - buildroot/share/PlatformIO/scripts/STM32F103RET6_creality.py + buildroot/share/PlatformIO/scripts/custom_board.py debug_tool = jlink upload_protocol = jlink diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 1678b26d89a1..0c937811d18f 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -75,10 +75,12 @@ extra_scripts = ${common.extra_scripts} platform = ${common_stm32f1.platform} extends = common_stm32f1 board = genericSTM32F103RC +board_build.address = 0x08005000 +board_build.ldscript = fly_mini.ld extra_scripts = ${common_stm32f1.extra_scripts} - buildroot/share/PlatformIO/scripts/fly_mini.py + buildroot/share/PlatformIO/scripts/custom_board.py build_flags = ${common_stm32f1.build_flags} - -DDEBUG_LEVEL=0 -DSS_TIMER=4 + -DDEBUG_LEVEL=0 -DSS_TIMER=4 # # FYSETC S6 (STM32F446VET6 ARM Cortex-M4) @@ -255,7 +257,7 @@ board = LERDGE board_build.offset = 0x10000 board_build.encrypt = Yes extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py + pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py buildroot/share/PlatformIO/scripts/stm32_bootloader.py buildroot/share/PlatformIO/scripts/lerdge.py build_flags = ${common_stm32.build_flags} From 296369feaba03201718f7829707d2cca80e453e5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 18 Apr 2021 21:55:02 -0500 Subject: [PATCH 02/17] Rename Marlin-local boards --- ...igTree_Btt002.json => BigTree_BTT002.json} | 0 .../share/PlatformIO/boards/fysetc_f6.json | 34 ------------------- ...CHITU_F103.json => marlin_CHITU_F103.json} | 0 .../{FLYF407ZG.json => marlin_FLYF407ZG.json} | 0 .../{LERDGE.json => marlin_LERDGE.json} | 0 ...GT6.json => marlin_STM32F407VGT6_CCM.json} | 0 ...90usb1286.json => marlin_at90usb1286.json} | 0 ...T6.json => marlin_blackSTM32F407VET6.json} | 0 ...malyanM200.json => marlin_malyanM200.json} | 0 ...anM200v2.json => marlin_malyanM200v2.json} | 0 ini/avr.ini | 4 +-- ini/stm32f0.ini | 2 +- ini/stm32f1.ini | 4 +-- ini/stm32f4.ini | 16 ++++----- 14 files changed, 13 insertions(+), 47 deletions(-) rename buildroot/share/PlatformIO/boards/{BigTree_Btt002.json => BigTree_BTT002.json} (100%) delete mode 100644 buildroot/share/PlatformIO/boards/fysetc_f6.json rename buildroot/share/PlatformIO/boards/{CHITU_F103.json => marlin_CHITU_F103.json} (100%) rename buildroot/share/PlatformIO/boards/{FLYF407ZG.json => marlin_FLYF407ZG.json} (100%) rename buildroot/share/PlatformIO/boards/{LERDGE.json => marlin_LERDGE.json} (100%) rename buildroot/share/PlatformIO/boards/{genericSTM32F407VGT6.json => marlin_STM32F407VGT6_CCM.json} (100%) rename buildroot/share/PlatformIO/boards/{at90usb1286.json => marlin_at90usb1286.json} (100%) rename buildroot/share/PlatformIO/boards/{blackSTM32F407VET6.json => marlin_blackSTM32F407VET6.json} (100%) rename buildroot/share/PlatformIO/boards/{malyanM200.json => marlin_malyanM200.json} (100%) rename buildroot/share/PlatformIO/boards/{malyanM200v2.json => marlin_malyanM200v2.json} (100%) diff --git a/buildroot/share/PlatformIO/boards/BigTree_Btt002.json b/buildroot/share/PlatformIO/boards/BigTree_BTT002.json similarity index 100% rename from buildroot/share/PlatformIO/boards/BigTree_Btt002.json rename to buildroot/share/PlatformIO/boards/BigTree_BTT002.json diff --git a/buildroot/share/PlatformIO/boards/fysetc_f6.json b/buildroot/share/PlatformIO/boards/fysetc_f6.json deleted file mode 100644 index 2772f73a6539..000000000000 --- a/buildroot/share/PlatformIO/boards/fysetc_f6.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "build": { - "core": "arduino", - "extra_flags": "-DARDUINO_AVR_MEGA2560", - "f_cpu": "16000000L", - "hwids": [ - [ - "0x27b2", - "0x0002" - ] - ], - "mcu": "atmega2560", - "variant": "fysetcf6" - }, - "debug": { - "simavr_target": "atmega2560", - "avr-stub": { - "speed": 115200 - } - }, - "frameworks": [ - "arduino" - ], - "name": "FYSETC F6", - "upload": { - "maximum_ram_size": 8192, - "maximum_size": 258048, - "protocol": "wiring", - "require_upload_port": true, - "speed": 115200 - }, - "url": "https://www.fysetc.com/", - "vendor": "FYSETC" -} diff --git a/buildroot/share/PlatformIO/boards/CHITU_F103.json b/buildroot/share/PlatformIO/boards/marlin_CHITU_F103.json similarity index 100% rename from buildroot/share/PlatformIO/boards/CHITU_F103.json rename to buildroot/share/PlatformIO/boards/marlin_CHITU_F103.json diff --git a/buildroot/share/PlatformIO/boards/FLYF407ZG.json b/buildroot/share/PlatformIO/boards/marlin_FLYF407ZG.json similarity index 100% rename from buildroot/share/PlatformIO/boards/FLYF407ZG.json rename to buildroot/share/PlatformIO/boards/marlin_FLYF407ZG.json diff --git a/buildroot/share/PlatformIO/boards/LERDGE.json b/buildroot/share/PlatformIO/boards/marlin_LERDGE.json similarity index 100% rename from buildroot/share/PlatformIO/boards/LERDGE.json rename to buildroot/share/PlatformIO/boards/marlin_LERDGE.json diff --git a/buildroot/share/PlatformIO/boards/genericSTM32F407VGT6.json b/buildroot/share/PlatformIO/boards/marlin_STM32F407VGT6_CCM.json similarity index 100% rename from buildroot/share/PlatformIO/boards/genericSTM32F407VGT6.json rename to buildroot/share/PlatformIO/boards/marlin_STM32F407VGT6_CCM.json diff --git a/buildroot/share/PlatformIO/boards/at90usb1286.json b/buildroot/share/PlatformIO/boards/marlin_at90usb1286.json similarity index 100% rename from buildroot/share/PlatformIO/boards/at90usb1286.json rename to buildroot/share/PlatformIO/boards/marlin_at90usb1286.json diff --git a/buildroot/share/PlatformIO/boards/blackSTM32F407VET6.json b/buildroot/share/PlatformIO/boards/marlin_blackSTM32F407VET6.json similarity index 100% rename from buildroot/share/PlatformIO/boards/blackSTM32F407VET6.json rename to buildroot/share/PlatformIO/boards/marlin_blackSTM32F407VET6.json diff --git a/buildroot/share/PlatformIO/boards/malyanM200.json b/buildroot/share/PlatformIO/boards/marlin_malyanM200.json similarity index 100% rename from buildroot/share/PlatformIO/boards/malyanM200.json rename to buildroot/share/PlatformIO/boards/marlin_malyanM200.json diff --git a/buildroot/share/PlatformIO/boards/malyanM200v2.json b/buildroot/share/PlatformIO/boards/marlin_malyanM200v2.json similarity index 100% rename from buildroot/share/PlatformIO/boards/malyanM200v2.json rename to buildroot/share/PlatformIO/boards/marlin_malyanM200v2.json diff --git a/ini/avr.ini b/ini/avr.ini index 55bae6d083ad..7b61373ba0ea 100644 --- a/ini/avr.ini +++ b/ini/avr.ini @@ -88,7 +88,7 @@ board = reprap_rambo [env:FYSETC_F6] platform = atmelavr extends = common_avr8 -board = fysetc_f6 +board = fysetc_f6_13 # # Sanguinololu (ATmega644p) @@ -161,7 +161,7 @@ build_flags = ${tuned_1284p.build_flags} [env:at90usb1286_cdc] platform = teensy extends = common_avr8 -board = at90usb1286 +board = marlin_at90usb1286 lib_ignore = ${env:common_avr8.lib_ignore}, Teensy_ADC, NativeEthernet # diff --git a/ini/stm32f0.ini b/ini/stm32f0.ini index 10ac21fc890f..64568e4b4c70 100644 --- a/ini/stm32f0.ini +++ b/ini/stm32f0.ini @@ -25,7 +25,7 @@ [env:STM32F070RB_malyan] platform = ${common_stm32.platform} extends = common_stm32 -board = malyanM200v2 +board = marlin_malyanM200v2 build_flags = ${common_stm32.build_flags} -DHAL_PCD_MODULE_ENABLED -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing -DCUSTOM_STARTUP_FILE diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 69c4fb3917a9..9bfac8b529f8 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -352,7 +352,7 @@ build_flags = ${common_stm32f1.build_flags} [env:STM32F103CB_malyan] platform = ${common_stm32f1.platform} extends = common_stm32f1 -board = malyanM200 +board = marlin_malyanM200 build_flags = ${common_stm32f1.build_flags} -DMCU_STM32F103CB -D__STM32F1__=1 -std=c++1y -DSERIAL_USB -ffunction-sections -fdata-sections -Wl,--gc-sections -DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__ @@ -365,7 +365,7 @@ lib_ignore = ${common_stm32f1.lib_ignore} [env:chitu_f103] platform = ${common_stm32f1.platform} extends = common_stm32f1 -board = CHITU_F103 +board = marlin_CHITU_F103 extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-dependencies.py pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py buildroot/share/PlatformIO/scripts/chitu_crypt.py diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 0c937811d18f..729ad3351773 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -62,14 +62,14 @@ extra_scripts = ${common.extra_scripts} [env:FLYF407ZG] platform = ${common_stm32.platform} extends = common_stm32 -board = FLYF407ZG +board = marlin_FLYF407ZG build_flags = ${common_stm32.build_flags} -DVECT_TAB_OFFSET=0x8000 extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py # -# FLY MINI(stm32f103rct6) +# FLY MINI (STM32F103RCT6) # [env:FLY_MINI] platform = ${common_stm32f1.platform} @@ -83,7 +83,7 @@ build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4 # -# FYSETC S6 (STM32F446VET6 ARM Cortex-M4) +# FYSETC S6 (STM32F446RET6 ARM Cortex-M4) # [env:FYSETC_S6] platform = ${common_stm32.platform} @@ -107,7 +107,7 @@ upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE" [env:STM32F407VE_black] platform = ${common_stm32.platform} extends = common_stm32 -board = blackSTM32F407VET6 +board = marlin_blackSTM32F407VET6 build_flags = ${common_stm32.build_flags} -DARDUINO_BLACK_F407VE -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS @@ -123,7 +123,7 @@ extra_scripts = ${common.extra_scripts} platform = ${common_stm32.platform} extends = common_stm32 build_flags = ${common_stm32.build_flags} -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED -board = genericSTM32F407VGT6 +board = marlin_STM32F407VGT6_CCM board_build.core = stm32 board_build.variant = MARLIN_F4x7Vx board_build.ldscript = ldscript.ld @@ -217,7 +217,7 @@ build_flags = ${stm_flash_drive.build_flags} [env:BIGTREE_BTT002] platform = ${common_stm32.platform} extends = common_stm32 -board = BigTree_Btt002 +board = BigTree_BTT002 build_flags = ${common_stm32.build_flags} -DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000 -DHAVE_HWSERIAL2 @@ -253,7 +253,7 @@ build_flags = ${stm_flash_drive.build_flags} [lerdge_common] platform = ${common_stm32.platform} extends = common_stm32 -board = LERDGE +board = marlin_LERDGE board_build.offset = 0x10000 board_build.encrypt = Yes extra_scripts = ${common.extra_scripts} @@ -379,7 +379,7 @@ build_flags = -DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7 platform = ${common_stm32.platform} extends = common_stm32 build_flags = ${common_stm32.build_flags} ${stm32f4_I2C1.build_flags} -DHAL_PCD_MODULE_ENABLED -DUSBCON -DUSBD_USE_CDC -board = genericSTM32F407VGT6 +board = marlin_STM32F407VGT6_CCM board_build.core = stm32 board_build.variant = MARLIN_F4x7Vx board_build.ldscript = ldscript.ld From 78daeb4b9a18d363a93b8530b19a51d92254e41a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 18 Apr 2021 17:27:00 -0500 Subject: [PATCH 03/17] Simplify LERDGE --- .../{marlin_LERDGE.json => marlin_STM32F407ZGT6.json} | 4 +--- buildroot/share/PlatformIO/scripts/lerdge.py | 7 ------- .../variants/{LERDGE => MARLIN_LERDGE}/PeripheralPins.c | 0 .../variants/{LERDGE => MARLIN_LERDGE}/PinNamesVar.h | 0 .../lerdge.ld => variants/MARLIN_LERDGE/ldscript.ld} | 0 .../variants/{LERDGE => MARLIN_LERDGE}/variant.cpp | 0 .../variants/{LERDGE => MARLIN_LERDGE}/variant.h | 0 ini/stm32f4.ini | 3 ++- 8 files changed, 3 insertions(+), 11 deletions(-) rename buildroot/share/PlatformIO/boards/{marlin_LERDGE.json => marlin_STM32F407ZGT6.json} (94%) rename buildroot/share/PlatformIO/variants/{LERDGE => MARLIN_LERDGE}/PeripheralPins.c (100%) rename buildroot/share/PlatformIO/variants/{LERDGE => MARLIN_LERDGE}/PinNamesVar.h (100%) rename buildroot/share/PlatformIO/{ldscripts/lerdge.ld => variants/MARLIN_LERDGE/ldscript.ld} (100%) rename buildroot/share/PlatformIO/variants/{LERDGE => MARLIN_LERDGE}/variant.cpp (100%) rename buildroot/share/PlatformIO/variants/{LERDGE => MARLIN_LERDGE}/variant.h (100%) diff --git a/buildroot/share/PlatformIO/boards/marlin_LERDGE.json b/buildroot/share/PlatformIO/boards/marlin_STM32F407ZGT6.json similarity index 94% rename from buildroot/share/PlatformIO/boards/marlin_LERDGE.json rename to buildroot/share/PlatformIO/boards/marlin_STM32F407ZGT6.json index 011814a13361..f6c78f8ab33b 100644 --- a/buildroot/share/PlatformIO/boards/marlin_LERDGE.json +++ b/buildroot/share/PlatformIO/boards/marlin_STM32F407ZGT6.json @@ -14,9 +14,7 @@ "0x3748" ] ], - "mcu": "stm32f407zgt6", - "variant": "LERDGE", - "ldscript": "LERDGE.ld" + "mcu": "stm32f407zgt6" }, "debug": { "jlink_device": "STM32F407ZG", diff --git a/buildroot/share/PlatformIO/scripts/lerdge.py b/buildroot/share/PlatformIO/scripts/lerdge.py index 19218332f51b..55f0a65acecf 100644 --- a/buildroot/share/PlatformIO/scripts/lerdge.py +++ b/buildroot/share/PlatformIO/scripts/lerdge.py @@ -11,13 +11,6 @@ from SCons.Script import DefaultEnvironment board = DefaultEnvironment().BoardConfig() -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/lerdge.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 - def encryptByte(byte): byte = 0xFF & ((byte << 6) | (byte >> 2)) i = 0x58 + byte diff --git a/buildroot/share/PlatformIO/variants/LERDGE/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/PeripheralPins.c similarity index 100% rename from buildroot/share/PlatformIO/variants/LERDGE/PeripheralPins.c rename to buildroot/share/PlatformIO/variants/MARLIN_LERDGE/PeripheralPins.c diff --git a/buildroot/share/PlatformIO/variants/LERDGE/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/PinNamesVar.h similarity index 100% rename from buildroot/share/PlatformIO/variants/LERDGE/PinNamesVar.h rename to buildroot/share/PlatformIO/variants/MARLIN_LERDGE/PinNamesVar.h diff --git a/buildroot/share/PlatformIO/ldscripts/lerdge.ld b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/ldscript.ld similarity index 100% rename from buildroot/share/PlatformIO/ldscripts/lerdge.ld rename to buildroot/share/PlatformIO/variants/MARLIN_LERDGE/ldscript.ld diff --git a/buildroot/share/PlatformIO/variants/LERDGE/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/LERDGE/variant.cpp rename to buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.cpp diff --git a/buildroot/share/PlatformIO/variants/LERDGE/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h similarity index 100% rename from buildroot/share/PlatformIO/variants/LERDGE/variant.h rename to buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 729ad3351773..0806cb64e3b8 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -253,7 +253,8 @@ build_flags = ${stm_flash_drive.build_flags} [lerdge_common] platform = ${common_stm32.platform} extends = common_stm32 -board = marlin_LERDGE +board = marlin_STM32F407ZGT6 +board_build.variant = MARLIN_LERDGE board_build.offset = 0x10000 board_build.encrypt = Yes extra_scripts = ${common.extra_scripts} From c612d04f61405ce7cba0a6eefb63c0f740e77d70 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 18 Apr 2021 17:27:40 -0500 Subject: [PATCH 04/17] Simplify FLY407ZG --- .../PlatformIO/boards/marlin_FLYF407ZG.json | 64 ------------------- ini/stm32f4.ini | 12 ++-- 2 files changed, 7 insertions(+), 69 deletions(-) delete mode 100644 buildroot/share/PlatformIO/boards/marlin_FLYF407ZG.json diff --git a/buildroot/share/PlatformIO/boards/marlin_FLYF407ZG.json b/buildroot/share/PlatformIO/boards/marlin_FLYF407ZG.json deleted file mode 100644 index 7e585c5057ca..000000000000 --- a/buildroot/share/PlatformIO/boards/marlin_FLYF407ZG.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "build": { - "core": "stm32", - "cpu": "cortex-m4", - "extra_flags": "-DSTM32F407xx", - "f_cpu": "168000000L", - "hwids": [ - [ - "0x1EAF", - "0x0003" - ], - [ - "0x0483", - "0x3748" - ] - ], - "mcu": "stm32f407zgt6", - "variant": "FLY_F407ZG" - }, - "debug": { - "jlink_device": "STM32F407ZG", - "openocd_target": "stm32f4x", - "svd_path": "STM32F40x.svd", - "tools": { - "stlink": { - "server": { - "arguments": [ - "-f", - "scripts/interface/stlink.cfg", - "-c", - "transport select hla_swd", - "-f", - "scripts/target/stm32f4x.cfg", - "-c", - "reset_config none" - ], - "executable": "bin/openocd", - "package": "tool-openocd" - } - } - } - }, - "frameworks": [ - "arduino", - "stm32cube" - ], - "name": "STM32F407ZGT6(192k RAM. 1024k Flash)", - "upload": { - "disable_flushing": false, - "maximum_ram_size": 196608, - "maximum_size": 1048576, - "protocol": "dfu", - "protocols": [ - "stlink", - "dfu", - "jlink" - ], - "require_upload_port": true, - "use_1200bps_touch": false, - "wait_for_upload_port": false - }, - "url": "https://www.st.com/en/microcontrollers-microprocessors/stm32f407ZG.html", - "vendor": "Generic" -} diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 0806cb64e3b8..94d4aa5d193a 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -60,12 +60,14 @@ extra_scripts = ${common.extra_scripts} # FLYF407ZG # [env:FLYF407ZG] -platform = ${common_stm32.platform} -extends = common_stm32 -board = marlin_FLYF407ZG -build_flags = ${common_stm32.build_flags} +platform = ${common_stm32.platform} +extends = common_stm32 +board = marlin_STM32F407ZGT6 +board_build.variant = FLY_F407ZG +upload_protocol = dfu +build_flags = ${common_stm32.build_flags} -DVECT_TAB_OFFSET=0x8000 -extra_scripts = ${common.extra_scripts} +extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py # From 59125f78c622336ae163331f8890f9e6937c513d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 18 Apr 2021 18:03:00 -0500 Subject: [PATCH 05/17] Simplify Cheetah, STEVAL --- .../share/PlatformIO/boards/STEVAL_STM32F401VE.json | 1 - .../share/PlatformIO/scripts/STM32F401VE_STEVAL.py | 13 ------------- .../share/PlatformIO/scripts/fysetc_cheetah_v20.py | 13 ------------- ini/stm32f4.ini | 2 -- 4 files changed, 29 deletions(-) delete mode 100644 buildroot/share/PlatformIO/scripts/STM32F401VE_STEVAL.py delete mode 100644 buildroot/share/PlatformIO/scripts/fysetc_cheetah_v20.py diff --git a/buildroot/share/PlatformIO/boards/STEVAL_STM32F401VE.json b/buildroot/share/PlatformIO/boards/STEVAL_STM32F401VE.json index bbfb3fdfa508..e70188d647c8 100644 --- a/buildroot/share/PlatformIO/boards/STEVAL_STM32F401VE.json +++ b/buildroot/share/PlatformIO/boards/STEVAL_STM32F401VE.json @@ -14,7 +14,6 @@ "0x3748" ] ], - "ldscript": "stm32f401xe.ld", "mcu": "stm32f401vet6", "variant": "STEVAL_F401VE" }, diff --git a/buildroot/share/PlatformIO/scripts/STM32F401VE_STEVAL.py b/buildroot/share/PlatformIO/scripts/STM32F401VE_STEVAL.py deleted file mode 100644 index ffd5bcd42d25..000000000000 --- a/buildroot/share/PlatformIO/scripts/STM32F401VE_STEVAL.py +++ /dev/null @@ -1,13 +0,0 @@ -# -# STM32F401VE_STEVAL.py -# Customizations for env:STM32F401VE_STEVAL -# -import os -Import("env") - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/variants/STEVAL_F401VE/ldscript.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 diff --git a/buildroot/share/PlatformIO/scripts/fysetc_cheetah_v20.py b/buildroot/share/PlatformIO/scripts/fysetc_cheetah_v20.py deleted file mode 100644 index f36d51f97205..000000000000 --- a/buildroot/share/PlatformIO/scripts/fysetc_cheetah_v20.py +++ /dev/null @@ -1,13 +0,0 @@ -# -# STM32F401VE_STEVAL.py -# Customizations for env:STM32F401VE_STEVAL -# -import os -Import("env") - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/ldscript.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 diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 94d4aa5d193a..2afcb9677862 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -42,7 +42,6 @@ build_flags = ${common_stm32.build_flags} -DDISABLE_GENERIC_SERIALUSB -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py - buildroot/share/PlatformIO/scripts/STM32F401VE_STEVAL.py # # STM32F401RC @@ -54,7 +53,6 @@ board = FYSETC_CHEETAH_V20 build_flags = ${common_stm32.build_flags} -DSTM32F401xC -DVECT_TAB_OFFSET=0xC000 extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py - buildroot/share/PlatformIO/scripts/FYSETC_CHEETAH_V20.py # # FLYF407ZG From cbaa5899250a141b41e45ac005bc56b3ca1d1053 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 24 Apr 2021 02:25:38 -0500 Subject: [PATCH 06/17] Rename megaextendedpins variant --- .../{megaextendedpins => MARLIN_MEGA_EXTENDED}/pins_arduino.h | 0 ini/avr.ini | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename buildroot/share/PlatformIO/variants/{megaextendedpins => MARLIN_MEGA_EXTENDED}/pins_arduino.h (100%) diff --git a/buildroot/share/PlatformIO/variants/megaextendedpins/pins_arduino.h b/buildroot/share/PlatformIO/variants/MARLIN_MEGA_EXTENDED/pins_arduino.h similarity index 100% rename from buildroot/share/PlatformIO/variants/megaextendedpins/pins_arduino.h rename to buildroot/share/PlatformIO/variants/MARLIN_MEGA_EXTENDED/pins_arduino.h diff --git a/ini/avr.ini b/ini/avr.ini index 7b61373ba0ea..cd10f134990a 100644 --- a/ini/avr.ini +++ b/ini/avr.ini @@ -35,7 +35,7 @@ board = megaatmega2560 [env:mega2560ext] platform = atmelavr extends = env:mega2560 -board_build.variant = megaextendedpins +board_build.variant = MARLIN_MEGA_EXTENDED extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py @@ -52,7 +52,7 @@ board = megaatmega1280 # [mega_extended_optimized] extends = common_avr8 -board_build.variant = megaextendedpins +board_build.variant = MARLIN_MEGA_EXTENDED extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py upload_speed = 57600 From 508237f84f99b7c06e9fe89af31e844b460fc692 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 24 Apr 2021 02:17:13 -0500 Subject: [PATCH 07/17] Rename Archim variant --- .../boards/{archim.json => marlin_archim.json} | 2 +- .../variants/{archim => MARLIN_ARCHIM}/.gitignore | 0 .../{archim => MARLIN_ARCHIM}/build_gcc/Makefile | 0 .../{archim => MARLIN_ARCHIM}/build_gcc/debug.mk | 0 .../{archim => MARLIN_ARCHIM}/build_gcc/gcc.mk | 0 .../build_gcc/libvariant_arduino_due_x.mk | 0 .../{archim => MARLIN_ARCHIM}/build_gcc/release.mk | 0 .../debug_scripts/gcc/arduino_due_x_flash.gdb | 0 .../debug_scripts/gcc/arduino_due_x_sram.gdb | 0 .../debug_scripts/iar/arduino_due_flash.mac | 0 .../debug_scripts/iar/arduino_due_sram.mac | 0 .../libsam_sam3x8e_gcc_rel.a | Bin .../libsam_sam3x8e_gcc_rel.a.txt | 0 .../linker_scripts/gcc/flash.ld | 0 .../linker_scripts/gcc/sram.ld | 0 .../linker_scripts/iar/flash.icf | 0 .../linker_scripts/iar/sram.icf | 0 .../{archim => MARLIN_ARCHIM}/pins_arduino.h | 0 .../variants/{archim => MARLIN_ARCHIM}/variant.cpp | 0 .../variants/{archim => MARLIN_ARCHIM}/variant.h | 0 ini/due.ini | 2 +- 21 files changed, 2 insertions(+), 2 deletions(-) rename buildroot/share/PlatformIO/boards/{archim.json => marlin_archim.json} (97%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/.gitignore (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/build_gcc/Makefile (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/build_gcc/debug.mk (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/build_gcc/gcc.mk (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/build_gcc/libvariant_arduino_due_x.mk (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/build_gcc/release.mk (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/debug_scripts/gcc/arduino_due_x_flash.gdb (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/debug_scripts/gcc/arduino_due_x_sram.gdb (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/debug_scripts/iar/arduino_due_flash.mac (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/debug_scripts/iar/arduino_due_sram.mac (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/libsam_sam3x8e_gcc_rel.a (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/libsam_sam3x8e_gcc_rel.a.txt (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/linker_scripts/gcc/flash.ld (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/linker_scripts/gcc/sram.ld (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/linker_scripts/iar/flash.icf (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/linker_scripts/iar/sram.icf (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/pins_arduino.h (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/variant.cpp (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/variant.h (100%) diff --git a/buildroot/share/PlatformIO/boards/archim.json b/buildroot/share/PlatformIO/boards/marlin_archim.json similarity index 97% rename from buildroot/share/PlatformIO/boards/archim.json rename to buildroot/share/PlatformIO/boards/marlin_archim.json index 60035197f2f3..6d78c1f19576 100644 --- a/buildroot/share/PlatformIO/boards/archim.json +++ b/buildroot/share/PlatformIO/boards/marlin_archim.json @@ -21,7 +21,7 @@ "ldscript": "linker_scripts/gcc/flash.ld", "mcu": "at91sam3x8e", "usb_product": "Archim", - "variant": "archim" + "variant": "MARLIN_ARCHIM" }, "connectivity": [ "can" diff --git a/buildroot/share/PlatformIO/variants/archim/.gitignore b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/.gitignore similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/.gitignore rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/.gitignore diff --git a/buildroot/share/PlatformIO/variants/archim/build_gcc/Makefile b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/build_gcc/Makefile similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/build_gcc/Makefile rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/build_gcc/Makefile diff --git a/buildroot/share/PlatformIO/variants/archim/build_gcc/debug.mk b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/build_gcc/debug.mk similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/build_gcc/debug.mk rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/build_gcc/debug.mk diff --git a/buildroot/share/PlatformIO/variants/archim/build_gcc/gcc.mk b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/build_gcc/gcc.mk similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/build_gcc/gcc.mk rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/build_gcc/gcc.mk diff --git a/buildroot/share/PlatformIO/variants/archim/build_gcc/libvariant_arduino_due_x.mk b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/build_gcc/libvariant_arduino_due_x.mk similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/build_gcc/libvariant_arduino_due_x.mk rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/build_gcc/libvariant_arduino_due_x.mk diff --git a/buildroot/share/PlatformIO/variants/archim/build_gcc/release.mk b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/build_gcc/release.mk similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/build_gcc/release.mk rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/build_gcc/release.mk diff --git a/buildroot/share/PlatformIO/variants/archim/debug_scripts/gcc/arduino_due_x_flash.gdb b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/debug_scripts/gcc/arduino_due_x_flash.gdb similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/debug_scripts/gcc/arduino_due_x_flash.gdb rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/debug_scripts/gcc/arduino_due_x_flash.gdb diff --git a/buildroot/share/PlatformIO/variants/archim/debug_scripts/gcc/arduino_due_x_sram.gdb b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/debug_scripts/gcc/arduino_due_x_sram.gdb similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/debug_scripts/gcc/arduino_due_x_sram.gdb rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/debug_scripts/gcc/arduino_due_x_sram.gdb diff --git a/buildroot/share/PlatformIO/variants/archim/debug_scripts/iar/arduino_due_flash.mac b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/debug_scripts/iar/arduino_due_flash.mac similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/debug_scripts/iar/arduino_due_flash.mac rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/debug_scripts/iar/arduino_due_flash.mac diff --git a/buildroot/share/PlatformIO/variants/archim/debug_scripts/iar/arduino_due_sram.mac b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/debug_scripts/iar/arduino_due_sram.mac similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/debug_scripts/iar/arduino_due_sram.mac rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/debug_scripts/iar/arduino_due_sram.mac diff --git a/buildroot/share/PlatformIO/variants/archim/libsam_sam3x8e_gcc_rel.a b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/libsam_sam3x8e_gcc_rel.a similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/libsam_sam3x8e_gcc_rel.a rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/libsam_sam3x8e_gcc_rel.a diff --git a/buildroot/share/PlatformIO/variants/archim/libsam_sam3x8e_gcc_rel.a.txt b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/libsam_sam3x8e_gcc_rel.a.txt similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/libsam_sam3x8e_gcc_rel.a.txt rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/libsam_sam3x8e_gcc_rel.a.txt diff --git a/buildroot/share/PlatformIO/variants/archim/linker_scripts/gcc/flash.ld b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/linker_scripts/gcc/flash.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/linker_scripts/gcc/flash.ld rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/linker_scripts/gcc/flash.ld diff --git a/buildroot/share/PlatformIO/variants/archim/linker_scripts/gcc/sram.ld b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/linker_scripts/gcc/sram.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/linker_scripts/gcc/sram.ld rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/linker_scripts/gcc/sram.ld diff --git a/buildroot/share/PlatformIO/variants/archim/linker_scripts/iar/flash.icf b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/linker_scripts/iar/flash.icf similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/linker_scripts/iar/flash.icf rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/linker_scripts/iar/flash.icf diff --git a/buildroot/share/PlatformIO/variants/archim/linker_scripts/iar/sram.icf b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/linker_scripts/iar/sram.icf similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/linker_scripts/iar/sram.icf rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/linker_scripts/iar/sram.icf diff --git a/buildroot/share/PlatformIO/variants/archim/pins_arduino.h b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/pins_arduino.h similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/pins_arduino.h rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/pins_arduino.h diff --git a/buildroot/share/PlatformIO/variants/archim/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/variant.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/variant.cpp rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/variant.cpp diff --git a/buildroot/share/PlatformIO/variants/archim/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/variant.h similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/variant.h rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/variant.h diff --git a/ini/due.ini b/ini/due.ini index 7abc262eb4f7..9123af8cdc88 100644 --- a/ini/due.ini +++ b/ini/due.ini @@ -31,7 +31,7 @@ board = dueUSB [common_DUE_archim] platform = atmelsam extends = env:DUE -board = archim +board = marlin_archim build_flags = ${common.build_flags} -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSBCON board_build.variants_dir = buildroot/share/PlatformIO/variants/ From a8fe94c024be6fc904bca5262d2597ff231c7561 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 24 Apr 2021 02:29:08 -0500 Subject: [PATCH 08/17] Rename FYSETC_CHEETAH_V20 variant --- .../{FYSETC_CHEETAH_V20.json => marlin_FYSETC_CHEETAH_V20.json} | 2 +- .../PeripheralPins.c | 0 .../PinNamesVar.h | 0 .../hal_conf_custom.h | 0 .../ldscript.ld | 0 .../variant.cpp | 0 .../{FYSETC_CHEETAH_V20 => MARLIN_FYSETC_CHEETAH_V20}/variant.h | 0 ini/stm32f4.ini | 2 +- 8 files changed, 2 insertions(+), 2 deletions(-) rename buildroot/share/PlatformIO/boards/{FYSETC_CHEETAH_V20.json => marlin_FYSETC_CHEETAH_V20.json} (96%) rename buildroot/share/PlatformIO/variants/{FYSETC_CHEETAH_V20 => MARLIN_FYSETC_CHEETAH_V20}/PeripheralPins.c (100%) rename buildroot/share/PlatformIO/variants/{FYSETC_CHEETAH_V20 => MARLIN_FYSETC_CHEETAH_V20}/PinNamesVar.h (100%) rename buildroot/share/PlatformIO/variants/{FYSETC_CHEETAH_V20 => MARLIN_FYSETC_CHEETAH_V20}/hal_conf_custom.h (100%) rename buildroot/share/PlatformIO/variants/{FYSETC_CHEETAH_V20 => MARLIN_FYSETC_CHEETAH_V20}/ldscript.ld (100%) rename buildroot/share/PlatformIO/variants/{FYSETC_CHEETAH_V20 => MARLIN_FYSETC_CHEETAH_V20}/variant.cpp (100%) rename buildroot/share/PlatformIO/variants/{FYSETC_CHEETAH_V20 => MARLIN_FYSETC_CHEETAH_V20}/variant.h (100%) diff --git a/buildroot/share/PlatformIO/boards/FYSETC_CHEETAH_V20.json b/buildroot/share/PlatformIO/boards/marlin_FYSETC_CHEETAH_V20.json similarity index 96% rename from buildroot/share/PlatformIO/boards/FYSETC_CHEETAH_V20.json rename to buildroot/share/PlatformIO/boards/marlin_FYSETC_CHEETAH_V20.json index ff082fdc1f2a..e7b0d28afef9 100644 --- a/buildroot/share/PlatformIO/boards/FYSETC_CHEETAH_V20.json +++ b/buildroot/share/PlatformIO/boards/marlin_FYSETC_CHEETAH_V20.json @@ -16,7 +16,7 @@ ], "ldscript": "stm32f401rc.ld", "mcu": "stm32f401rct6", - "variant": "FYSETC_CHEETAH_V20" + "variant": "MARLIN_FYSETC_CHEETAH_V20" }, "debug": { "jlink_device": "STM32F401RC", diff --git a/buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/PeripheralPins.c similarity index 100% rename from buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/PeripheralPins.c rename to buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/PeripheralPins.c diff --git a/buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/PinNamesVar.h similarity index 100% rename from buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/PinNamesVar.h rename to buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/PinNamesVar.h diff --git a/buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/hal_conf_custom.h b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/hal_conf_custom.h similarity index 100% rename from buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/hal_conf_custom.h rename to buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/hal_conf_custom.h diff --git a/buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/ldscript.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/ldscript.ld rename to buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/ldscript.ld diff --git a/buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/variant.cpp rename to buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.cpp diff --git a/buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h similarity index 100% rename from buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/variant.h rename to buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 2afcb9677862..863012cc4ca5 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -49,7 +49,7 @@ extra_scripts = ${common.extra_scripts} [env:FYSETC_CHEETAH_V20] platform = ${common_stm32.platform} extends = common_stm32 -board = FYSETC_CHEETAH_V20 +board = marlin_FYSETC_CHEETAH_V20 build_flags = ${common_stm32.build_flags} -DSTM32F401xC -DVECT_TAB_OFFSET=0xC000 extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py From 1596684c4e344048a39c38a68c403acb10c7369a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 24 Apr 2021 02:20:58 -0500 Subject: [PATCH 09/17] Rename BIGTREE_GTR_V1 variant --- .../boards/{BigTree_GTR_v1.json => marlin_BigTree_GTR_v1.json} | 2 +- .../{BIGTREE_GTR_V1 => MARLIN_BIGTREE_GTR_V1}/PeripheralPins.c | 0 .../{BIGTREE_GTR_V1 => MARLIN_BIGTREE_GTR_V1}/PinNamesVar.h | 0 .../{BIGTREE_GTR_V1 => MARLIN_BIGTREE_GTR_V1}/hal_conf_extra.h | 0 .../{BIGTREE_GTR_V1 => MARLIN_BIGTREE_GTR_V1}/ldscript.ld | 0 .../{BIGTREE_GTR_V1 => MARLIN_BIGTREE_GTR_V1}/variant.cpp | 0 .../{BIGTREE_GTR_V1 => MARLIN_BIGTREE_GTR_V1}/variant.h | 0 ini/stm32f4.ini | 2 +- 8 files changed, 2 insertions(+), 2 deletions(-) rename buildroot/share/PlatformIO/boards/{BigTree_GTR_v1.json => marlin_BigTree_GTR_v1.json} (96%) rename buildroot/share/PlatformIO/variants/{BIGTREE_GTR_V1 => MARLIN_BIGTREE_GTR_V1}/PeripheralPins.c (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_GTR_V1 => MARLIN_BIGTREE_GTR_V1}/PinNamesVar.h (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_GTR_V1 => MARLIN_BIGTREE_GTR_V1}/hal_conf_extra.h (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_GTR_V1 => MARLIN_BIGTREE_GTR_V1}/ldscript.ld (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_GTR_V1 => MARLIN_BIGTREE_GTR_V1}/variant.cpp (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_GTR_V1 => MARLIN_BIGTREE_GTR_V1}/variant.h (100%) diff --git a/buildroot/share/PlatformIO/boards/BigTree_GTR_v1.json b/buildroot/share/PlatformIO/boards/marlin_BigTree_GTR_v1.json similarity index 96% rename from buildroot/share/PlatformIO/boards/BigTree_GTR_v1.json rename to buildroot/share/PlatformIO/boards/marlin_BigTree_GTR_v1.json index 32236301c347..e311ce3b5278 100644 --- a/buildroot/share/PlatformIO/boards/BigTree_GTR_v1.json +++ b/buildroot/share/PlatformIO/boards/marlin_BigTree_GTR_v1.json @@ -15,7 +15,7 @@ ] ], "mcu": "stm32f407zgt6", - "variant": "BIGTREE_GTR_V1" + "variant": "MARLIN_BIGTREE_GTR_V1" }, "debug": { "jlink_device": "STM32F407ZG", diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/PeripheralPins.c similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/PeripheralPins.c rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/PeripheralPins.c diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/PinNamesVar.h similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/PinNamesVar.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/PinNamesVar.h diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/hal_conf_extra.h similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/hal_conf_extra.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/hal_conf_extra.h diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/ldscript.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/ldscript.ld rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/ldscript.ld diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/variant.cpp rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.cpp diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/variant.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 863012cc4ca5..6a463427e877 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -195,7 +195,7 @@ extra_scripts = ${common.extra_scripts} [env:BIGTREE_GTR_V1_0] platform = ${common_stm32.platform} extends = common_stm32 -board = BigTree_GTR_v1 +board = marlin_BigTree_GTR_v1 extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py build_flags = ${common_stm32.build_flags} From 2bf22aa2c5accdeb5d4d643121b4a7b58b7ae574 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 24 Apr 2021 02:20:01 -0500 Subject: [PATCH 10/17] Rename BTT002 variant --- .../boards/{BigTree_BTT002.json => marlin_BigTree_BTT002.json} | 2 +- .../{BIGTREE_BTT002 => MARLIN_BIGTREE_BTT002}/PeripheralPins.c | 0 .../{BIGTREE_BTT002 => MARLIN_BIGTREE_BTT002}/PinNamesVar.h | 0 .../{BIGTREE_BTT002 => MARLIN_BIGTREE_BTT002}/hal_conf_extra.h | 0 .../{BIGTREE_BTT002 => MARLIN_BIGTREE_BTT002}/ldscript.ld | 0 .../{BIGTREE_BTT002 => MARLIN_BIGTREE_BTT002}/variant.cpp | 0 .../{BIGTREE_BTT002 => MARLIN_BIGTREE_BTT002}/variant.h | 0 ini/stm32f4.ini | 2 +- 8 files changed, 2 insertions(+), 2 deletions(-) rename buildroot/share/PlatformIO/boards/{BigTree_BTT002.json => marlin_BigTree_BTT002.json} (96%) rename buildroot/share/PlatformIO/variants/{BIGTREE_BTT002 => MARLIN_BIGTREE_BTT002}/PeripheralPins.c (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_BTT002 => MARLIN_BIGTREE_BTT002}/PinNamesVar.h (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_BTT002 => MARLIN_BIGTREE_BTT002}/hal_conf_extra.h (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_BTT002 => MARLIN_BIGTREE_BTT002}/ldscript.ld (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_BTT002 => MARLIN_BIGTREE_BTT002}/variant.cpp (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_BTT002 => MARLIN_BIGTREE_BTT002}/variant.h (100%) diff --git a/buildroot/share/PlatformIO/boards/BigTree_BTT002.json b/buildroot/share/PlatformIO/boards/marlin_BigTree_BTT002.json similarity index 96% rename from buildroot/share/PlatformIO/boards/BigTree_BTT002.json rename to buildroot/share/PlatformIO/boards/marlin_BigTree_BTT002.json index d0d092f1eaba..28a79271b89c 100644 --- a/buildroot/share/PlatformIO/boards/BigTree_BTT002.json +++ b/buildroot/share/PlatformIO/boards/marlin_BigTree_BTT002.json @@ -15,7 +15,7 @@ ] ], "mcu": "stm32f407vgt6", - "variant": "BIGTREE_BTT002" + "variant": "MARLIN_BIGTREE_BTT002" }, "debug": { "jlink_device": "STM32F407VG", diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_BTT002/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/PeripheralPins.c similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_BTT002/PeripheralPins.c rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/PeripheralPins.c diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_BTT002/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/PinNamesVar.h similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_BTT002/PinNamesVar.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/PinNamesVar.h diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_BTT002/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/hal_conf_extra.h similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_BTT002/hal_conf_extra.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/hal_conf_extra.h diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_BTT002/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/ldscript.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_BTT002/ldscript.ld rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/ldscript.ld diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_BTT002/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_BTT002/variant.cpp rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.cpp diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_BTT002/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.h similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_BTT002/variant.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.h diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 6a463427e877..7d4efc6702e7 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -217,7 +217,7 @@ build_flags = ${stm_flash_drive.build_flags} [env:BIGTREE_BTT002] platform = ${common_stm32.platform} extends = common_stm32 -board = BigTree_BTT002 +board = marlin_BigTree_BTT002 build_flags = ${common_stm32.build_flags} -DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000 -DHAVE_HWSERIAL2 From 2b4629dd0c9d9622de4649add2b70c153cf68177 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 24 Apr 2021 02:25:00 -0500 Subject: [PATCH 11/17] Rename BTT_SKR_SE_BX variant --- .../boards/{BTT_SKR_SE_BX.json => marlin_BTT_SKR_SE_BX.json} | 2 +- .../{BTT_SKR_SE_BX => MARLIN_BTT_SKR_SE_BX}/PeripheralPins.c | 0 .../{BTT_SKR_SE_BX => MARLIN_BTT_SKR_SE_BX}/PinNamesVar.h | 0 .../{BTT_SKR_SE_BX => MARLIN_BTT_SKR_SE_BX}/hal_conf_extra.h | 0 .../{BTT_SKR_SE_BX => MARLIN_BTT_SKR_SE_BX}/ldscript.ld | 0 .../{BTT_SKR_SE_BX => MARLIN_BTT_SKR_SE_BX}/variant.cpp | 0 .../variants/{BTT_SKR_SE_BX => MARLIN_BTT_SKR_SE_BX}/variant.h | 0 ini/stm32f7.ini | 2 +- 8 files changed, 2 insertions(+), 2 deletions(-) rename buildroot/share/PlatformIO/boards/{BTT_SKR_SE_BX.json => marlin_BTT_SKR_SE_BX.json} (97%) rename buildroot/share/PlatformIO/variants/{BTT_SKR_SE_BX => MARLIN_BTT_SKR_SE_BX}/PeripheralPins.c (100%) rename buildroot/share/PlatformIO/variants/{BTT_SKR_SE_BX => MARLIN_BTT_SKR_SE_BX}/PinNamesVar.h (100%) rename buildroot/share/PlatformIO/variants/{BTT_SKR_SE_BX => MARLIN_BTT_SKR_SE_BX}/hal_conf_extra.h (100%) rename buildroot/share/PlatformIO/variants/{BTT_SKR_SE_BX => MARLIN_BTT_SKR_SE_BX}/ldscript.ld (100%) rename buildroot/share/PlatformIO/variants/{BTT_SKR_SE_BX => MARLIN_BTT_SKR_SE_BX}/variant.cpp (100%) rename buildroot/share/PlatformIO/variants/{BTT_SKR_SE_BX => MARLIN_BTT_SKR_SE_BX}/variant.h (100%) diff --git a/buildroot/share/PlatformIO/boards/BTT_SKR_SE_BX.json b/buildroot/share/PlatformIO/boards/marlin_BTT_SKR_SE_BX.json similarity index 97% rename from buildroot/share/PlatformIO/boards/BTT_SKR_SE_BX.json rename to buildroot/share/PlatformIO/boards/marlin_BTT_SKR_SE_BX.json index 920b2478a940..65735d433b17 100644 --- a/buildroot/share/PlatformIO/boards/BTT_SKR_SE_BX.json +++ b/buildroot/share/PlatformIO/boards/marlin_BTT_SKR_SE_BX.json @@ -5,7 +5,7 @@ "extra_flags": "-DSTM32H743xx", "f_cpu": "400000000L", "mcu": "stm32h743iit6", - "variant": "BTT_SKR_SE_BX" + "variant": "MARLIN_BTT_SKR_SE_BX" }, "debug": { "jlink_device": "STM32H743II", diff --git a/buildroot/share/PlatformIO/variants/BTT_SKR_SE_BX/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/PeripheralPins.c similarity index 100% rename from buildroot/share/PlatformIO/variants/BTT_SKR_SE_BX/PeripheralPins.c rename to buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/PeripheralPins.c diff --git a/buildroot/share/PlatformIO/variants/BTT_SKR_SE_BX/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/PinNamesVar.h similarity index 100% rename from buildroot/share/PlatformIO/variants/BTT_SKR_SE_BX/PinNamesVar.h rename to buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/PinNamesVar.h diff --git a/buildroot/share/PlatformIO/variants/BTT_SKR_SE_BX/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/hal_conf_extra.h similarity index 100% rename from buildroot/share/PlatformIO/variants/BTT_SKR_SE_BX/hal_conf_extra.h rename to buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/hal_conf_extra.h diff --git a/buildroot/share/PlatformIO/variants/BTT_SKR_SE_BX/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/ldscript.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/BTT_SKR_SE_BX/ldscript.ld rename to buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/ldscript.ld diff --git a/buildroot/share/PlatformIO/variants/BTT_SKR_SE_BX/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/BTT_SKR_SE_BX/variant.cpp rename to buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.cpp diff --git a/buildroot/share/PlatformIO/variants/BTT_SKR_SE_BX/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h similarity index 100% rename from buildroot/share/PlatformIO/variants/BTT_SKR_SE_BX/variant.h rename to buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h diff --git a/ini/stm32f7.ini b/ini/stm32f7.ini index afcfc102d5ea..76d039533c44 100644 --- a/ini/stm32f7.ini +++ b/ini/stm32f7.ini @@ -46,7 +46,7 @@ build_flags = ${common_stm32.build_flags} platform = ${common_stm32.platform} platform_packages = ${stm_flash_drive.platform_packages} extends = common_stm32 -board = BTT_SKR_SE_BX +board = marlin_BTT_SKR_SE_BX extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py build_flags = ${common_stm32.build_flags} From fa4d75385b108a576ba8fea5d1673e7355376a58 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 24 Apr 2021 02:22:17 -0500 Subject: [PATCH 12/17] Rename SKR_PRO_11 variant --- .../{BigTree_SKR_Pro.json => marlin_BigTree_SKR_Pro.json} | 2 +- .../PeripheralPins.c | 0 .../PinNamesVar.h | 0 .../hal_conf_extra.h | 0 .../ldscript.ld | 0 .../variant.cpp | 0 .../variant.h | 0 ini/stm32f4.ini | 2 +- 8 files changed, 2 insertions(+), 2 deletions(-) rename buildroot/share/PlatformIO/boards/{BigTree_SKR_Pro.json => marlin_BigTree_SKR_Pro.json} (95%) rename buildroot/share/PlatformIO/variants/{BIGTREE_SKR_PRO_1v1 => MARLIN_BIGTREE_SKR_PRO_11}/PeripheralPins.c (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_SKR_PRO_1v1 => MARLIN_BIGTREE_SKR_PRO_11}/PinNamesVar.h (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_SKR_PRO_1v1 => MARLIN_BIGTREE_SKR_PRO_11}/hal_conf_extra.h (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_SKR_PRO_1v1 => MARLIN_BIGTREE_SKR_PRO_11}/ldscript.ld (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_SKR_PRO_1v1 => MARLIN_BIGTREE_SKR_PRO_11}/variant.cpp (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_SKR_PRO_1v1 => MARLIN_BIGTREE_SKR_PRO_11}/variant.h (100%) diff --git a/buildroot/share/PlatformIO/boards/BigTree_SKR_Pro.json b/buildroot/share/PlatformIO/boards/marlin_BigTree_SKR_Pro.json similarity index 95% rename from buildroot/share/PlatformIO/boards/BigTree_SKR_Pro.json rename to buildroot/share/PlatformIO/boards/marlin_BigTree_SKR_Pro.json index 211ceacdca0b..5e76c2c9e205 100644 --- a/buildroot/share/PlatformIO/boards/BigTree_SKR_Pro.json +++ b/buildroot/share/PlatformIO/boards/marlin_BigTree_SKR_Pro.json @@ -15,7 +15,7 @@ ] ], "mcu": "stm32f407zgt6", - "variant": "BIGTREE_SKR_PRO_1v1" + "variant": "MARLIN_BIGTREE_SKR_PRO_11" }, "debug": { "jlink_device": "STM32F407ZG", diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/PeripheralPins.c similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/PeripheralPins.c rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/PeripheralPins.c diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/PinNamesVar.h similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/PinNamesVar.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/PinNamesVar.h diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/hal_conf_extra.h similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/hal_conf_extra.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/hal_conf_extra.h diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/ldscript.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/ldscript.ld rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/ldscript.ld diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/variant.cpp rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.cpp diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/variant.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 7d4efc6702e7..d3bd3acbe95f 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -146,7 +146,7 @@ extra_scripts = ${common.extra_scripts} [env:BIGTREE_SKR_PRO] platform = ${common_stm32.platform} extends = common_stm32 -board = BigTree_SKR_Pro +board = marlin_BigTree_SKR_Pro build_flags = ${common_stm32.build_flags} -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000 extra_scripts = ${common.extra_scripts} From b5fbd0af9cd75cef837afa4854c1eb96fd224ef6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 24 Apr 2021 02:26:58 -0500 Subject: [PATCH 13/17] Rename BIGTREE_E3_RRF variant --- .../{BIGTREE_E3_RRF => MARLIN_BIGTREE_E3_RRF}/PeripheralPins.c | 0 .../{BIGTREE_E3_RRF => MARLIN_BIGTREE_E3_RRF}/PinNamesVar.h | 0 .../{BIGTREE_E3_RRF => MARLIN_BIGTREE_E3_RRF}/hal_conf_extra.h | 0 .../{BIGTREE_E3_RRF => MARLIN_BIGTREE_E3_RRF}/ldscript.ld | 0 .../{BIGTREE_E3_RRF => MARLIN_BIGTREE_E3_RRF}/variant.cpp | 0 .../{BIGTREE_E3_RRF => MARLIN_BIGTREE_E3_RRF}/variant.h | 0 ini/stm32f4.ini | 2 +- 7 files changed, 1 insertion(+), 1 deletion(-) rename buildroot/share/PlatformIO/variants/{BIGTREE_E3_RRF => MARLIN_BIGTREE_E3_RRF}/PeripheralPins.c (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_E3_RRF => MARLIN_BIGTREE_E3_RRF}/PinNamesVar.h (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_E3_RRF => MARLIN_BIGTREE_E3_RRF}/hal_conf_extra.h (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_E3_RRF => MARLIN_BIGTREE_E3_RRF}/ldscript.ld (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_E3_RRF => MARLIN_BIGTREE_E3_RRF}/variant.cpp (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_E3_RRF => MARLIN_BIGTREE_E3_RRF}/variant.h (100%) diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_E3_RRF/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/PeripheralPins.c similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_E3_RRF/PeripheralPins.c rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/PeripheralPins.c diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_E3_RRF/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/PinNamesVar.h similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_E3_RRF/PinNamesVar.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/PinNamesVar.h diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_E3_RRF/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/hal_conf_extra.h similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_E3_RRF/hal_conf_extra.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/hal_conf_extra.h diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_E3_RRF/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/ldscript.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_E3_RRF/ldscript.ld rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/ldscript.ld diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_E3_RRF/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_E3_RRF/variant.cpp rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.cpp diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_E3_RRF/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.h similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_E3_RRF/variant.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.h diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index d3bd3acbe95f..bd84e194d69b 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -182,7 +182,7 @@ build_flags = ${stm_flash_drive.build_flags} platform = ${common_stm32.platform} extends = common_stm32 board = genericSTM32F407VGT6 -board_build.variant = BIGTREE_E3_RRF +board_build.variant = MARLIN_BIGTREE_E3_RRF build_flags = ${common_stm32.build_flags} -DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000 -DSERIAL_RX_BUFFER_SIZE=255 -DSERIAL_TX_BUFFER_SIZE=255 From 2e9ba32e049dfe58e0f50eac755888b435d48f35 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 24 Apr 2021 02:19:06 -0500 Subject: [PATCH 14/17] Rename STEVAL variant --- .../{STEVAL_STM32F401VE.json => marlin_STEVAL_STM32F401VE.json} | 2 +- .../{STEVAL_F401VE => MARLIN_STEVAL_F401VE}/PeripheralPins.c | 0 .../{STEVAL_F401VE => MARLIN_STEVAL_F401VE}/PinNamesVar.h | 0 .../{STEVAL_F401VE => MARLIN_STEVAL_F401VE}/hal_conf_custom.h | 0 .../{STEVAL_F401VE => MARLIN_STEVAL_F401VE}/ldscript.ld | 0 .../{STEVAL_F401VE => MARLIN_STEVAL_F401VE}/variant.cpp | 0 .../variants/{STEVAL_F401VE => MARLIN_STEVAL_F401VE}/variant.h | 0 ini/stm32f4.ini | 2 +- 8 files changed, 2 insertions(+), 2 deletions(-) rename buildroot/share/PlatformIO/boards/{STEVAL_STM32F401VE.json => marlin_STEVAL_STM32F401VE.json} (97%) rename buildroot/share/PlatformIO/variants/{STEVAL_F401VE => MARLIN_STEVAL_F401VE}/PeripheralPins.c (100%) rename buildroot/share/PlatformIO/variants/{STEVAL_F401VE => MARLIN_STEVAL_F401VE}/PinNamesVar.h (100%) rename buildroot/share/PlatformIO/variants/{STEVAL_F401VE => MARLIN_STEVAL_F401VE}/hal_conf_custom.h (100%) rename buildroot/share/PlatformIO/variants/{STEVAL_F401VE => MARLIN_STEVAL_F401VE}/ldscript.ld (100%) rename buildroot/share/PlatformIO/variants/{STEVAL_F401VE => MARLIN_STEVAL_F401VE}/variant.cpp (100%) rename buildroot/share/PlatformIO/variants/{STEVAL_F401VE => MARLIN_STEVAL_F401VE}/variant.h (100%) diff --git a/buildroot/share/PlatformIO/boards/STEVAL_STM32F401VE.json b/buildroot/share/PlatformIO/boards/marlin_STEVAL_STM32F401VE.json similarity index 97% rename from buildroot/share/PlatformIO/boards/STEVAL_STM32F401VE.json rename to buildroot/share/PlatformIO/boards/marlin_STEVAL_STM32F401VE.json index e70188d647c8..e89ca0af7354 100644 --- a/buildroot/share/PlatformIO/boards/STEVAL_STM32F401VE.json +++ b/buildroot/share/PlatformIO/boards/marlin_STEVAL_STM32F401VE.json @@ -15,7 +15,7 @@ ] ], "mcu": "stm32f401vet6", - "variant": "STEVAL_F401VE" + "variant": "MARLIN_STEVAL_F401VE" }, "debug": { "jlink_device": "STM32F401VE", diff --git a/buildroot/share/PlatformIO/variants/STEVAL_F401VE/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/PeripheralPins.c similarity index 100% rename from buildroot/share/PlatformIO/variants/STEVAL_F401VE/PeripheralPins.c rename to buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/PeripheralPins.c diff --git a/buildroot/share/PlatformIO/variants/STEVAL_F401VE/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/PinNamesVar.h similarity index 100% rename from buildroot/share/PlatformIO/variants/STEVAL_F401VE/PinNamesVar.h rename to buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/PinNamesVar.h diff --git a/buildroot/share/PlatformIO/variants/STEVAL_F401VE/hal_conf_custom.h b/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/hal_conf_custom.h similarity index 100% rename from buildroot/share/PlatformIO/variants/STEVAL_F401VE/hal_conf_custom.h rename to buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/hal_conf_custom.h diff --git a/buildroot/share/PlatformIO/variants/STEVAL_F401VE/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/ldscript.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/STEVAL_F401VE/ldscript.ld rename to buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/ldscript.ld diff --git a/buildroot/share/PlatformIO/variants/STEVAL_F401VE/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/variant.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/STEVAL_F401VE/variant.cpp rename to buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/variant.cpp diff --git a/buildroot/share/PlatformIO/variants/STEVAL_F401VE/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/variant.h similarity index 100% rename from buildroot/share/PlatformIO/variants/STEVAL_F401VE/variant.h rename to buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/variant.h diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index bd84e194d69b..1b5410df2fe6 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -36,7 +36,7 @@ build_flags = ${common_stm32.build_flags} [env:STM32F401VE_STEVAL] platform = ${common_stm32.platform} extends = common_stm32 -board = STEVAL_STM32F401VE +board = marlin_STEVAL_STM32F401VE build_flags = ${common_stm32.build_flags} -DARDUINO_STEVAL -DSTM32F401xE -DDISABLE_GENERIC_SERIALUSB -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS From 7f1a4b50761853b6cc7c503034aac4fcc00d38a1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 24 Apr 2021 02:27:41 -0500 Subject: [PATCH 15/17] Rename FLY_F407ZG variant --- .../variants/{FLY_F407ZG => MARLIN_FLY_F407ZG}/PeripheralPins.c | 0 .../variants/{FLY_F407ZG => MARLIN_FLY_F407ZG}/PinNamesVar.h | 0 .../variants/{FLY_F407ZG => MARLIN_FLY_F407ZG}/ldscript.ld | 0 .../variants/{FLY_F407ZG => MARLIN_FLY_F407ZG}/variant.cpp | 0 .../variants/{FLY_F407ZG => MARLIN_FLY_F407ZG}/variant.h | 0 ini/stm32f4.ini | 2 +- 6 files changed, 1 insertion(+), 1 deletion(-) rename buildroot/share/PlatformIO/variants/{FLY_F407ZG => MARLIN_FLY_F407ZG}/PeripheralPins.c (100%) rename buildroot/share/PlatformIO/variants/{FLY_F407ZG => MARLIN_FLY_F407ZG}/PinNamesVar.h (100%) rename buildroot/share/PlatformIO/variants/{FLY_F407ZG => MARLIN_FLY_F407ZG}/ldscript.ld (100%) rename buildroot/share/PlatformIO/variants/{FLY_F407ZG => MARLIN_FLY_F407ZG}/variant.cpp (100%) rename buildroot/share/PlatformIO/variants/{FLY_F407ZG => MARLIN_FLY_F407ZG}/variant.h (100%) diff --git a/buildroot/share/PlatformIO/variants/FLY_F407ZG/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/PeripheralPins.c similarity index 100% rename from buildroot/share/PlatformIO/variants/FLY_F407ZG/PeripheralPins.c rename to buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/PeripheralPins.c diff --git a/buildroot/share/PlatformIO/variants/FLY_F407ZG/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/PinNamesVar.h similarity index 100% rename from buildroot/share/PlatformIO/variants/FLY_F407ZG/PinNamesVar.h rename to buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/PinNamesVar.h diff --git a/buildroot/share/PlatformIO/variants/FLY_F407ZG/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/ldscript.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/FLY_F407ZG/ldscript.ld rename to buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/ldscript.ld diff --git a/buildroot/share/PlatformIO/variants/FLY_F407ZG/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/FLY_F407ZG/variant.cpp rename to buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.cpp diff --git a/buildroot/share/PlatformIO/variants/FLY_F407ZG/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h similarity index 100% rename from buildroot/share/PlatformIO/variants/FLY_F407ZG/variant.h rename to buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 1b5410df2fe6..d6418f439e41 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -61,7 +61,7 @@ extra_scripts = ${common.extra_scripts} platform = ${common_stm32.platform} extends = common_stm32 board = marlin_STM32F407ZGT6 -board_build.variant = FLY_F407ZG +board_build.variant = MARLIN_FLY_F407ZG upload_protocol = dfu build_flags = ${common_stm32.build_flags} -DVECT_TAB_OFFSET=0x8000 From 97b0d979a4e2d4db7760dcef2119953de3317ae4 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 27 Apr 2021 01:01:17 -0500 Subject: [PATCH 16/17] Rename CHITU_F103 variant Maple platform platformio-build-stm32f1.py uses the 'board' name, not 'board_build.variant'. --- .github/workflows/test-builds.yml | 1 + .../PlatformIO/boards/marlin_CHITU_F103.json | 3 +-- .../PlatformIO/scripts/STM32F1_create_variant.py | 13 ++----------- .../share/PlatformIO/scripts/chitu_crypt.py | 2 -- .../PlatformIO/scripts/generic_create_variant.py | 13 ++----------- buildroot/share/PlatformIO/scripts/marlin.py | 11 ++++++++++- .../{CHITU_F103 => marlin_CHITU_F103}/board.cpp | 0 .../board/board.h | 0 .../ld/common.inc | 0 .../ld/extra_libs.inc | 0 .../marlin_CHITU_F103/ld/flash.ld} | 0 .../ld/stm32f103z_dfu.ld | 0 .../ld/stm32f103zc.ld | 0 .../ld/stm32f103zd.ld | 0 .../ld/stm32f103ze.ld | 0 .../ld/vector_symbols.inc | 0 .../pins_arduino.h | 0 .../{CHITU_F103 => marlin_CHITU_F103}/variant.h | 0 .../wirish/boards.cpp | 0 .../wirish/boards_setup.cpp | 0 .../wirish/start.S | 0 .../wirish/start_c.c | 0 .../wirish/syscalls.c | 0 buildroot/tests/chitu_f103 | 16 ++++++++++++++++ 24 files changed, 32 insertions(+), 27 deletions(-) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/board.cpp (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/board/board.h (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/ld/common.inc (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/ld/extra_libs.inc (100%) rename buildroot/share/PlatformIO/{ldscripts/chitu_f103.ld => variants/marlin_CHITU_F103/ld/flash.ld} (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/ld/stm32f103z_dfu.ld (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/ld/stm32f103zc.ld (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/ld/stm32f103zd.ld (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/ld/stm32f103ze.ld (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/ld/vector_symbols.inc (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/pins_arduino.h (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/variant.h (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/wirish/boards.cpp (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/wirish/boards_setup.cpp (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/wirish/start.S (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/wirish/start_c.c (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/wirish/syscalls.c (100%) create mode 100755 buildroot/tests/chitu_f103 diff --git a/.github/workflows/test-builds.yml b/.github/workflows/test-builds.yml index 5a598299f3b3..93bda9726e27 100644 --- a/.github/workflows/test-builds.yml +++ b/.github/workflows/test-builds.yml @@ -90,6 +90,7 @@ jobs: - NUCLEO_F767ZI - REMRAM_V1 - BTT_SKR_SE_BX + - chitu_f103 # Put lengthy tests last diff --git a/buildroot/share/PlatformIO/boards/marlin_CHITU_F103.json b/buildroot/share/PlatformIO/boards/marlin_CHITU_F103.json index ecf7bff66c87..dbfbc21cb275 100644 --- a/buildroot/share/PlatformIO/boards/marlin_CHITU_F103.json +++ b/buildroot/share/PlatformIO/boards/marlin_CHITU_F103.json @@ -15,8 +15,7 @@ ] ], "mcu": "stm32f103zet6", - "variant": "CHITU_F103", - "ldscript": "chitu_f103.ld" + "variant": "marlin_CHITU_F103" }, "debug": { "jlink_device": "STM32F103ZE", diff --git a/buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py b/buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py index 91522a9d0695..0a38e1ceee9d 100644 --- a/buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py +++ b/buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py @@ -1,19 +1,10 @@ # # STM32F1_create_variant.py # -import os,shutil +import os,shutil,marlin from SCons.Script import DefaultEnvironment from platformio import util -def copytree(src, dst, symlinks=False, ignore=None): - for item in os.listdir(src): - s = os.path.join(src, item) - d = os.path.join(dst, item) - if os.path.isdir(s): - shutil.copytree(s, d, symlinks, ignore) - else: - shutil.copy2(s, d) - env = DefaultEnvironment() platform = env.PioPlatform() board = env.BoardConfig() @@ -36,4 +27,4 @@ def copytree(src, dst, symlinks=False, ignore=None): if not os.path.isdir(variant_dir): os.mkdir(variant_dir) -copytree(source_dir, variant_dir) +marlin.copytree(source_dir, variant_dir) diff --git a/buildroot/share/PlatformIO/scripts/chitu_crypt.py b/buildroot/share/PlatformIO/scripts/chitu_crypt.py index f9ff10787220..23d81c1721f9 100644 --- a/buildroot/share/PlatformIO/scripts/chitu_crypt.py +++ b/buildroot/share/PlatformIO/scripts/chitu_crypt.py @@ -7,8 +7,6 @@ # Relocate firmware from 0x08000000 to 0x08008800 marlin.relocate_firmware("0x08008800") -marlin.custom_ld_script("chitu_f103.ld") - def calculate_crc(contents, seed): accumulating_xor_value = seed; diff --git a/buildroot/share/PlatformIO/scripts/generic_create_variant.py b/buildroot/share/PlatformIO/scripts/generic_create_variant.py index 7ea5ef022cdc..3290dcea192b 100644 --- a/buildroot/share/PlatformIO/scripts/generic_create_variant.py +++ b/buildroot/share/PlatformIO/scripts/generic_create_variant.py @@ -5,21 +5,12 @@ # the appropriate framework variants folder, so that its contents # will be picked up by PlatformIO just like any other variant. # -import os,shutil +import os,shutil,marlin from SCons.Script import DefaultEnvironment from platformio import util env = DefaultEnvironment() -def copytree(src, dst, symlinks=False, ignore=None): - for item in os.listdir(src): - s = os.path.join(src, item) - d = os.path.join(dst, item) - if os.path.isdir(s): - shutil.copytree(s, d, symlinks, ignore) - else: - shutil.copy2(s, d) - # # Get the platform name from the 'platform_packages' option, # or look it up by the platform.class.name. @@ -60,4 +51,4 @@ def copytree(src, dst, symlinks=False, ignore=None): source_dir = os.path.join("buildroot/share/PlatformIO/variants", variant) assert os.path.isdir(source_dir) -copytree(source_dir, variant_dir) +marlin.copytree(source_dir, variant_dir) diff --git a/buildroot/share/PlatformIO/scripts/marlin.py b/buildroot/share/PlatformIO/scripts/marlin.py index 3e0ca2daefb5..d83ebceee244 100644 --- a/buildroot/share/PlatformIO/scripts/marlin.py +++ b/buildroot/share/PlatformIO/scripts/marlin.py @@ -2,11 +2,20 @@ # buildroot/share/PlatformIO/scripts/marlin.py # Helper module with some commonly-used functions # -import os +import os,shutil from SCons.Script import DefaultEnvironment env = DefaultEnvironment() +def copytree(src, dst, symlinks=False, ignore=None): + for item in os.listdir(src): + s = os.path.join(src, item) + d = os.path.join(dst, item) + if os.path.isdir(s): + shutil.copytree(s, d, symlinks, ignore) + else: + shutil.copy2(s, d) + def replace_define(field, value): for define in env['CPPDEFINES']: if define[0] == field: diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/board.cpp b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/board.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/board.cpp rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/board.cpp diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/board/board.h b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/board/board.h similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/board/board.h rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/board/board.h diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/ld/common.inc b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/common.inc similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/ld/common.inc rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/common.inc diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/ld/extra_libs.inc b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/extra_libs.inc similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/ld/extra_libs.inc rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/extra_libs.inc diff --git a/buildroot/share/PlatformIO/ldscripts/chitu_f103.ld b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/flash.ld similarity index 100% rename from buildroot/share/PlatformIO/ldscripts/chitu_f103.ld rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/flash.ld diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/ld/stm32f103z_dfu.ld b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/stm32f103z_dfu.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/ld/stm32f103z_dfu.ld rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/stm32f103z_dfu.ld diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/ld/stm32f103zc.ld b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/stm32f103zc.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/ld/stm32f103zc.ld rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/stm32f103zc.ld diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/ld/stm32f103zd.ld b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/stm32f103zd.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/ld/stm32f103zd.ld rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/stm32f103zd.ld diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/ld/stm32f103ze.ld b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/stm32f103ze.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/ld/stm32f103ze.ld rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/stm32f103ze.ld diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/ld/vector_symbols.inc b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/vector_symbols.inc similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/ld/vector_symbols.inc rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/vector_symbols.inc diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/pins_arduino.h b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/pins_arduino.h similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/pins_arduino.h rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/pins_arduino.h diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/variant.h b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/variant.h similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/variant.h rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/variant.h diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/wirish/boards.cpp b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/boards.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/wirish/boards.cpp rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/boards.cpp diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/wirish/boards_setup.cpp b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/boards_setup.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/wirish/boards_setup.cpp rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/boards_setup.cpp diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/wirish/start.S b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/start.S similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/wirish/start.S rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/start.S diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/wirish/start_c.c b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/start_c.c similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/wirish/start_c.c rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/start_c.c diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/wirish/syscalls.c b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/syscalls.c similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/wirish/syscalls.c rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/syscalls.c diff --git a/buildroot/tests/chitu_f103 b/buildroot/tests/chitu_f103 new file mode 100755 index 000000000000..139c480e3e85 --- /dev/null +++ b/buildroot/tests/chitu_f103 @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# +# Build tests for chitu_f103 (STM32F103ZE) +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +use_example_configs Tronxy/X5SA +exec_test $1 $2 "Tronxy/X5SA" "$3" + +# clean up +restore_configs From d74837a016dce13852fa8fc2ea385412b129f8bb Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 27 Apr 2021 01:01:59 -0500 Subject: [PATCH 17/17] Rename MEEB_3DP variant --- .../PlatformIO/boards/{MEEB_3DP.json => marlin_MEEB_3DP.json} | 2 +- .../PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/board.cpp | 0 .../variants/{MEEB_3DP => marlin_MEEB_3DP}/board/board.h | 0 .../variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/bootloader.ld | 0 .../variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/common.inc | 0 .../variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/extra_libs.inc | 0 .../variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/flash.ld | 0 .../variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/jtag.ld | 0 .../variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/mem-flash.inc | 0 .../variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/mem-jtag.inc | 0 .../variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/mem-ram.inc | 0 .../PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/ram.ld | 0 .../variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/stm32f103rb.ld | 0 .../{MEEB_3DP => marlin_MEEB_3DP}/ld/stm32f103rb_bootloader.ld | 0 .../variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/stm32f103rc.ld | 0 .../{MEEB_3DP => marlin_MEEB_3DP}/ld/stm32f103rc_bootloader.ld | 0 .../variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/stm32f103re.ld | 0 .../{MEEB_3DP => marlin_MEEB_3DP}/ld/vector_symbols.inc | 0 .../variants/{MEEB_3DP => marlin_MEEB_3DP}/pins_arduino.h | 0 .../PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/variant.h | 0 .../variants/{MEEB_3DP => marlin_MEEB_3DP}/wirish/boards.cpp | 0 .../{MEEB_3DP => marlin_MEEB_3DP}/wirish/boards_setup.cpp | 0 .../variants/{MEEB_3DP => marlin_MEEB_3DP}/wirish/start.S | 0 .../variants/{MEEB_3DP => marlin_MEEB_3DP}/wirish/start_c.c | 0 .../variants/{MEEB_3DP => marlin_MEEB_3DP}/wirish/syscalls.c | 0 ini/stm32f1.ini | 2 +- 26 files changed, 2 insertions(+), 2 deletions(-) rename buildroot/share/PlatformIO/boards/{MEEB_3DP.json => marlin_MEEB_3DP.json} (97%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/board.cpp (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/board/board.h (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/bootloader.ld (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/common.inc (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/extra_libs.inc (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/flash.ld (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/jtag.ld (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/mem-flash.inc (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/mem-jtag.inc (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/mem-ram.inc (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/ram.ld (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/stm32f103rb.ld (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/stm32f103rb_bootloader.ld (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/stm32f103rc.ld (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/stm32f103rc_bootloader.ld (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/stm32f103re.ld (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/vector_symbols.inc (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/pins_arduino.h (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/variant.h (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/wirish/boards.cpp (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/wirish/boards_setup.cpp (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/wirish/start.S (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/wirish/start_c.c (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/wirish/syscalls.c (100%) diff --git a/buildroot/share/PlatformIO/boards/MEEB_3DP.json b/buildroot/share/PlatformIO/boards/marlin_MEEB_3DP.json similarity index 97% rename from buildroot/share/PlatformIO/boards/MEEB_3DP.json rename to buildroot/share/PlatformIO/boards/marlin_MEEB_3DP.json index 870648b32572..73ec9aaf48e2 100644 --- a/buildroot/share/PlatformIO/boards/MEEB_3DP.json +++ b/buildroot/share/PlatformIO/boards/marlin_MEEB_3DP.json @@ -18,7 +18,7 @@ "ldscript": "stm32f103xc.ld" }, "mcu": "stm32f103rct6", - "variant": "MEEB_3DP" + "variant": "marlin_MEEB_3DP" }, "debug": { "jlink_device": "STM32F103RC", diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/board.cpp b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/board.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/board.cpp rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/board.cpp diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/board/board.h b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/board/board.h similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/board/board.h rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/board/board.h diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/bootloader.ld b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/bootloader.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/bootloader.ld rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/bootloader.ld diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/common.inc b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/common.inc similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/common.inc rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/common.inc diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/extra_libs.inc b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/extra_libs.inc similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/extra_libs.inc rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/extra_libs.inc diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/flash.ld b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/flash.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/flash.ld rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/flash.ld diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/jtag.ld b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/jtag.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/jtag.ld rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/jtag.ld diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/mem-flash.inc b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/mem-flash.inc similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/mem-flash.inc rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/mem-flash.inc diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/mem-jtag.inc b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/mem-jtag.inc similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/mem-jtag.inc rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/mem-jtag.inc diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/mem-ram.inc b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/mem-ram.inc similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/mem-ram.inc rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/mem-ram.inc diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/ram.ld b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/ram.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/ram.ld rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/ram.ld diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rb.ld b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/stm32f103rb.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rb.ld rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/stm32f103rb.ld diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rb_bootloader.ld b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/stm32f103rb_bootloader.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rb_bootloader.ld rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/stm32f103rb_bootloader.ld diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rc.ld b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/stm32f103rc.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rc.ld rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/stm32f103rc.ld diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rc_bootloader.ld b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/stm32f103rc_bootloader.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rc_bootloader.ld rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/stm32f103rc_bootloader.ld diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103re.ld b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/stm32f103re.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103re.ld rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/stm32f103re.ld diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/vector_symbols.inc b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/vector_symbols.inc similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/vector_symbols.inc rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/vector_symbols.inc diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/pins_arduino.h b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/pins_arduino.h similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/pins_arduino.h rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/pins_arduino.h diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/variant.h b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/variant.h similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/variant.h rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/variant.h diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/boards.cpp b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/boards.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/boards.cpp rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/boards.cpp diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/boards_setup.cpp b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/boards_setup.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/boards_setup.cpp rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/boards_setup.cpp diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/start.S b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/start.S similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/start.S rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/start.S diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/start_c.c b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/start_c.c similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/start_c.c rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/start_c.c diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/syscalls.c b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/syscalls.c similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/syscalls.c rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/syscalls.c diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 9bfac8b529f8..94693d65a415 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -65,7 +65,7 @@ monitor_speed = 115200 [env:STM32F103RC_meeb] platform = ${common_stm32f1.platform} extends = common_stm32f1 -board = MEEB_3DP +board = marlin_MEEB_3DP build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4