Skip to content

Commit

Permalink
Merge 'bugfix-2.1.x' into pr/27539
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Dec 1, 2024
2 parents 855282c + 3591eb5 commit f4414be
Show file tree
Hide file tree
Showing 19 changed files with 83 additions and 98 deletions.
2 changes: 1 addition & 1 deletion Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
//#define STRING_DISTRIBUTION_DATE "2024-11-28"
//#define STRING_DISTRIBUTION_DATE "2024-12-01"

/**
* The protocol for communication to the host. Protocol indicates communication
Expand Down
3 changes: 2 additions & 1 deletion Marlin/src/HAL/ESP32/wifi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@
*/
#ifdef ARDUINO_ARCH_ESP32

#include "../../core/serial.h"
#include "../../inc/MarlinConfigPre.h"

#if ENABLED(WIFISUPPORT)

#include "../../core/serial.h"

#include <WiFi.h>
#include <ESPmDNS.h>
#include <ESPAsyncWebServer.h>
Expand Down
3 changes: 0 additions & 3 deletions Marlin/src/HAL/HC32/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

#include "../../inc/MarlinConfig.h"

#include "../../core/macros.h"
#include "../shared/Marduino.h"
#include "../shared/math_32bit.h"
#include "../shared/HAL_SPI.h"
Expand All @@ -39,8 +38,6 @@
#include "timers.h"
#include "MarlinSerial.h"

#include <stdint.h>

//
// Serial Ports
//
Expand Down
4 changes: 0 additions & 4 deletions Marlin/src/feature/mixing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@

Mixer mixer;

#ifdef MIXER_NORMALIZER_DEBUG
#include "../core/serial.h"
#endif

// Used up to Planner level
uint_fast8_t Mixer::selected_vtool = 0;
float Mixer::collector[MIXING_STEPPERS]; // mix proportion. 0.0 = off, otherwise <= COLOR_A_MASK.
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/feature/powerloss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@

#if ENABLED(POWER_LOSS_RECOVERY)

#include "../inc/MarlinConfig.h"

#include "powerloss.h"
#include "../core/macros.h"

#if ENABLED(EXTENSIBLE_UI)
#include "../lcd/extui/ui_api.h"
Expand Down Expand Up @@ -60,7 +61,6 @@ uint32_t PrintJobRecovery::cmd_sdpos, // = 0
#include "../module/planner.h"
#include "../module/printcounter.h"
#include "../module/temperature.h"
#include "../core/serial.h"

#if HOMING_Z_WITH_PROBE
#include "../module/probe.h"
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/gcode/eeprom/M500-M504.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

#include "../gcode.h"
#include "../../module/settings.h"
#include "../../core/serial.h"
#include "../../inc/MarlinConfig.h"

#if ENABLED(CONFIGURATION_EMBEDDING)
Expand Down
4 changes: 0 additions & 4 deletions Marlin/src/gcode/motion/M290.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
#include "../../module/probe.h"
#include "../../module/planner.h"

#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
#include "../../core/serial.h"
#endif

#if ENABLED(MESH_BED_LEVELING)
#include "../../feature/bedlevel/bedlevel.h"
#endif
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/gcode/stats/M31.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
*/

#include "../gcode.h"
#include "../../core/serial.h"
#include "../../module/printcounter.h"
#include "../../libs/duration_t.h"
#include "../../lcd/marlinui.h"
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* version was tagged.
*/
#ifndef STRING_DISTRIBUTION_DATE
#define STRING_DISTRIBUTION_DATE "2024-11-28"
#define STRING_DISTRIBUTION_DATE "2024-12-01"
#endif

/**
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/lcd/e3v2/creality/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
#include "../../../sd/cardreader.h"

#include "../../../MarlinCore.h"
#include "../../../core/serial.h"
#include "../../../core/macros.h"
#include "../../../gcode/queue.h"

#include "../../../module/temperature.h"
Expand Down
7 changes: 0 additions & 7 deletions Marlin/src/lcd/e3v2/jyersui/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions Marlin/src/lcd/e3v2/proui/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
#include "../../marlinui.h"
#include "../../extui/ui_api.h"
#include "../../../MarlinCore.h"
#include "../../../core/serial.h"
#include "../../../core/macros.h"
#include "../../../module/temperature.h"
#include "../../../module/printcounter.h"
#include "../../../module/motion.h"
Expand Down
3 changes: 0 additions & 3 deletions Marlin/src/lcd/sovol_rts/sovol_rts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ RTS rts;
#include <stdio.h>
#include <string.h>
#include "../../MarlinCore.h"
#include "../../core/serial.h"
#include "../../core/macros.h"
#include "../../sd/cardreader.h"
#include "../../module/temperature.h"
#include "../../module/planner.h"
Expand All @@ -56,7 +54,6 @@ RTS rts;
#include "../../gcode/queue.h"
#include "../../gcode/gcode.h"
#include "../marlinui.h"
//#include "../utf8.h"
#include "../../libs/BL24CXX.h"

#if ENABLED(FIX_MOUNTED_PROBE)
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/libs/hex_print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#if NEED_HEX_PRINT

#include "hex_print.h"
#include "../core/serial.h"

static char _hex[] = "0x00000000"; // 0:adr32 2:long 4:adr16 6:word 8:byte

Expand Down
50 changes: 25 additions & 25 deletions buildroot/bin/build_all_examples
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
#
# Usage:
#
# build_all_examples [-b|--branch=<branch>] - Branch to fetch from Configurations repo (import-2.1.x)
# build_all_examples [-a|--archive] - Copy the binary to the export location
# [-B|--base] - Base path of configurations, overriding -b
# [-b|--branch=<branch>] - Branch to fetch from Configurations repo (import-2.1.x)
# [-c|--continue] - Continue the paused build
# [-p|--purge] - Purge the status file and start over
# [-s|--skip] - Continue the paused build, skipping one
# [-r|--resume=<path>] - Start at some config in the filesystem order
# [-d|-v|--debug] - Print extra debug output (after)
# [-e|--export=N] - Set CONFIG_EXPORT and export to the export location
# [-f|--nofail] - Don't stop on a failed build
# [-h|--help] - Print usage and exit
# [-l|--limit=#] - Limit the number of builds in this run
# [-d|--debug] - Print extra debug output (after)
# [-n|--nobuild] - Don't actually build anything
# [-f|--nofail] - Don't stop on a failed build
# [-e|--export=N] - Set CONFIG_EXPORT and export into each config folder
# [-a|--archive] - Copy the binary to the export location
# [-o|--output] - Redirect export / archiving to another location
# (By default export to origin config folders)
# [-h|--help] - Print usage and exit
# [-p|--purge] - Purge the status file and start over
# [-r|--resume=<path>] - Start at some config in the filesystem order
# [-s|--skip] - Continue the paused build, skipping one
#

HERE=`dirname $0`
Expand All @@ -29,21 +29,21 @@ STAT_FILE=./.pio/.buildall

usage() { echo "Usage:
build_all_examples [-b|--branch=<branch>] - Branch to fetch from Configurations repo (import-2.1.x)
build_all_examples [-a|--archive] - Copy the binary to the export location
[-B|--base] - Base path of configurations, overriding -b
[-b|--branch=<branch>] - Branch to fetch from Configurations repo (import-2.1.x)
[-c|--continue] - Continue the paused build
[-p|--purge] - Purge the status file and start over
[-s|--skip] - Continue the paused build, skipping one
[-r|--resume=<path>] - Start at some config in the filesystem order
[-d|-v|--debug] - Print extra debug output (after)
[-e|--export=N] - Set CONFIG_EXPORT and export to the export location
[-a|--archive] - Copy the binary to the export location
[-o|--output] - Redirect export / archiving to another location
(By default export to origin config folders)
[-d|--debug] - Print extra debug output (after)
[-l|--limit=#] - Limit the number of builds in this run
[-n|--nobuild] - Don't actually build anything
[-f|--nofail] - Don't stop on a failed build
[-h|--help] - Print usage and exit
[-l|--limit=#] - Limit the number of builds in this run
[-n|--nobuild] - Don't actually build anything
[-o|--output] - Redirect export / archiving to another location
(By default export to origin config folders)
[-p|--purge] - Purge the status file and start over
[-r|--resume=<path>] - Start at some config in the filesystem order
[-s|--skip] - Continue the paused build, skipping one
"
}

Expand All @@ -53,22 +53,22 @@ unset FIRST_CONF
EXIT_USAGE=
LIMIT=1000

while getopts 'aB:b:ce:fdhl:no:pr:sv-:' OFLAG; do
while getopts 'aB:b:cde:fhl:no:pr:sv-:' OFLAG; do
case "${OFLAG}" in
a) ARCHIVE=1 ; bugout "Archiving" ;;
B) CBASE=${OPTARG%/} ; bugout "Base: $CBASE" ;;
b) BRANCH=$OPTARG ; bugout "Branch: $BRANCH" ;;
f) NOFAIL=1 ; bugout "Continue on Fail" ;;
r) ISRES=1 ; FIRST_CONF=$OPTARG ; bugout "Resume: $FIRST_CONF" ;;
c) CONTINUE=1 ; bugout "Continue" ;;
s) CONTSKIP=1 ; bugout "Continue, skipping" ;;
d|v) DEBUG=1 ; bugout "Debug ON" ;;
e) CEXPORT=$OPTARG ; bugout "Export $CEXPORT" ;;
o) OUTBASE="${OPTARG%/}" ; bugout "Archive to $OUTBASE" ;;
f) NOFAIL=1 ; bugout "Continue on Fail" ;;
h) EXIT_USAGE=1 ; break ;;
l) LIMIT=$OPTARG ; bugout "Limit to $LIMIT build(s)" ;;
d|v) DEBUG=1 ; bugout "Debug ON" ;;
n) DRYRUN=1 ; bugout "Dry Run" ;;
o) OUTBASE="${OPTARG%/}" ; bugout "Archive to $OUTBASE" ;;
p) PURGE=1 ; bugout "Purge stat file" ;;
r) ISRES=1 ; FIRST_CONF=$OPTARG ; bugout "Resume: $FIRST_CONF" ;;
s) CONTSKIP=1 ; bugout "Continue, skipping" ;;
-) ONAM="${OPTARG%%=*}" ; OVAL="${OPTARG#*=}"
case "$ONAM" in
archive) ARCHIVE=1 ; bugout "Archiving" ;;
Expand Down
57 changes: 34 additions & 23 deletions buildroot/bin/build_example
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,17 @@ EXPNUM=
NOFAIL=
OUTBASE=
BUILDINDEX=1
while getopts 'ab:c:e:fhin:o:r-:' OFLAG; do

while getopts 'ab:c:e:fhn:o:r-:' OFLAG; do
case "${OFLAG}" in
a) ARCHIVE=1 ;;
b) BASE="${OPTARG%/}" ;;
c) CONFIG="${OPTARG%/}" ;;
e) EXPNUM="$OPTARG" ;;
f) NOFAIL=1 ;;
h) EXIT_USAGE=1 ; break ;;
n) BUILDINDEX="$OPTARG" ;;
o) OUTBASE="${OPTARG%/}" ;;
h) EXIT_USAGE=1 ; break ;;
f) NOFAIL=1 ;;
r) REVEAL=1 ;;
-) ONAM="${OPTARG%%=*}" ; OVAL="${OPTARG#*=}"
case "$ONAM" in
Expand Down Expand Up @@ -159,22 +160,23 @@ ENAME=("-name" "marlin_config.json" \
"-o" "-name" "schema.yml")

# Possible built firmware names (in the build folder)
BNAME=("-name" 'firmware*.hex' \
BNAME=("-name" "firmware*.hex" \
"-o" "-name" "firmware*.bin" \
"-o" "-name" "project*.bin" \
"-o" "-name" "Robin*.bin" \
"-o" "-name" "main_*.bin")
"-o" "-name" "main_*.bin" \
"-o" "-name" "MarlinSimulator*")

mkdir -p "$BUILD"

# If EXPNUM is set then apply to the config before build
if [[ $EXPNUM ]]; then
opt_set CONFIG_EXPORT $EXPNUM
# Clean up old exports
find "$BUILD" \( "${ENAME[@]}" \) -exec rm "{}" \;
find "$BUILD" -type f \( "${ENAME[@]}" \) -exec rm "{}" \;
fi

((ARCHIVE)) && find "$BUILD" \( "${BNAME[@]}" \) -exec rm "{}" \;
((ARCHIVE)) && find "$BUILD" -type f \( "${BNAME[@]}" \) -exec rm "{}" \;

set +e

Expand All @@ -200,29 +202,38 @@ else
if [[ -n $EXPNUM ]]; then
annc "Exporting $EXPNUM"
[[ -f Marlin/Config-export.h ]] && { cp Marlin/Config-export.h "$ARCSUB"/Config.h ; }
find "$BUILD" \( "${ENAME[@]}" \) -exec cp "{}" "$ARCSUB" \;
find "$BUILD" -type f \( "${ENAME[@]}" \) -exec cp "{}" "$ARCSUB" \;
fi

# Copy potential firmware files into the config folder
# TODO: Consider firmware that needs an STM32F4_UPDATE folder.
# Currently only BOARD_CREALITY_F401RE env:STM32F401RE_creality
if ((ARCHIVE)); then
annc "Archiving"
rm -f "$ARCSUB"/*.tar.gz "$ARCSUB"/*.sha256.txt
find "$BUILD" \( "${BNAME[@]}" \) -exec sh -c '
ARCSUB="$1"
CONFIG="$2"
shift 2
for FILE in "$@"; do
cd "${FILE%/*}"
NAME=${FILE##*/}
SHRT=${NAME%.*}
SHASUM=$(sha256sum "$NAME" | cut -d" " -f1)
tar -czf "$ARCSUB/$SHRT.tar.gz" "$NAME"
echo "$CONFIG\n$SHASUM" > "$ARCSUB/$NAME.sha256.txt"
rm "$NAME"
cd - >/dev/null
done
find "$BUILD" -type f \( "${BNAME[@]}" \) -exec sh -c '
ARCSUB="$1" ; CONFIG="$2" ; FILE="$3" ; shift 3
NAME=${FILE##*/} ; SHRT=${NAME%.*} ; DIR=${FILE%/*}
ZIPX=
if [[ $CONFIG == *Simulator* ]]; then
case $(uname | tr '[:upper:]' '[:lower:]') in
darwin) SUB="macOS" ; ZIPX="-X" ;;
*linux) SUB="Linux" ;;
win*) SUB="Windows" ;;
msys*) SUB="Windows" ;;
cygwin*) SUB="Windows" ;;
mingw*) SUB="Windows" ;;
*) SUB='Unix' ;;
esac
ARCH=$(uname -m | tr '[:lower:]' '[:upper:]')
ARCSUB="$ARCSUB/$SUB-$ARCH"
fi
mkdir -p "$ARCSUB"
rm -f "$ARCSUB"/*.zip "$ARCSUB"/*.sha256.txt
cd "$DIR"
SHASUM=$(sha256sum "$NAME" | cut -d" " -f1)
echo "$CONFIG\n$SHASUM" > "$ARCSUB/$NAME.sha256.txt"
zip $ZIPX "$ARCSUB/$SHRT.zip" "$NAME" && rm "$NAME"
cd - >/dev/null
' sh "$ARCSUB" "$CONFIG" {} +
fi

Expand Down
21 changes: 11 additions & 10 deletions buildroot/bin/mftest
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,24 @@ bugout() { ((DEBUG)) && echo -e "\033[0;32m$1\033[0m" ; }

usage() {
echo "
Usage: mftest [-t|--env=<env|index>] [-n|--num=<num>] [-m|--make] [-y|--build=<Y|n>]
mftest [-a|--autobuild]
Usage: mftest [-a|--autobuild]
mftest [-r|--rebuild]
mftest [-s|--silent]
mftest [-t|--env=<env|index>] [-n|--num=<num>] [-m|--make] [-y|--build=<Y|n>]
mftest [-u|--autoupload] [-n|--num=<num>]
OPTIONS
-t --env The environment to apply / run, or the menu index number.
-n --num The index of the test to run. (In file order.)
-m --make Use the make / Docker method for the build.
-y --build Skip 'Do you want to build this test?' and assume YES.
-h --help Print this help.
-a --autobuild PIO Build using the MOTHERBOARD environment.
-d --default Restore to defaults before applying configs.
-h --help Print this help.
-m --make Use the make / Docker method for the build.
-n --num The index of the test to run. (In file order.)
-r --rebuild Rebuild previous PIO Build.
-s --silent Silence build output from PlatformIO.
-t --env The environment to apply / run, or the menu index number.
-u --autoupload PIO Upload using the MOTHERBOARD environment.
-v --verbose Extra output for debugging.
-s --silent Silence build output from PlatformIO.
-d --default Restore to defaults before applying configs.
-y --build Skip 'Do you want to build this test?' and assume YES.
env shortcuts: tree due esp lin lp8|lpc8 lp9|lpc9 m128 m256|mega stm|f1 f4 f7 s6 teensy|t31|t32 t35|t36 t40|t41
"
Expand All @@ -56,7 +57,7 @@ TESTENV='-'
CHOICE=0
DEBUG=0

while getopts 'abdhmrsuvyn:t:-:' OFLAG; do
while getopts 'adhmn:rst:uvy-:' OFLAG; do
case "${OFLAG}" in
a) AUTO_BUILD=1 ; bugout "Auto-Build target..." ;;
d) DL_DEFAULTS=1 ; bugout "Restore to defaults..." ;;
Expand Down
Loading

0 comments on commit f4414be

Please sign in to comment.