Skip to content

Update sync-upstream.yml #596

Update sync-upstream.yml

Update sync-upstream.yml #596

# Based on the following workflow by ColinM9991:
# https://github.com/ColinM9991/Marlin/blob/skr-mini-e3/.github/workflows/compile-configs-custom.yml
name: "Build BTT SKR Mini E3 V3.0 (Ender 3 V2)"
on:
# Trigger custom firmwares builds only in specific situations
push:
# When the following branches are pushed
branches:
- 2.1.x
- bugfix-2.1.x
- skr-mini-e3-v3-0
# When the following tags are pushed
tags:
- 2*
# Allow manual builds with a configurable target branch
workflow_dispatch:
inputs:
target-branch:
description: "Target Branch"
required: true
type: string
default: "bugfix-2.1.x"
jobs:
# build-display-firmware:
# name: Compile Display Firmware
# if: ${{ success() && matrix.display == "BTT_TFT35_V3_0" }}
# uses: Didstopia/Marlin/.github/workflows/build-btt-tft35-e3-v3-0.yaml@skr-mini-e3-v3-0
build-marlin-firmware:
# name: Build Marlin Firmware
name: Build
## TODO: Test running on self-hosted runners instead
# runs-on: ubuntu-latest
runs-on: self-hosted
# runs-on: [self-hosted, ubuntu-latest]
timeout-minutes: 15
strategy:
# Fail early when possible (only applies to matrix jobs)
fail-fast: true
# fail-fast: false # NOTE: We do NOT want to fail early, because one configuration might fail where others might not, right?
# FIXME: Somehow only set this when running locally?
# The issue when running locally seems to be multiple
# containers trying to access/install the tool cache,
# so not entirely sure what else to do, than to limit this?
# max-parallel: 1
# max-parallel: 3 ## TODO: Limiting to the amount of self-hosted runners we have right now, just to see if that improves things at all?!
## TODO: Use include/exclude to create more specific builds?
## https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations
matrix:
# Set global defaults
board: ["STM32G0B1RE_btt"]
bltouch: [true]
high-speed: [true]
grid: [5]
ubl: [true]
direct-drive: [true]
# linear-advance: [true]
linear-advance: [false]
# linear-advance: [true, false]
# junction-deviation: [true]
junction-deviation: [false]
# junction-deviation: [true, false]
# hybrid-threshold: [true]
hybrid-threshold: [false]
# hybrid-threshold: [true, false]
input-shaping: [false]
mpc: [true]
display: ["BTT_TFT35_V3_0", "FYSETC_MINI_12864_2_1"]
dwin: [false]
## FIXME: These don't append, they replace the entire matrix, so naturally won't work as-is..
# # Specify additional build configurations
# include:
# ## Test configurations for BLTouch
# # Default probing speed
# - bltouch: true
# high-speed: false
# ## Test configurations for no BLTouch
# # No BLTouch + ABL
# - bltouch: false
# high-speed: false
# ubl: false
# ## Test configurations for Direct Drive
# # Direct Drive enabled
# - direct-drive: true
# # Direct Drive disabled
# - direct-drive: false
# ## Test configurations for Linear Advance + Junction Deviation
# # Linear Advance + Junction Deviation enabled
# - linear-advance: true
# junction-deviation: true
# # Linear Advance + Junction Deviation disabled
# - linear-advance: false
# junction-deviation: false
# # Linear Advance enabled + Junction Deviation disabled
# - linear-advance: true
# junction-deviation: false
# # Linear Advance disabled + Junction Deviation enabled
# - linear-advance: false
# junction-deviation: true
# ## Test configurations for PID vs. MPC
# # PID enabled
# - mpc: false
# # MPC enabled
# - mpc: true
# ## Test configurations for different displays
# # BTT TFT35 E3 V3.0
# - display: BTT_TFT35_V3_0
# dwin: false
# # FYSETC Mini 12864 V2.1
# - display: FYSETC_MINI_12864_2_1
# dwin: false
# # Stock Ender 3 V2 display
# - display: 'STOCK'
# dwin: true
steps:
- name: Print Build Info
run: |-
echo "Build Info:"
echo " Target Branch: ${{inputs.target-branch || github.event.inputs.target-branch || github.ref }}"
echo " Board: ${{ matrix.board }}"
echo " BLTouch: ${{ matrix.bltouch }}"
echo " High Speed: ${{ matrix.high-speed }}"
echo " Grid: ${{ matrix.grid }}"
echo " UBL: ${{ matrix.ubl }}"
echo " Direct Drive: ${{ matrix.direct-drive }}"
echo " Linear Advance: ${{ matrix.linear-advance }}"
echo " Junction Deviation: ${{ matrix.junction-deviation }}"
echo " Hybrid Threshold: ${{ matrix.hybrid-threshold }}"
echo " Input Shaping: ${{ matrix.input-shaping }}"
echo " MPC: ${{ matrix.mpc }}"
echo " Display: ${{ matrix.display }}"
echo " DWIN: ${{ matrix.dwin }}"
- name: Prepare Target Branch
run: |-
# Enable script debugging
set -x
# Target branch defaults to base ref
TARGET_BRANCH=${{ github.event.inputs.currentBranch || env.GITHUB_BASE_REF }}
echo "Target branch: $TARGET_BRANCH"
# If our target branch is not set, default to the "bugfix-2.1.x" branch instead
if [ -z "${TARGET_BRANCH}" ]; then
echo "Target branch not available, defaulting to 'bugfix-2.1.x'"
TARGET_BRANCH=bugfix-2.1.x
fi
# Allow overriding the target branch with manual builds
OVERRIDE_TARGET_BRANCH=${{ github.event.inputs.targetBranch }}
if [ ! -z "${OVERRIDE_TARGET_BRANCH}" ]; then
echo "Branch override detected, setting branch to: '${OVERRIDE_TARGET_BRANCH}'"
TARGET_BRANCH=${OVERRIDE_TARGET_BRANCH}
fi
# If this is a tagged release, always use the "2.1.x" branch instead
REF_TYPE=${{ env.GITHUB_REF_TYPE }}
REF_NAME=${{ env.GITHUB_REF_NAME }}
if [ "$REF_TYPE" = "tag" ]; then
echo "Release tag detected, setting branch to '2.1.x'"
echo "TARGET_TAG=${REF_NAME}" >> $GITHUB_ENV
TARGET_BRANCH=2.1.x
fi
## FIXME: Disable/fix this once we have a config that we can actually use with the "2.1.x" branch
# If the target branch is "2.1.x", echo out an error message and fail the build
# if [ "$TARGET_BRANCH" = "2.1.x" ]; then
# echo "::error title=Unsupported target branch::This workflow is not currently configured to run on the '2.1.x' branch."
# exit 1
# fi
# echo "Final target branch: $TARGET_BRANCH"
echo "::warning title=Final target branch::$TARGET_BRANCH"
# Ensure that we have a target branch
if [ -z "${TARGET_BRANCH}" ]; then
echo "::error title=Missing target branch::Could not detect target branch, unable to continue"
exit 1
else
# Export the final target branch as a global environment variable
echo "TARGET_BRANCH=${TARGET_BRANCH}" >> $GITHUB_ENV
fi
- name: Checkout Repository (${{ env.TARGET_BRANCH }})
if: success()
uses: actions/checkout@v3
with:
ref: ${{ env.TARGET_BRANCH }}
persist-credentials: false
- name: Prepare Environment (${{ env.TARGET_BRANCH }})
if: success()
run: |-
# Enable script debugging
# set -x
# Generate the version based on the branch and commit/tag
if [ -z "${TARGET_TAG}" ]; then
echo "RELEASE_VERSION=$(git rev-parse --abbrev-ref HEAD)-$(git rev-parse --short HEAD)-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}" >> $GITHUB_ENV
else
echo "RELEASE_VERSION=$(git rev-parse --abbrev-ref HEAD)-${{ env.TARGET_TAG }}-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}" >> $GITHUB_ENV
fi
# Print out the version
echo "::notice title=Version::${{ env.RELEASE_VERSION }}"
- name: Prepare Build Script
if: success()
id: configure_build_script
run: |-
# Enable script debugging
set -x
# Download the latest helper build script
mkdir -p .github/workflows/scripts
wget \
https://raw.githubusercontent.com/Didstopia/Marlin/skr-mini-e3-v3-0/.github/workflows/scripts/configure_build_script.sh \
-O .github/workflows/scripts/configure_build_script.sh
# Download custom resources
mkdir -p .github/workflows/resources
wget \
https://raw.githubusercontent.com/Didstopia/Marlin/skr-mini-e3-v3-0/.github/workflows/resources/_Bootscreen.h \
-O .github/workflows/resources/_Bootscreen.h
- name: Cache pip
if: success()
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-v1-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
if: success()
uses: actions/cache@v3
with:
path: ~/.platformio
key: ${{ runner.os }}-platformio--v1-${{ hashFiles('**/lockfiles') }}
- name: Setup Python
if: success()
uses: actions/setup-python@v3
with:
python-version: '3.7' # Version range or exact version of a Python version to use, using semvers version range syntax.
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Install PlatformIO
if: success()
run: |
pip install -U platformio
pio upgrade --dev
pio pkg update --global
- name: 'Configure: Core'
if: success()
id: configure_core
env:
HYBRID_THRESHOLD: ${{ matrix.hybrid-threshold }}
run: |-
# Source the helper build script
cd ${GITHUB_WORKSPACE}
source ${GITHUB_WORKSPACE}/.github/workflows/scripts/configure_build_script.sh
# Set default/custom steps per unit, per axis
configValue DEFAULT_AXIS_STEPS_PER_UNIT "{ 80, 80, 400, 95.1 }" Marlin/Configuration.h
# Bed size, probing and bed clip tweaks specific to this printer/build surface
configValue X_BED_SIZE 220 Marlin/Configuration.h
configValue Y_BED_SIZE 220 Marlin/Configuration.h
# configValue X_MAX_POS "X_BED_SIZE + 15" Marlin/Configuration.h
configValue X_MAX_POS "245" Marlin/Configuration.h # Rough maximum X position before running into the frame
# configValue Y_MAX_POS "Y_BED_SIZE" Marlin/Configuration.h
configValue Y_MAX_POS "220" Marlin/Configuration.h # Rough maximum Y position before running into the bed clips
# configValue Z_MAX_POS "235" Marlin/Configuration.h # NOTE: Lowered from 250 to prevent our specific printer from crashing
configValue Z_MAX_POS "220" Marlin/Configuration.h # This is the safest maximum Z height for our printer
## FIXME: !!! This is temporary until we figure out the EXACT bed size + offsets !!!
# configValue X_BED_SIZE 235 Marlin/Configuration.h
# configValue Y_BED_SIZE 235 Marlin/Configuration.h
# configValue X_MIN_POS 0 Marlin/Configuration.h
# configValue Y_MIN_POS 0 Marlin/Configuration.h
# configValue X_MAX_POS "X_BED_SIZE" Marlin/Configuration.h
# configValue Y_MAX_POS "Y_BED_SIZE" Marlin/Configuration.h
# FIXME: Reverted these changes for now, other issues to solve first!
# Calibrated bed and position values
# configValue X_BED_SIZE "235 - 2" Marlin/Configuration.h
# configValue Y_BED_SIZE "235 - 5" Marlin/Configuration.h
# configValue X_MIN_POS 0 Marlin/Configuration.h
# configValue Y_MIN_POS 0 Marlin/Configuration.h
# configValue X_MAX_POS "245 - 5" Marlin/Configuration.h
# configValue Y_MAX_POS "235 - 5" Marlin/Configuration.h
# Adjust min/max temperatures
configValue HEATER_0_MINTEMP 5 Marlin/Configuration.h
configValue BED_MINTEMP 5 Marlin/Configuration.h
configValue BED_MAXTEMP 150 Marlin/Configuration.h
# Configure thermal protection
configValue WATCH_TEMP_PERIOD 30 Marlin/Configuration_adv.h
configValue WATCH_TEMP_INCREASE 3 Marlin/Configuration_adv.h
configValue THERMAL_PROTECTION_BED_PERIOD 120 Marlin/Configuration_adv.h
configValue WATCH_BED_TEMP_PERIOD 120 Marlin/Configuration_adv.h
# Enable S-Curve Acceleration (default is disabled)
# configEnable S_CURVE_ACCELERATION Marlin/Configuration.h
# Enable filament runout sensor support
configEnable FILAMENT_RUNOUT_SENSOR Marlin/Configuration.h
configValue FIL_RUNOUT_ENABLED_DEFAULT false Marlin/Configuration.h
configValue FILAMENT_RUNOUT_DISTANCE_MM 0 Marlin/Configuration.h
# Enable EEPROM feedback (disabled by default, enabled in Jyers)
configEnable EEPROM_CHITCHAT Marlin/Configuration.h
# Clear EEPROM on startup after flashing a new firmware (disabled by default, Jyers still uses the old EEPROM_AUTO_INIT)
configEnable EEPROM_INIT_NOW Marlin/Configuration.h
# Enable nozzle parking when idle
configEnable NOZZLE_PARK_FEATURE Marlin/Configuration.h
# Increase Z axis while nozzle parking (disabled by default, enabled in Jyers)
configValue NOZZLE_PARK_Z_RAISE_MIN 5 Marlin/Configuration.h
# Enable print counting statistics (disabled by default, enabled in Jyers)
configEnable PRINTCOUNTER Marlin/Configuration.h
# Enable software PWM fan control
configEnable FAN_SOFT_PWM Marlin/Configuration.h
# Enable mainboard/controller fan control
configEnable USE_CONTROLLER_FAN Marlin/Configuration_adv.h
configValue CONTROLLER_FAN_PIN FAN2_PIN Marlin/Configuration_adv.h
configValue CONTROLLERFAN_IDLE_TIME 10 Marlin/Configuration_adv.h
# Enable automatic fan control for the extruder and parts cooler
configValue E0_AUTO_FAN_PIN FAN1_PIN Marlin/Configuration_adv.h
configValue COOLER_AUTO_FAN_PIN FAN_PIN Marlin/Configuration_adv.h
# Enable thermal protection for a heated chamber (which we don't have, so this is rather meaningless)
configEnable THERMAL_PROTECTION_CHAMBER Marlin/Configuration.h
# Turn off display after 5 minutes
# configValue TOUCH_IDLE_SLEEP 300 Marlin/Configuration.h
configValue TOUCH_IDLE_SLEEP_MINS 5 Marlin/Configuration.h
# Enable center point for bed tramming
configEnable BED_TRAMMING_INCLUDE_CENTER Marlin/Configuration.h
# Enable bed tramming audio feedback
configEnable BED_TRAMMING_AUDIO_FEEDBACK Marlin/Configuration.h
# Always enable PID edit and autotune menus
configEnable PID_EDIT_MENU Marlin/Configuration.h
configEnable PID_AUTOTUNE_MENU Marlin/Configuration.h
## FIXME: There's an active issue on Marlin's repository regarding this, so we MAY get this working eventually!
# Disable adaptive step smoothing
configDisable ADAPTIVE_STEP_SMOOTHING Marlin/Configuration_adv.h
# Enable display speaker mute option
configEnable SOUND_MENU_ITEM Marlin/Configuration_adv.h
# Disable the speaker by default
# configDisable SOUND_ON_DEFAULT Marlin/Configuration_adv.h
# Enable additional display features (some are useful when used with OctoPrint for example)
configEnable STATUS_MESSAGE_SCROLLING Marlin/Configuration_adv.h
# TODO: Leaving this alone for now (enabled by default)
# TODO: Why would BTT have this disabled?
# Disable dynamic memory allocation in SD card menus
configValue SDSORT_DYNAMIC_RAM false Marlin/Configuration_adv.h
## TODO: We may want to change this, if we're going to use the BTT screen's SD card slot instead?
# TODO: Leaving this alone for now, pretty sure it'll default to the board values anyway
# Set default SD card connection type
configValue SDCARD_CONNECTION ONBOARD Marlin/Configuration_adv.h
# TODO: Leaving this alone for now (disabled by default)
# Enable UTF filename support
configEnable UTF_FILENAME_SUPPORT Marlin/Configuration_adv.h
# Enable long filename support
configEnable LONG_FILENAME_HOST_SUPPORT Marlin/Configuration_adv.h
# Enable long filename write support
configEnable LONG_FILENAME_WRITE_SUPPORT Marlin/Configuration_adv.h
# TODO: This is already enabled by default
# Enable scrolling filenames
configEnable SCROLL_LONG_FILENAMES Marlin/Configuration_adv.h
# TODO: Leaving this alone for now (disabled by default)
# TODO: UPDATE: We don't really need this, so disabling it for now
# # Enable automatic reporting of SD card status
# configEnable AUTO_REPORT_SD_STATUS Marlin/Configuration_adv.h
# TODO: Leaving this alone for now (enabled by default)
# Enable SD card host drive support
#configDisable NO_SD_HOST_DRIVE Marlin/Configuration_adv.h
# Configure babystepping
# configEnable BABYSTEP_WITHOUT_HOMING Marlin/Configuration_adv.h
# configEnable BABYSTEP_ALWAYS_AVAILABLE Marlin/Configuration_adv.h
configDisable DOUBLECLICK_FOR_Z_BABYSTEPPING Marlin/Configuration_adv.h
# configEnable BABYSTEP_DISPLAY_TOTAL Marlin/Configuration_adv.h
# Enable emergency parser
configEnable EMERGENCY_PARSER Marlin/Configuration_adv.h
# Enable advanced pausing for filament change (disabled by default, enabled in Jyers)
configEnable ADVANCED_PAUSE_FEATURE Marlin/Configuration_adv.h
# TODO: Disabling for now to use the defaults instead
# TODO: This may need adjusting
# Configure filament unload length (default is 100)
configValue FILAMENT_CHANGE_UNLOAD_LENGTH 0 Marlin/Configuration_adv.h
configValue FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 10 Marlin/Configuration_adv.h
# TODO: Disabling for now to use the defaults instead
# TODO: This may need adjusting
# Configure filament fast load length (default is 0)
#configValue FILAMENT_CHANGE_FAST_LOAD_LENGTH 350 Marlin/Configuration_adv.h
# TODO: Reverting this back to the default 10, but may need adjusting for direct drive?
# Configure filament fast load feed rate (speed, default is 6, Jyers uses 10)
#configValue FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 Marlin/Configuration_adv.h
# Enable head parking during pause and filament change (disabled by default, enabled in Jyers)
configEnable PARK_HEAD_ON_PAUSE Marlin/Configuration_adv.h
# TODO: Leaving this alone for now
# Run homing before changing filament (disabled by default)
#configEnable HOME_BEFORE_FILAMENT_CHANGE Marlin/Configuration_adv.h
# Enable display and g-code support for filament loading and unloading (disabled by default, enabled in Jyers)
configEnable FILAMENT_LOAD_UNLOAD_GCODES Marlin/Configuration_adv.h
## TODO: If we don't use hybrid threshold/spreadcycle, is this "custom" chopper timing still fine?!
## TODO: UPDATE: Not yet sure if it was this, but something caused MAJOR motor malfunctions, so disabling this for now!
# configValue CHOPPER_TIMING CHOPPER_09STEP_24V Marlin/Configuration_adv.h
if ($HYBRID_THRESHOLD); then
# configValue CHOPPER_TIMING CHOPPER_09STEP_24V Marlin/Configuration_adv.h
configEnable HYBRID_THRESHOLD Marlin/Configuration_adv.h
## TODO: 100 seems very noisy, but 110 is still noisy?!
configValue X_HYBRID_THRESHOLD 110 Marlin/Configuration_adv.h
configValue Y_HYBRID_THRESHOLD 110 Marlin/Configuration_adv.h
## TODO: Test 120 next, if our latest changes don't sound good enough at 110?
# configValue X_HYBRID_THRESHOLD 120 Marlin/Configuration_adv.h
# configValue Y_HYBRID_THRESHOLD 120 Marlin/Configuration_adv.h
## FIXME: This is 3 by default, which means it probably gets triggered too easily, right?
# Configure hybrid threshold (still disabled by default)
# configValue Z_HYBRID_THRESHOLD 20 Marlin/Configuration_adv.h
fi
# TODO: Leaving these alone for now
# Configure sensorless homing (still disably by default)
configValue X_STALL_SENSITIVITY 72 Marlin/Configuration_adv.h
configValue Y_STALL_SENSITIVITY 72 Marlin/Configuration_adv.h
configValue Z_STALL_SENSITIVITY 10 Marlin/Configuration_adv.h
configEnable IMPROVE_HOMING_RELIABILITY Marlin/Configuration_adv.h
# TODO: This needs proper testing!
## TODO: UPDATE: Supposedly leaving this enabled won't do anything if drivers are in standalone mode, which they are for us?!
## TODO: UPDATE: Enabled this (commented out) and homing went on the fritz, loud motors etc.
# Disable square wave stepping (BTT has this disabled, Creality has it enabled)
configDisable SQUARE_WAVE_STEPPING Marlin/Configuration_adv.h
# TODO: Leaving these alone for now
# TODO: UPDATE: Disabled the first 3 to fallback to polling,
# and not sure if fan change was ever even being utilized
# Enable additional reporting etc. features
# configEnable AUTO_REPORT_POSITION Marlin/Configuration_adv.h
# configEnable M114_DETAIL Marlin/Configuration_adv.h
# # configEnable M114_REALTIME Marlin/Configuration_adv.h
# configEnable REPORT_FAN_CHANGE Marlin/Configuration_adv.h
# Enable telling the host to pause on M76 (pause print job)
configEnable HOST_PAUSE_M76 Marlin/Configuration_adv.h
# TODO: Leaving this alone for now, probably requires an LCD anyway
# Enable fan control options in LCD (might not work with DWIN?)
configEnable CONTROLLER_FAN_EDITABLE Marlin/Configuration_adv.h
# Enable showing remaining time (disabled by default, enabled in Jyers)
configEnable SET_PROGRESS_MANUALLY Marlin/Configuration_adv.h
configEnable SHOW_REMAINING_TIME Marlin/Configuration_adv.h
configEnable SET_PROGRESS_PERCENT Marlin/Configuration_adv.h
configEnable SET_REMAINING_TIME Marlin/Configuration_adv.h
configEnable M73_REPORT Marlin/Configuration_adv.h
# TODO: Not sure if this only applies to MarlinUI or something?
# Either way, keeping it disabled for now
# Further display/status info customizations
# configEnable STATUS_HEAT_PERCENT Marlin/Configuration_adv.h # Show heating in a progress bar
## TODO: Is this fine? Because our Z is always holding now, so lower current would seem better?
# Configure the current multiplier when holding/locked (default is 0.5)
configValue HOLD_MULTIPLIER "0.3" Marlin/Configuration_adv.h
# FIXME: Our Y runs very hot, so maybe we need to bring down its current?
# X also runs quite hot and Z isn't exactly cool either..
# TODO: The motors definitely run a bit hot now, but with the DD, it might just need all the power it can get?
# FIXME: This might be too high, but it's exactly at 2 x 580 right now..
# https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/issues/515
## TODO: UPDATE: Increase the currents to "max values" again,
## as we're now running them with a timing belt and may
## need more power/torque to handle the tighter movements?!
# Configure stepper motor driver currents
configValue Z_CURRENT 1160 Marlin/Configuration_adv.h
# TODO: Testing lower currents with DD
# configValue Z_CURRENT 850 Marlin/Configuration_adv.h
# TODO: Leaving this alone for now
# TODO: UPDATE: Apparently this is "required" by MONITOR_DRIVER_STATUS?
# Enable stepper driver debugging
configEnable TMC_DEBUG Marlin/Configuration_adv.h
## TODO: Add build configs that toggle between meatpack and binary transfer stuff?
## NOTE: Marlin BFT pip package is basically dead, so no point in even trying to use it!
# Meatpack and Binary File Transfer can NOT be enabled at the same time!
# Enable meatpack g-code compression (disabled by default, enabled in Jyers)
configEnable MEATPACK_ON_SERIAL_PORT_1 Marlin/Configuration_adv.h
configEnable MEATPACK_ON_SERIAL_PORT_2 Marlin/Configuration_adv.h
configEnable GCODE_CASE_INSENSITIVE Marlin/Configuration_adv.h
# Enable host actions commands (disabled by default, enabled in Jyers)
configEnable HOST_ACTION_COMMANDS Marlin/Configuration_adv.h
# Customize host action commands (disabled by default, enabled in Jyers)
configEnable HOST_PROMPT_SUPPORT Marlin/Configuration_adv.h
configEnable HOST_START_MENU_ITEM Marlin/Configuration_adv.h
configEnable HOST_SHUTDOWN_MENU_ITEM Marlin/Configuration_adv.h
## TODO: Disabled MGC, as we're now using a timing belt instead!
# # Enable mechanical gantry calibration
# configEnable MECHANICAL_GANTRY_CALIBRATION Marlin/Configuration_adv.h
# # Configure additional options for mechanical gantry calibration
# configValue GANTRY_CALIBRATION_CURRENT "Z_CURRENT \/ 3" Marlin/Configuration_adv.h
# # TODO: This might be too much, just trying to account for any larger deviations!
# configValue GANTRY_CALIBRATION_EXTRA_HEIGHT 15 Marlin/Configuration_adv.h
# # configValue GANTRY_CALIBRATION_EXTRA_HEIGHT 10 Marlin/Configuration_adv.h
# # configValue GANTRY_CALIBRATION_EXTRA_HEIGHT 5 Marlin/Configuration_adv.h
# configValue GANTRY_CALIBRATION_FEEDRATE 500 Marlin/Configuration_adv.h
# configValue GANTRY_CALIBRATION_COMMANDS_POST \"G28\;G28\ Z\" Marlin/Configuration_adv.h
# TODO: I think this only affects LCDs, not DWIN displays, so might be redundant?
# Lower the bootscreen timeout
# configValue BOOTSCREEN_TIMEOUT 0 Marlin/Configuration_adv.h
# TODO: Leaving these alone for now (all defaults seem fine/same, these would just be unnecessarily high)
# Increase buffers etc.
configEnable ADVANCED_OK Marlin/Configuration_adv.h
# TODO: UPDATE: All of the values below seem unnecessary?
# May even want to bring our baud rates back to 115200?
## TODO: Reverted buffer sizes back to defaults
# configValue BLOCK_BUFFER_SIZE 64 Marlin/Configuration_adv.h # Default 8/16
# # # configValue MAX_CMD_SIZE 96 Marlin/Configuration_adv.h # Default 96
# configValue BUFSIZE 32 Marlin/Configuration_adv.h # Default 4
# configValue TX_BUFFER_SIZE 32 Marlin/Configuration_adv.h # Default 0
# configValue RX_BUFFER_SIZE 2048 Marlin/Configuration_adv.h # Default <disabled>
# TODO: Leaving these alone for now
# # Set temperature watcher intervals (defaults are 40/180/180, Jyers uses 30/120/120)
# # configValue WATCH_TEMP_PERIOD 20 Marlin/Configuration_adv.h
# configValue WATCH_TEMP_PERIOD 30 Marlin/Configuration_adv.h
# # configValue THERMAL_PROTECTION_BED_PERIOD 20 Marlin/Configuration_adv.h
# configValue THERMAL_PROTECTION_BED_PERIOD 30 Marlin/Configuration_adv.h
# configValue WATCH_BED_TEMP_PERIOD 60 Marlin/Configuration_adv.h
# FIXME: #error "LCD_BACKLIGHT_TIMEOUT requires an LCD with encoder or keypad."
# Turn off display after 30 seconds
#configValue LCD_BACKLIGHT_TIMEOUT 30 Marlin/Configuration_adv.h
## TODO: UPDATE: Trying this again, because the devs keep recommending it for
## various issues related to babystepping, so it's worth testing more!
# TODO: Leaving this alone for now (disabled by default)
# TODO: This MAY just help with our babystepping issues!
# TODO: Disabling this again, as our babystepping is just too damn unreliable!
# Enable integrated babystepping (experimental)
# configEnable INTEGRATED_BABYSTEPPING Marlin/Configuration_adv.h
## FIXME: Do we gain anything from having this enabled?
# Combine babystepping with the initial Z probe height
# configEnable BABYSTEP_ZPROBE_OFFSET Marlin/Configuration_adv.h
# TODO: Leaving this alone for now, especially with INTEGRATED_BABYSTEPPING now disabled
# Override default minimum steppper direction change delays (changes both post and pre dir delays)
# NOTE: Default value for TSMC2209 is 60, which SHOULD work when INTEGRATED_BABYSTEPPING is also enabled!
# https://github.com/MarlinFirmware/Marlin/issues/17323
#configValue MINIMUM_STEPPER_POST_DIR_DELAY 100 Marlin/Configuration_adv.h
# TODO: Research "firmware retraction" thoroughly and then enable/configure/test this!
# https://marlinfw.org/docs/gcode/G010.html
# https://marlinfw.org/docs/features/fwretract.html
# https://blog.prusaprinters.org/slic3r-and-marlin-configuration-for-reprap-firmware-retraction-2_3686/
# https://damsteen.nl/blog/2021/05/06/adjustable-retractions-during-printing-with-marlin-firmware-retractions
configEnable FWRETRACT Marlin/Configuration_adv.h
## TODO: Configure our calibrated firmware retraction settings here!
# TODO: UPDATE: This makes much more noise and is faster/more aggressive,
# however it MAY have helped keep the Z axis motors in sync!
# FIXME: This is a very experimental change to see if this helps at all!
# Disable stealthchopping for the Z axis
#configDisable STEALTHCHOP_Z Marlin/Configuration_adv.h
# "Alternative LCD_INFO_SCREEN_STYLE requires 20x4 Character LCD."
# Set LCD info screen style between Marlin (0) and Prusa (1)
# configValue LCD_INFO_SCREEN_STYLE 1 Marlin/Configuration.h
# Enable probe offset wizard
configEnable PROBE_OFFSET_WIZARD Marlin/Configuration_adv.h
configValue PROBE_OFFSET_WIZARD_START_Z "0.0" Marlin/Configuration_adv.h
# Enable the LCD info menu
configEnable LCD_INFO_MENU Marlin/Configuration_adv.h
# Disable Z axis idling when inactive, while still allowing for fans to be disabled
configValue DISABLE_INACTIVE_Z false Marlin/Configuration_adv.h
configEnable CONTROLLER_FAN_IGNORE_Z Marlin/Configuration_adv.h
# TODO: This is a MarlinUI or TFT feature, so don't need it (yet at least)
# Enable assisted tramming
configEnable ASSISTED_TRAMMING Marlin/Configuration_adv.h
# TODO: This is a MarlinUI or TFT feature, so don't need it (yet at least)
# FIXME: Calculate/calibrate this for our specific printer?!
# Set assisted tramming probing positions
#configValue TRAMMING_POINT_XY "{ { 20, 20 }, { 180, 20 }, { 180, 180 }, { 20, 180 } }" Marlin/Configuration_adv.h
# TODO: This is a MarlinUI or TFT feature, so don't need it (yet at least)
# Enable the assisted tramming wizard (likely not usable without an LCD)
configEnable ASSISTED_TRAMMING_WIZARD Marlin/Configuration_adv.h
# TODO: This is a MarlinUI or TFT feature, so don't need it (yet at least)
# Enable moving the nozzle out of the way for adjusting when assisted tramming is enabled
# configEnable ASSISTED_TRAMMING_WAIT_POSITION Marlin/Configuration_adv.h
## FIXME: Disabled until we have separate builds with meatpack vs binary file transfer!
## TODO: Add build configs that toggle between meatpack and binary transfer stuff?
## NOTE: Marlin BFT pip package is basically dead, so no point in even trying to use it!
# Meatpack and Binary File Transfer can NOT be enabled at the same time!
# # Enable Marlin binary file transfer support (marlinbft)
configEnable BINARY_FILE_TRANSFER Marlin/Configuration_adv.h
# ## TODO: !!! THIS IS RELATED TO BINARY_FILE_TRANSFER AND MEATPACK, SEE ABOVE !!!
# Enable custom firmware uploading (eg. with BINARY_FILE_TRANSFER + a USB connection)
configEnable CUSTOM_FIRMWARE_UPLOAD Marlin/Configuration_adv.h
# Disable meatpack when using binary file transfer and/or custom firmware upload
configDisable MEATPACK_ON_SERIAL_PORT_1 Marlin/Configuration_adv.h
configDisable MEATPACK_ON_SERIAL_PORT_2 Marlin/Configuration_adv.h
# configEnable USE_BIG_EDIT_FONT Marlin/Configuration_adv.h
# configEnable USE_SMALL_INFOFONT Marlin/Configuration_adv.h
## NOTE: Not supported on our display at the moment (not sure about the FYSETC one though?)
# configValue DISPLAY_SLEEP_MINUTES 2 Marlin/Configuration_adv.h
# FIXME: Set this to 30 for M3 screws, 40 for M4 screws, 50 for M5 screws, etc.
# Set the bed screw thread size (M3, M4, M5 etc.)
#configValue TRAMMING_SCREW_THREAD 40 Marlin/Configuration_adv.h
## TODO: Test fan kickstarting, to enable higher RPM more quickly and reliably
configEnable FAN_KICKSTART_TIME Marlin/Configuration_adv.h
## TODO: Check if Cura support bezier curves and have this enabled, as this should benefit ARC massively!
configEnable BEZIER_CURVE_SUPPORT Marlin/Configuration_adv.h
# Enable additional ARC support
configEnable ARC_P_CIRCLES Marlin/Configuration_adv.h
## FIXME: "POWER_MONITOR_CURRENT requires a valid POWER_MONITOR_CURRENT_PIN."
## TODO: Test if we can utilize these or not
# configEnable POWER_MONITOR_CURRENT Marlin/Configuration_adv.h
# configEnable POWER_MONITOR_VOLTAGE Marlin/Configuration_adv.h
## TODO: Test if this improves the host actions/prompts?
# configEnable HOST_STATUS_NOTIFICATIONS Marlin/Configuration_adv.h # NOTE: This is too spammy..
## FIXME: We can't use this due to "M100 - unsupported CPU" error
## TODO: Temporarily enable, so we can monitor our memory usage/free memory with the M100 g-code!
# configEnable M100_FREE_MEMORY_WATCHER Marlin/Configuration_adv.h
# Enable stepper motor driver status monitoring
# NOTE: This will monitor the TMC2209 drivers, drop the current
# and eventually stop if something goes wrong!
configEnable MONITOR_DRIVER_STATUS Marlin/Configuration_adv.h
# TODO: Disabling babystepping customizations for now
# TODO: Not specific to direct drive, but using this for debugging right now!
# Use millimeters instead of micro-steps for babystepping multiplicator
#configEnable BABYSTEP_MILLIMETER_UNITS Marlin/Configuration_adv.h
#configValue BABYSTEP_MULTIPLICATOR_Z 0.01 Marlin/Configuration_adv.h
#configValue BABYSTEP_MULTIPLICATOR_XY BABYSTEP_MULTIPLICATOR_Z Marlin/Configuration_adv.h
# TODO: Disabled these for now, just because I wanted to try how stock feels again!
# ## TODO: Why are we doing these babystep adjustments again?!
# # Increase the babystepping amount from 0.0025mm to 0.01mm
# configValue BABYSTEP_MULTIPLICATOR_Z 4 Marlin/Configuration_adv.h
# # Set the X and Y axis babystepping to equal the Z axis
# configValue BABYSTEP_MULTIPLICATOR_XY BABYSTEP_MULTIPLICATOR_Z Marlin/Configuration_adv.h
# # Increase fine manual move amount from 0.025mm to 0.005mm
# configValue FINE_MANUAL_MOVE 0.005 Marlin/Configuration_adv.h
# TODO: Disable just to see if it reduces the sounds?!
# TODO: This needs HEAVY testing, as it may be too aggressive!
# Disable stealthschop for the extruder
#configDisable STEALTHCHOP_E Marlin/Configuration_adv.h
## TODO: UPDATE: After we recalibrate firmware retraction, we should 100% try enabling this again!
# FIXME: Disabling firmware retraction for now, as it almost seems
# like we're unable to disable it with g-code, as our stringing
# issues are identical, no matter how much we adjust retraction!?
# Enable and configure firmware retraction
# TODO: Disabled firmware retract for now, continuing to let the slicer do its thing instead!
# configEnable FWRETRACT Marlin/Configuration_adv.h
# configValue MAX_AUTORETRACT 2.0 Marlin/Configuration_adv.h
# # # FIXME: Adjust retract length and feedrate to match known good values for the Bondtech extruder!
# configValue RETRACT_LENGTH 1 Marlin/Configuration_adv.h
# configValue RETRACT_FEEDRATE 25 Marlin/Configuration_adv.h
## FIXME: This is Y+5/Y-5, but this somehow broke tramming?!
# Adjust our bed tramming positions to be more accurately over the bed screws
# configValue TRAMMING_POINT_XY "{ { 20, 25 }, { 180, 25 }, { 180, 185 }, { 20, 185 } }" Marlin/Configuration_adv.h
configValue TRAMMING_POINT_XY "{ { 28, 26 }, { 198, 26 }, { 198, 197 }, { 28, 197 } }" Marlin/Configuration_adv.h
## TODO: The R(ight) and B(ack) might be wrong, if they don't use bed size but max pos instead!
# Adjust assisted tramming bed offsets
configValue BED_TRAMMING_INSET_LFRB "{ 28, 26, 28, 26 }" Marlin/Configuration.h
## FIXME: This needs to be escaped correctly, otherwise it won't work.. (requires double escaping + double quotes + other bullshit)
# Custom abort print g-code that presents the print and makes it easier to clean up
# configValue EVENT_GCODE_SD_ABORT "G91; G1 E-2 F2700; G1 E-2 Z0.2 F2400; G1 X5 Y5 F3000; G1 Z10; G90; G1 X0 Y220; M106 S0; M104 S0; M140 S0; M84 X Y E" Marlin/Configuration_adv.h
# Move the media menu to the top
configEnable MEDIA_MENU_AT_TOP Marlin/Configuration_adv.h
- name: 'Configure: PID'
if: ${{ !matrix.mpc }}
id: configure_pid
run: |-
# Source the helper build script (note the "true" at the end, which ensure we only want to source the script!)
cd ${GITHUB_WORKSPACE}
source ${GITHUB_WORKSPACE}/.github/workflows/scripts/configure_build_script.sh true
# Enable PID and disable MPC
configEnable PIDTEMP Marlin/Configuration.h
configDisable MPCTEMP Marlin/Configuration.h
# Configure default PID for the bed
configValue DEFAULT_bedKp 68.4903 Marlin/Configuration.h
configValue DEFAULT_bedKi 13.1712 Marlin/Configuration.h
configValue DEFAULT_bedKd 237.4331 Marlin/Configuration.h
## TODO: Configure default PID for the hotend
- name: 'Configure: MPC'
if: ${{ matrix.mpc }}
id: configure_mpc
run: |-
# Source the helper build script (note the "true" at the end, which ensure we only want to source the script!)
cd ${GITHUB_WORKSPACE}
source ${GITHUB_WORKSPACE}/.github/workflows/scripts/configure_build_script.sh true
# Disable PID and enable MPC
configDisable PIDTEMP Marlin/Configuration.h
configEnable MPCTEMP Marlin/Configuration.h
# Configure MPC
# NOTE: Use "M306 T" G-Code to autotune MPC for the hotend
configEnable MPC_EDIT_MENU Marlin/Configuration.h
configEnable MPC_AUTOTUNE_MENU Marlin/Configuration.h
# Customize MPC
configValue MPC_BLOCK_HEAT_CAPACITY "{ 13.8300f }" Marlin/Configuration.h
configValue MPC_SENSOR_RESPONSIVENESS "{ 0.2342f }" Marlin/Configuration.h
configValue MPC_AMBIENT_XFER_COEFF "{ 0.1307f }" Marlin/Configuration.h
configValue MPC_AMBIENT_XFER_COEFF_FAN255 "{ 0.1429f }" Marlin/Configuration.h
configValue FILAMENT_HEAT_CAPACITY_PERMM "{ 0.0056f}" Marlin/Configuration.h
## TODO: MPC only works for the hotend right now, so still need PID for the bed, I think?
# Configure default PID for the bed
configValue DEFAULT_bedKp 68.4903 Marlin/Configuration.h
configValue DEFAULT_bedKi 13.1712 Marlin/Configuration.h
configValue DEFAULT_bedKd 237.4331 Marlin/Configuration.h
- name: 'Configure: BLTouch'
if: ${{ matrix.bltouch }}
id: configure_bltouch
env:
HIGH_SPEED: ${{ matrix.high-speed }}
run: |-
# Source the helper build script (note the "true" at the end, which ensure we only want to source the script!)
cd ${GITHUB_WORKSPACE}
source ${GITHUB_WORKSPACE}/.github/workflows/scripts/configure_build_script.sh true
# Disable Z axis endstop switch support (we use BLTouch/CRTouch instead, default is enabled)
configDisable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN Marlin/Configuration.h
# Enable Z homing using a probe (default is disabled)
configEnable USE_PROBE_FOR_Z_HOMING Marlin/Configuration.h
# Ensure manual probing is always disabled when using BLTouch/CRTouch
configDisable PROBE_MANUALLY Marlin/Configuration.h
# Enable safe homing on the Z axis (disabled by default, enabled in Jyers)
configEnable Z_SAFE_HOMING Marlin/Configuration.h
# Tweak safe Z homing position (safe position to move to when homing only Z)
configValue Z_SAFE_HOMING_X_POINT X_CENTER Marlin/Configuration.h
configValue Z_SAFE_HOMING_Y_POINT Y_CENTER Marlin/Configuration.h
# configValue Z_SAFE_HOMING_X_POINT "((X_BED_SIZE - 10) \/ 2)" Marlin/Configuration.h
# configValue Z_SAFE_HOMING_Y_POINT "((Y_BED_SIZE - 10) \/ 2)" Marlin/Configuration.h
# Enable BLTouch/CRTouch support
configEnable BLTOUCH Marlin/Configuration.h
# Enable BLTouch High Speed mode (HS) depending on the firmware configuration
if ($HIGH_SPEED); then
configValue BLTOUCH_HS_MODE true Marlin/Configuration_adv.h
else
configDisable BLTOUCH_HS_MODE Marlin/Configuration_adv.h
fi
## FIXME: Can this cause our print head crashing into the bed when probing when NOT set?!
# TODO: Pretty sure this isn't required for BLTouch v3.1, so disabling..
# Decreate probing delay for BLTouch
# WARNING: Requires a BLTouch 3.0 or later
# configValue BLTOUCH_DELAY 200 Marlin/Configuration_adv.h
# configValue BLTOUCH_DELAY 300 Marlin/Configuration_adv.h
configValue BLTOUCH_DELAY 350 Marlin/Configuration_adv.h ## TODO: This may be necessary for CRTouch, but definitely not for BLTouch?!
# Increase X/Y axis feed rate (travel speed) when probing (for BLTouch/UBL, default is 50x60, Jyers config uses 133x60)
configValue XY_PROBE_FEEDRATE "(133*60)" Marlin/Configuration.h
# Set min/max probe offsets (defaults are -10 and 10, same for Jyers)
# configValue Z_PROBE_OFFSET_RANGE_MIN -5 Marlin/Configuration.h
# configValue Z_PROBE_OFFSET_RANGE_MAX 10 Marlin/Configuration.h
# Enable Z probe testing (for BLTouch/UBL)
configEnable Z_MIN_PROBE_REPEATABILITY_TEST Marlin/Configuration.h
# Enable/increase Z clearance
# configValue Z_HOMING_HEIGHT 10 Marlin/Configuration.h
# Require heated bed and nozzle when auto-leveling
# configEnable PREHEAT_BEFORE_LEVELING Marlin/Configuration.h
# configValue LEVELING_NOZZLE_TEMP 150 Marlin/Configuration.h
# configValue LEVELING_BED_TEMP 50 Marlin/Configuration.h
# Enable bed tramming with a probe
# configEnable BED_TRAMMING_USE_PROBE Marlin/Configuration.h
# Enable multiple probes
configValue MULTIPLE_PROBING 2 Marlin/Configuration.h
# Enable extra probing
# configEnable EXTRA_PROBING Marlin/Configuration.h
- name: 'Configure: UBL'
if: ${{ matrix.ubl }}
id: configure_ubl
env:
GRID: ${{ matrix.grid }}
run: |-
# Source the helper build script (note the "true" at the end, which ensure we only want to source the script!)
cd ${GITHUB_WORKSPACE}
source ${GITHUB_WORKSPACE}/.github/workflows/scripts/configure_build_script.sh true
# Enable Universal Bed Leveling (UBL)
configEnable AUTO_BED_LEVELING_UBL Marlin/Configuration.h
# Disable bilinear leveling (enabled by default)
configDisable AUTO_BED_LEVELING_BILINEAR Marlin/Configuration.h
# Increase default mesh inset for UBL
# configValue MESH_INSET 10 Marlin/Configuration.h
# TODO: Lowered mesh inset back to default 1
# configValue MESH_INSET 1 Marlin/Configuration.h
# configValue MESH_INSET 10 Marlin/Configuration.h
configValue MESH_INSET 5 Marlin/Configuration.h # Reduced mesh inset to account for our already offset bed size and positions
# Enable Hilbert Curve for UBL (reduces travel)
configEnable UBL_HILBERT_CURVE Marlin/Configuration.h
# Disable UBL automatic mesh saving
# configDisable UBL_SAVE_ACTIVE_ON_M500 Marlin/Configuration.h
# Enable Marlin's UBL mesh wizard
configEnable UBL_MESH_WIZARD Marlin/Configuration.h
# Enable UBL mesh editing menu
configEnable MESH_EDIT_MENU Marlin/Configuration.h
# Set the leveling grid size for the current firmware configuration
configValue GRID_MAX_POINTS_X $GRID Marlin/Configuration.h
# Enable leveling after completion (for BLTouch/UBL/ABL)
configEnable RESTORE_LEVELING_AFTER_G28 Marlin/Configuration.h
# Increase the probing margin (for BLTouch/UBL/ABL, default is 10)
# configValue PROBING_MARGIN 10 Marlin/Configuration.h
# configValue PROBING_MARGIN 20 Marlin/Configuration.h
configValue PROBING_MARGIN 5 Marlin/Configuration.h # Since our bed size and positions already account for this, we don't need additional margin?
# Disable retrying bed leveling after a failed attempt
configDisable G29_RETRY_AND_RECOVER Marlin/Configuration_adv.h
- name: 'Configure: Bed Leveling'
if: ${{ !matrix.ubl }}
id: configure_bed_leveling
run: |-
# Source the helper build script (note the "true" at the end, which ensure we only want to source the script!)
cd ${GITHUB_WORKSPACE}
source ${GITHUB_WORKSPACE}/.github/workflows/scripts/configure_build_script.sh true
# Ensure bilinear leveling is enabled (default is enabled)
configEnable AUTO_BED_LEVELING_BILINEAR Marlin/Configuration.h
## TODO: Do we need to specify anything else? Insets, probe offsets, etc?
# Enable retrying bed leveling after a failed attempt
configEnable G29_RETRY_AND_RECOVER Marlin/Configuration_adv.h
- name: 'Configure: Bondtech DDX v3'
if: ${{ matrix.direct-drive }}
id: configure_bondtech_ddx_v3
run: |-
# Source the helper build script (note the "true" at the end, which ensure we only want to source the script!)
cd ${GITHUB_WORKSPACE}
source ${GITHUB_WORKSPACE}/.github/workflows/scripts/configure_build_script.sh true
# Adjust e-steps for direct drive
configValue DEFAULT_AXIS_STEPS_PER_UNIT "{ 80.0, 80.0, 400.0, 415.0 }" Marlin/Configuration.h
# Customized and optimized speed and acceleration values for this particular printer/firmware setup
# configValue DEFAULT_MAX_FEEDRATE "{ 500, 500, 5, 25}" Marlin/Configuration.h
configValue DEFAULT_MAX_FEEDRATE "{ 500, 500, 10, 50}" Marlin/Configuration.h
# configValue DEFAULT_MAX_FEEDRATE "{ 500, 500, 20, 50}" Marlin/Configuration.h
# configValue DEFAULT_MAX_FEEDRATE "{ 1000, 1000, 20, 50}" Marlin/Configuration.h
# configValue DEFAULT_MAX_ACCELERATION "{ 500, 500, 100, 1000 }" Marlin/Configuration.h
configValue DEFAULT_MAX_ACCELERATION "{ 500, 500, 100, 5000 }" Marlin/Configuration.h
# configValue DEFAULT_MAX_ACCELERATION "{ 1000, 1000, 100, 5000 }" Marlin/Configuration.h
# configValue DEFAULT_MAX_ACCELERATION "{ 2000, 2000, 100, 2000 }" Marlin/Configuration.h
configValue DEFAULT_ACCELERATION 500 Marlin/Configuration.h
# configValue DEFAULT_ACCELERATION 600 Marlin/Configuration.h
# configValue DEFAULT_ACCELERATION 750 Marlin/Configuration.h
# configValue DEFAULT_ACCELERATION 1000 Marlin/Configuration.h
configValue DEFAULT_RETRACT_ACCELERATION 500 Marlin/Configuration.h
# configValue DEFAULT_RETRACT_ACCELERATION 800 Marlin/Configuration.h
# configValue DEFAULT_RETRACT_ACCELERATION 1000 Marlin/Configuration.h
configValue DEFAULT_TRAVEL_ACCELERATION 1000 Marlin/Configuration.h
# configValue DEFAULT_TRAVEL_ACCELERATION 2000 Marlin/Configuration.h
# FIXME: X/Y/Z_CURRENT_HOME may need to be increased for faster homing!
# TODO: Increased Z homing from 4mm/s to 25mm/s
# Increase homing feed rates (homing speeds)
# DEFAULT: { (50*60), (50*60), (4*60) }
#configValue HOMING_FEEDRATE_MM_M "{ \(50\*60\), \(50\*60\), \(25\*60\) }" Marlin/Configuration.h
#configValue HOMING_FEEDRATE_MM_M "{ \(50\*60\), \(50\*60\), \(10\*60\) }" Marlin/Configuration.h
# configValue HOMING_FEEDRATE_MM_M "{ \(50\*60\), \(50\*60\), \(4\*60\) }" Marlin/Configuration.h
# TODO: Should we default back to BTT's homing speeds instead
# configValue HOMING_FEEDRATE_MM_M "{ \(150\*60\), \(150\*60\), \(10\*60\) }" Marlin/Configuration.h
# configValue HOMING_FEEDRATE_MM_M "{ \(80\*60\), \(80\*60\), \(8\*60\) }" Marlin/Configuration.h
# TODO: Lowered Z homing from 8*60 to 4*60, as otherwise the probe hits the bed quite hard
# configValue HOMING_FEEDRATE_MM_M "{ \(80\*60\), \(80\*60\), \(4\*60\) }" Marlin/Configuration.h
# TODO: Lowered homing rate back to defaults, in order to compensate for bed/mesh size and offsets after homing
configValue HOMING_FEEDRATE_MM_M "{ \(50\*60\), \(50\*60\), \(4\*60\) }" Marlin/Configuration.h
# FIXME: If 25mm/s isn't too fast, try that instead of 15mm/s?
# But DO remember that Z_PROBE_FEEDRATE_SLOW is set to
# exactly HALF of Z_PROBE_FEEDRATE_FAST, which means that
# the higher the first approach probe, the higher the slow probes are!
# TODO: Increased from 4mm/s to 15mm/s
# Increase probing speed for the first approach when double-probing (MULTIPLE_PROBING is set to 2)
#configValue Z_PROBE_FEEDRATE_FAST "\(15\*60\)" Marlin/Configuration.h
# TODO: Nozzle was hitting the bed, so trying to go a little bit slower here
#configValue Z_PROBE_FEEDRATE_FAST "\(8\*60\)" Marlin/Configuration.h
# configValue Z_PROBE_FEEDRATE_FAST "\(8\*60\)" Marlin/Configuration.h
# TODO: Lowered Z homing from 8*60 to 4*60 (DEFAULT!), as otherwise the probe hits the bed quite hard
configValue Z_PROBE_FEEDRATE_FAST "\(4\*60\)" Marlin/Configuration.h
# FIXME: WARNING! This may hit our bed REALLY fast!
# configValue Z_PROBE_FEEDRATE_FAST "\(8\*60\)" Marlin/Configuration.h
# TODO: Maybe we should speed up Z_PROBE_FEEDRATE_SLOW too,
# instead of always being half of Z_PROBE_FEEDRATE_FAST?
configValue Z_PROBE_FEEDRATE_SLOW "\(Z_PROBE_FEEDRATE_FAST \/ 2\)" Marlin/Configuration.h
# Adjust offsets for direct drive
# configValue NOZZLE_TO_PROBE_OFFSET "{ -31.24, -4.00, 0 }" Marlin/Configuration.h
## TODO: Should this be -1.46 or -1.44, eg. minus the "safe offset" or whatever?
# configValue NOZZLE_TO_PROBE_OFFSET "{ -31.00, -3.00, -1.48 }" Marlin/Configuration.h
# configValue NOZZLE_TO_PROBE_OFFSET "{ -31.00, -3.00, -1.44 }" Marlin/Configuration.h
# configValue NOZZLE_TO_PROBE_OFFSET "{ -31.00, -3.00, -1.19 }" Marlin/Configuration.h
configValue NOZZLE_TO_PROBE_OFFSET "{ -31.00, -3.00, -1.23 }" Marlin/Configuration.h
# configValue NOZZLE_TO_PROBE_OFFSET "{ -31.00, -3.00, -1.10 }" Marlin/Configuration.h
# Lower extruder current to roughly a half/third of the default (650 / 3 = 216)
#configValue E0_CURRENT 300 Marlin/Configuration_adv.h
# TODO: Since 400 works well enough, trying with 450 again
configValue E0_CURRENT 450 Marlin/Configuration_adv.h
# TODO: UPDATE: 400 works pretty well, I feel like!
# configValue E0_CURRENT 400 Marlin/Configuration_adv.h
# TODO: Further increasing extruder current, as 0.7 is the recommendation from Bondtech, I think?
#configValue E0_CURRENT 650 Marlin/Configuration_adv.h
## TODO: These need tweaking!
# Configure encoder resolution, acceleration etc.
# configValue ENCODER_10X_STEPS_PER_SEC 60 Marlin/Configuration_adv.h
# configValue ENCODER_100X_STEPS_PER_SEC 90 Marlin/Configuration_adv.h
# Configure the LCD timeout for returning to the main menu/status screen
configValue LCD_TIMEOUT_TO_STATUS 60000 Marlin/Configuration_adv.h
## FIXME: This seems to entirely break/disable all menu functionality?!
# configValue LCD_TIMEOUT_TO_STATUS -1 Marlin/Configuration_adv.h
## TODO: Redo and refactor Core config above, as it also defined hybrid threshold stuff!
# - name: 'Configure: Hybrid Threshold'
# if: ${{ matrix.hybrid-threshold }}
# id: configure_hybrid_threshold
# run: |-
# # Source the helper build script (note the "true" at the end, which ensure we only want to source the script!)
# cd ${GITHUB_WORKSPACE}
# source ${GITHUB_WORKSPACE}/.github/workflows/scripts/configure_build_script.sh true
# # Enable and configure Hybrid Threshold
# configEnable HYBRID_THRESHOLD Marlin/Configuration_adv.h
# configValue Z_HYBRID_THRESHOLD 20 Marlin/Configuration_adv.h # Default is 3 in Creality, 20 in BTT
# configValue E0_HYBRID_THRESHOLD 30 Marlin/Configuration_adv.h # Default is 30 in Creality and BTT
- name: 'Configure: Junction Deviation'
if: ${{ matrix.junction-deviation }}
id: configure_junction_deviation
run: |-
# Source the helper build script (note the "true" at the end, which ensure we only want to source the script!)
cd ${GITHUB_WORKSPACE}
source ${GITHUB_WORKSPACE}/.github/workflows/scripts/configure_build_script.sh true
# Enable junction deviation by disabling classic jerk handling
configDisable CLASSIC_JERK Marlin/Configuration.h
# Tweak junction deviation
# NOTE: 0.013 is the default
# configValue JUNCTION_DEVIATION_MM 0.013 Marlin/Configuration.h
# TODO: Trying 0.08 as the default, as suggested by Teaching Tech
# configValue JUNCTION_DEVIATION_MM 0.08 Marlin/Configuration.h
# TODO: Supposedly calibrated to 0.15, but the differences are impossible to see?!
# configValue JUNCTION_DEVIATION_MM 0.15 Marlin/Configuration.h
# FIXME: Recalibrate this and check for bulging AND ringing! This is just a test value!
# configValue JUNCTION_DEVIATION_MM 0.10 Marlin/Configuration.h
# Calibrated JD with LIN_ADV enabled
# NOTE: 0.01-0.03 looks like the ideal value, while 0.04-0.05 and above cause bulging edges?
# configValue JUNCTION_DEVIATION_MM 0.03 Marlin/Configuration.h
# configValue JUNCTION_DEVIATION_MM 0.005 Marlin/Configuration.h ## FIXME: Calculate a new JD value!
configValue JUNCTION_DEVIATION_MM 0.06 Marlin/Configuration.h
- name: 'Configure: Linear Advance'
if: ${{ matrix.linear-advance }}
id: configure_linear_advance
env:
DISPLAY: ${{ matrix.display }}
run: |-
# Source the helper build script (note the "true" at the end, which ensure we only want to source the script!)
cd ${GITHUB_WORKSPACE}
source ${GITHUB_WORKSPACE}/.github/workflows/scripts/configure_build_script.sh true
# Increase extruder jerk for linear advance
# configValue DEFAULT_EJERK 15.0 Marlin/Configuration.h
# FIXME: I'm pretty sure jerk is a big part of our problem,
# so keep trying and perhaps even try without linear advance and/or junction deviation?
# configValue DEFAULT_EJERK 5.0 Marlin/Configuration.h
## FIXME: People are saying that S-Curve does NOT work well with linear advance,
## so we're giving it a go without it, see how that pans out!
# configDisable S_CURVE_ACCELERATION Marlin/Configuration.h
# Enable linear advance
configEnable LIN_ADVANCE Marlin/Configuration_adv.h
#configValue ADVANCE_K 0.15 Marlin/Configuration_adv.h
# TODO: Calibrated K factor to exactly 0.25 (0.20 is also good)
#configValue ADVANCE_K 0.25 Marlin/Configuration_adv.h
# TODO: Re-calibrated and 0.15 now looks the best!
#configValue ADVANCE_K 0.15 Marlin/Configuration_adv.h
## FIXME: Re-calibrate K again! The value below is currently NOT accurate anymore!
# configValue ADVANCE_K 0.11 Marlin/Configuration_adv.h
configValue ADVANCE_K 0.12 Marlin/Configuration_adv.h
# configValue ADVANCE_K 0.6 Marlin/Configuration_adv.h ## FIXME: Re-calibrate linear advance
## NOTE: We set linear advance K value to zero, so that it's effectively disabled by default!
# configValue ADVANCE_K 0.0 Marlin/Configuration_adv.h
## FIXME: People are saying that S-Curve does NOT work well with linear advance,
## so we're giving it a go without it, see how that pans out!
# if [$DISPLAY == "BIGTREE_TFT35_E3_V3_0"]; then
# configDisable EXPERIMENTAL_SCURVE Marlin/Configuration_adv.h
# else
# configEnable EXPERIMENTAL_SCURVE Marlin/Configuration_adv.h
# fi
# configEnable EXPERIMENTAL_SCURVE Marlin/Configuration_adv.h
configEnable ALLOW_LOW_EJERK Marlin/Configuration_adv.h
- name: 'Configure: DWIN'
if: ${{ matrix.dwin }}
id: configure_dwin
run: |-
# Source the helper build script (note the "true" at the end, which ensure we only want to source the script!)
cd ${GITHUB_WORKSPACE}
source ${GITHUB_WORKSPACE}/.github/workflows/scripts/configure_build_script.sh true
## TODO: Configure DWIN for eg. Creality stock display
# Disable custom cable warnings
echo -e "#define NO_CONTROLLER_CUSTOM_WIRING_WARNING" >> Marlin/Configuration.h
- name: 'Configure: BIGTREE_TFT35_E3_V3_0'
if: ${{ contains(matrix.display, 'BTT_TFT35_V3_0') }}
id: configure_bigtree_tft35_e3_v3_0
run: |-
# Source the helper build script (note the "true" at the end, which ensure we only want to source the script!)
cd ${GITHUB_WORKSPACE}
source ${GITHUB_WORKSPACE}/.github/workflows/scripts/configure_build_script.sh true
# Disable other UIs
configDisable DWIN_MARLINUI_PORTRAIT Marlin/Configuration.h
configDisable DWIN_MARLINUI_LANDSCAPE Marlin/Configuration.h
configDisable DWIN_CREALITY_LCD Marlin/Configuration.h
configDisable DWIN_LCD_PROUI Marlin/Configuration.h
configDisable DWIN_CREALITY_LCD_JYERSUI Marlin/Configuration.h
configDisable DWIN_MARLINUI_PORTRAIT Marlin/Configuration.h
configDisable DWIN_MARLINUI_LANDSCAPE Marlin/Configuration.h
# Configure speaker
configEnable SPEAKER Marlin/Configuration.h
# FIXME: These produce a WAY too high pitched, "breaking" noise, so trying with defaults next!
# configValue LCD_FEEDBACK_FREQUENCY_DURATION_MS 20 Marlin/Configuration.h
# configValue LCD_FEEDBACK_FREQUENCY_HZ 1000 Marlin/Configuration.h
# TODO: Frequency of 5000 to 8000 seems fine, so long as duration isn't too high!
configValue LCD_FEEDBACK_FREQUENCY_DURATION_MS 30 Marlin/Configuration.h
configValue LCD_FEEDBACK_FREQUENCY_HZ 8000 Marlin/Configuration.h
## TODO: Experimental options for enabling the BTT BIGTREE_TFT35_E3_V3_0 display
configEnable CR10_STOCKDISPLAY Marlin/Configuration.h
# configEnable TFT_COLOR_UI Marlin/Configuration.h
# configEnable TOUCH_SCREEN Marlin/Configuration.h
configEnable G26_MESH_VALIDATION Marlin/Configuration.h
# FIXME: Can we then use both SD cards and USB ports?
# Configure serial ports for touch screem
## NOTE: This is for BTT TFT35 + USB
# configValue SERIAL_PORT 2 Marlin/Configuration.h
# configValue SERIAL_PORT_2 -1 Marlin/Configuration.h
## NOTE: This is for USB + TFT35
configValue SERIAL_PORT -1 Marlin/Configuration.h
configValue SERIAL_PORT_2 2 Marlin/Configuration.h
## TODO: Lowered baudrates back to 115200
configValue BAUDRATE 250000 Marlin/Configuration.h
# configValue BAUDRATE_2 250000 Marlin/Configuration.h
# configValue BAUDRATE 115200 Marlin/Configuration.h
configValue BAUDRATE_2 115200 Marlin/Configuration.h
## FIXME: People are saying that S-Curve does NOT work well with linear advance,
## so we're giving it a go without it, see how that pans out!
# configDisable S_CURVE_ACCELERATION Marlin/Configuration.h
# Enable additional reporting etc. features
configEnable AUTO_REPORT_POSITION Marlin/Configuration_adv.h
configEnable M115_GEOMETRY_REPORT Marlin/Configuration_adv.h
configEnable M114_DETAIL Marlin/Configuration_adv.h
configEnable M114_REALTIME Marlin/Configuration_adv.h
configEnable REPORT_FAN_CHANGE Marlin/Configuration_adv.h
configEnable AUTO_REPORT_SD_STATUS Marlin/Configuration_adv.h
configValue SERIAL_FLOAT_PRECISION 4 Marlin/Configuration_adv.h
configEnable M20_TIMESTAMP_SUPPORT Marlin/Configuration_adv.h
## FIXME: According to a review on Amazon, ULTIPANEL_FEEDMULTIPLY needs to be disabled,
## otherwise the display's encoder gets triggered by even the slightest vibrations of the printer,
## which is immediately apparent when the display is mounted on the printer.
## NOTE: The above IS true, for the most part anyway, eg. it drastically reduces the issue
configDisable ULTIPANEL_FEEDMULTIPLY Marlin/Configuration_adv.h
- name: 'Configure: FYSETC_MINI_12864_2_1'
if: ${{ contains(matrix.display, 'FYSETC_MINI_12864_2_1') }}
id: configure_fysetc_mini_12864_2_1
run: |-
# Source the helper build script (note the "true" at the end, which ensure we only want to source the script!)
cd ${GITHUB_WORKSPACE}
source ${GITHUB_WORKSPACE}/.github/workflows/scripts/configure_build_script.sh true
# Disable other UIs
configDisable DWIN_CREALITY_LCD Marlin/Configuration.h
configDisable DWIN_LCD_PROUI Marlin/Configuration.h
configDisable DWIN_CREALITY_LCD_JYERSUI Marlin/Configuration.h
configDisable DWIN_MARLINUI_PORTRAIT Marlin/Configuration.h
configDisable DWIN_MARLINUI_LANDSCAPE Marlin/Configuration.h
# Enable the FYSETC_MINI_12864_2_1 LCD display
configEnable FYSETC_MINI_12864_2_1 Marlin/Configuration.h
# Enable and configure Neopixel LED support
configEnable NEOPIXEL_LED Marlin/Configuration.h
# configValue NEOPIXEL_TYPE NEO_GRBW Marlin/Configuration.h
configValue NEOPIXEL_TYPE NEO_RGB Marlin/Configuration.h
# configDisable NEOPIXEL_PIN Marlin/Configuration.h
# configDisable NEOPIXEL_PIXELS Marlin/Configuration.h
# configDisable NEOPIXEL_BRIGHTNESS Marlin/Configuration.h
configEnable NEOPIXEL_STARTUP_TEST Marlin/Configuration.h
configValue NEOPIXEL_BKGD_INDEX_FIRST 0 Marlin/Configuration.h
configValue NEOPIXEL_BKGD_COLOR "{ 0, 255, 0, 0 }" Marlin/Configuration.h
# Configure serial
configValue SERIAL_PORT -1 Marlin/Configuration.h
configValue SERIAL_PORT_2 2 Marlin/Configuration.h
# Configure baudrates
configValue BAUDRATE 250000 Marlin/Configuration.h
configValue BAUDRATE_2 115200 Marlin/Configuration.h
# Disable custom cable warnings
echo -e "#define NO_CONTROLLER_CUSTOM_WIRING_WARNING" >> Marlin/Configuration.h
# Enable LCD control menu
configEnable LED_CONTROL_MENU Marlin/Configuration_adv.h
- name: 'Configure: Input Shaping'
if: ${{ matrix.input-shaping }}
id: configure_input_shaping
run: |-
# Source the helper build script (note the "true" at the end, which ensure we only want to source the script!)
cd ${GITHUB_WORKSPACE}
source ${GITHUB_WORKSPACE}/.github/workflows/scripts/configure_build_script.sh true
# Enable input shaping and its menu item(s)
configEnable INPUT_SHAPING Marlin/Configuration_adv.h
configEnable SHAPING_MENU Marlin/Configuration_adv.h
- name: Compile Marlin Firmware (${{ matrix.board }})
# if: success() # Ensure we only run this step if the previous one succeeded
id: compile_marlin_firmware
env:
BOARD: ${{ matrix.board }}
BLTOUCH: ${{ matrix.bltouch }}
GRID: ${{ matrix.grid }}
HIGH_SPEED: ${{ matrix.high-speed }}
DIRECT_DRIVE: ${{ matrix.direct-drive }}
VERSION: ${{ env.RELEASE_VERSION }}
UBL: ${{ matrix.ubl }}
LINEAR_ADVANCE: ${{ matrix.linear-advance }}
JUNCTION_DEVIATION: ${{ matrix.junction-deviation }}
HYBRID_THRESHOLD: ${{ matrix.hybrid-threshold }}
MPC: ${{ matrix.mpc }}
INPUT_SHAPING: ${{ matrix.input-shaping }}
DISPLAY: ${{ matrix.display }}
DWIN: ${{ matrix.dwin }}
run: |-
# Generate a name for the firmware and export it as a step output
if [ ! -z "$DISPLAY" ]; then DISPLAY_LABEL=-$DISPLAY; else DISPLAY_LABEL=; fi;
if ($BLTOUCH); then BLTOUCH_LABEL=-BLTOUCH; else BLTOUCH_LABEL=-NOPROBE; fi;
if ($HIGH_SPEED); then HS_LABEL=-HS; else HS_LABEL=; fi;
if ($DIRECT_DRIVE); then DD_LABEL=-DD; else DD_LABEL=-BOWDEN; fi;
if ($UBL); then UBL_LABEL=-UBL; else UBL_LABEL=-ABL; fi;
if ($LINEAR_ADVANCE); then LINEAR_ADVANCE_LABEL=-LINEAR_ADVANCE; else LINEAR_ADVANCE_LABEL=; fi;
if ($JUNCTION_DEVIATION); then JUNCTION_DEVIATION_LABEL=-JUNCTION_DEVIATION; else JUNCTION_DEVIATION_LABEL=-CLASSIC_JERK; fi;
if ($HYBRID_THRESHOLD); then HYBRID_THRESHOLD_LABEL=-HYBRID_THRESHOLD; else HYBRID_THRESHOLD_LABEL=; fi;
if ($MPC); then MPC_LABEL=-MPC; else MPC_LABEL=-PID; fi;
if ($INPUT_SHAPING); then INPUT_SHAPING_LABEL=-INPUT_SHAPING; else INPUT_SHAPING_LABEL=; fi;
FIRMWARE_NAME="ENDER_E3_V2-${BOARD}${DISPLAY_LABEL}${BLTOUCH_LABEL}${UBL_LABEL}-${GRID}x${GRID}${HS_LABEL}${DD_LABEL}${LINEAR_ADVANCE_LABEL}${JUNCTION_DEVIATION_LABEL}${HYBRID_THRESHOLD_LABEL}${MPC_LABEL}${INPUT_SHAPING_LABEL}-${VERSION}"
echo "name=${FIRMWARE_NAME}" >> $GITHUB_OUTPUT
echo "filename=${FIRMWARE_NAME}.bin" >> $GITHUB_OUTPUT
## TODO: Get the board env name dynamically instead?
# Compile the firmware
pio run -e $BOARD
## FIXME: Testing if we can fix artifact uploads by shortening the file paths
# FIRMWARE_NAME="build"
# Copy the firmware and configuration files to a named temporary folder
mkdir -p "temp/${FIRMWARE_NAME}/Configs"
## TODO: Get the board env name dynamically instead?
cp .pio/build/$BOARD/firmware.bin "temp/${FIRMWARE_NAME}/firmware.bin"
cp Marlin/Configuration.h "temp/${FIRMWARE_NAME}/Configs/Configuration.h"
cp Marlin/Configuration_adv.h "temp/${FIRMWARE_NAME}/Configs/Configuration_adv.h"
## TODO: Add DWIN customizations here?
# Include the latest DWIN display firmware with all build artifacts
if [ "$DWIN" = "true" ]; then
cp -R "Configurations/config/examples/Creality/Ender-3 V2/LCD Files/DWIN_SET" "temp/${FIRMWARE_NAME}/Configs/DWIN_SET"
cp -R "Configurations/config/examples/Creality/Ender-3 V2/LCD Files/private" "temp/${FIRMWARE_NAME}/Configs/private"
else
## TODO: Wouldn't it be better if we could always bundle the display firmware with the build artifacts?
##
## What if we had an extra build job, which this matrix build depended on, and would then use artifact download
## to download the display firmware, finally copying it to the build artifact folder, so it'd be included with all the builds?
## Or maybe only include it with a specific build?
##
## OR, what if, we had one more build job, which would bundle ALL the firmware files and deploy a SINGLE
## build artifact, which would include ALL possible configurations of the firmwares + all extra files?
echo "::warning::DWIN not enabled, skipping DWIN files!"
fi
- name: Publish Artifacts
# if: success()
uses: actions/upload-artifact@v3
with:
name: ${{ steps.compile_marlin_firmware.outputs.name }}
path: temp/${{ steps.compile_marlin_firmware.outputs.name }}/
retention-days: 7
- name: Compile ${{ matrix.display }} Firmware
if: ${{ contains(matrix.display, 'BTT_TFT35_V3_0') }}
id: compile_display_firmware
uses: Didstopia/Marlin/.github/actions/build-display-firmware@skr-mini-e3-v3-0