forked from MarlinFirmware/Marlin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BTT SKR Mini E3 for HAL/STM32 (MarlinFirmware#21488)
- Loading branch information
Showing
10 changed files
with
596 additions
and
458 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# | ||
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Build tests for STM32F103RC BigTreeTech (SKR Mini v1.1) | ||
# | ||
|
||
# exit on first failure | ||
set -e | ||
|
||
# | ||
# Build with the default configurations | ||
# | ||
restore_configs | ||
opt_set MOTHERBOARD BOARD_BTT_SKR_MINI_V1_1 SERIAL_PORT 1 SERIAL_PORT_2 -1 | ||
exec_test $1 $2 "BigTreeTech SKR Mini v1.1 - Basic Configuration" "$3" | ||
|
||
# clean up | ||
restore_configs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Build tests for STM32F103RC BigTreeTech (SKR Mini E3) | ||
# | ||
|
||
# exit on first failure | ||
set -e | ||
|
||
# | ||
# Build with the default configurations | ||
# | ||
restore_configs | ||
opt_set MOTHERBOARD BOARD_BTT_SKR_MINI_E3_V1_0 SERIAL_PORT 1 SERIAL_PORT_2 -1 \ | ||
X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2209 Z_DRIVER_TYPE TMC2209 E0_DRIVER_TYPE TMC2209 | ||
opt_enable PINS_DEBUGGING Z_IDLE_HEIGHT | ||
|
||
exec_test $1 $2 "BigTreeTech SKR Mini E3 1.0 - Basic Config with TMC2209 HW Serial" "$3" | ||
|
||
# clean up | ||
restore_configs |
Oops, something went wrong.