From 6803c9501ef382e1e0bd5f1b067c5d98b74c3bf7 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 26 Apr 2022 03:08:52 -0500 Subject: [PATCH] Remove obsolete stm32_bootloader.py --- .../PlatformIO/scripts/stm32_bootloader.py | 43 ------------------- 1 file changed, 43 deletions(-) delete mode 100644 buildroot/share/PlatformIO/scripts/stm32_bootloader.py diff --git a/buildroot/share/PlatformIO/scripts/stm32_bootloader.py b/buildroot/share/PlatformIO/scripts/stm32_bootloader.py deleted file mode 100644 index b2b5daadb604f..0000000000000 --- a/buildroot/share/PlatformIO/scripts/stm32_bootloader.py +++ /dev/null @@ -1,43 +0,0 @@ -# -# stm32_bootloader.py -# -import os,sys,shutil,marlin -Import("env") - -from SCons.Script import DefaultEnvironment -board = DefaultEnvironment().BoardConfig() - -# -# 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) - -# -# 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") - marlin.relocate_vtab(LD_FLASH_OFFSET) - - # Flash size - maximum_flash_size = int(board.get("upload.maximum_size") / 1024) - marlin.replace_define('STM32_FLASH_SIZE', maximum_flash_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) - -# -# Only copy the file if there's no encrypt -# -board_keys = board.get("build").keys() -if 'firmware' in board_keys and ('encrypt' not in board_keys or board.get("build.encrypt") == 'No'): - import marlin - marlin.add_post_action(noencrypt)