Skip to content

Commit 21a52db

Browse files
authored
Merge branch 'MarlinFirmware:bugfix-2.1.x' into FTM_Fix_Menu_Axis_Sync
2 parents a8bc37a + 3bf6b3d commit 21a52db

File tree

137 files changed

+1425
-960
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+1425
-960
lines changed

.github/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Unsure where to begin contributing to Marlin? You can start by looking through t
121121

122122
### Pull Requests
123123

124-
Pull Requests should always be targeted to working branches (e.g., `bugfix-2.1.x` and/or `bugfix-1.1.x`) and never to release branches (e.g., `2.0.x` and/or `1.1.x`). If this is your first Pull Request, please read our [Guide to Pull Requests](https://marlinfw.org/docs/development/getting_started_pull_requests.html) and Github's [Pull Request](https://help.github.com/articles/creating-a-pull-request/) documentation.
124+
Pull Requests should always be targeted to working branches (e.g., `bugfix-2.1.x` and/or `bugfix-1.1.x`) and never to release branches (e.g., `2.0.x` and/or `1.1.x`). If this is your first Pull Request, please read our [Guide to Pull Requests](https://marlinfw.org/docs/development/getting_started_pull_requests.html) and GitHub's [Pull Request](https://help.github.com/articles/creating-a-pull-request/) documentation.
125125

126126
* Fill in [the required template](pull_request_template.md).
127127
* Don't include issue numbers in the PR title.

Makefile

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
SCRIPTS_DIR := buildroot/share/scripts
2+
MAKESCRIPTS_DIR := buildroot/share/make
23
CONTAINER_RT_BIN := docker
34
CONTAINER_RT_OPTS := --rm -v $(PWD):/code -v platformio-cache:/root/.platformio
45
CONTAINER_IMAGE := marlin-dev
@@ -8,9 +9,8 @@ UNIT_TEST_CONFIG ?= default
89
ifeq ($(OS),Windows_NT)
910
# Windows: use `where` – fall back through the three common names
1011
PYTHON := $(shell which python 2>nul || which python3 2>nul || which py 2>nul)
11-
# Windows: Use cmd tools to find pins files
12-
PINS_RAW := $(shell cmd //c "dir /s /b Marlin\src\pins\*.h 2>nul | findstr /r ".*Marlin\\\\src\\\\pins\\\\.*\\\\pins_.*\.h"")
13-
PINS := $(subst \,/,$(PINS_RAW))
12+
# Windows: Use Python script to find pins files
13+
PINS := $(shell $(PYTHON) $(MAKESCRIPTS_DIR)/find.py Marlin/src/pins -mindepth 2 -name 'pins_*.h')
1414
else
1515
# POSIX: use `command -v` – prefer python3 over python
1616
PYTHON := $(shell command -v python3 2>/dev/null || command -v python 2>/dev/null)
@@ -36,6 +36,7 @@ help:
3636
@echo "make validate-lines -j : Validate line endings, fails on trailing whitespace, etc."
3737
@echo "make validate-pins -j : Validate all pins files, fails if any require reformatting"
3838
@echo "make validate-boards -j : Validate boards.h and pins.h for standards compliance"
39+
@echo "make validate-urls : Validate URLs in source files"
3940
@echo "make tests-single-ci : Run a single test from inside the CI"
4041
@echo "make tests-single-local : Run a single test locally"
4142
@echo "make tests-single-local-docker : Run a single test locally, using docker"
@@ -88,7 +89,7 @@ tests-all-local:
8889
@$(PYTHON) -c "import yaml" 2>/dev/null || (echo 'pyyaml module is not installed. Install it with "$(PYTHON) -m pip install pyyaml"' && exit 1)
8990
export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
9091
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
91-
&& for TEST_TARGET in $$($(PYTHON) $(SCRIPTS_DIR)/get_test_targets.py) ; do \
92+
&& for TEST_TARGET in $$($(PYTHON) $(MAKESCRIPTS_DIR)/get_test_targets.py) ; do \
9293
if [ "$$TEST_TARGET" = "linux_native" ] && [ "$$(uname)" = "Darwin" ]; then \
9394
echo "Skipping tests for $$TEST_TARGET on macOS" ; \
9495
continue ; \
@@ -151,7 +152,7 @@ validate-pins: format-pins
151152
@echo "Validating pins files"
152153
@git diff --exit-code || (git status && echo "\nError: Pins files are not formatted correctly. Run \"make format-pins\" to fix.\n" && exit 1)
153154

154-
.PHONY: format-lines validate-lines
155+
.PHONY: format-lines validate-lines validate-urls
155156

156157
format-lines:
157158
@echo "Formatting all sources"
@@ -160,12 +161,16 @@ format-lines:
160161

161162
validate-lines:
162163
@echo "Validating text formatting"
163-
@npx prettier --check . --editorconfig --object-wrap preserve
164+
@npx prettier --check . --editorconfig --object-wrap preserve --prose-wrap never
165+
166+
validate-urls:
167+
@echo "Checking URLs in source files"
168+
@$(MAKESCRIPTS_DIR)/check-urls.sh
164169

165170
BOARDS_FILE := Marlin/src/core/boards.h
166171

167172
.PHONY: validate-boards
168173

169174
validate-boards:
170175
@echo "Validating boards.h file"
171-
@$(PYTHON) $(SCRIPTS_DIR)/validate_boards.py $(BOARDS_FILE) || (echo "\nError: boards.h file is not valid. Please check and correct it.\n" && exit 1)
176+
@$(PYTHON) $(MAKESCRIPTS_DIR)/validate_boards.py $(BOARDS_FILE) || (echo "\nError: boards.h file is not valid. Please check and correct it.\n" && exit 1)

Marlin/Configuration.h

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
// @section info
6262

6363
// Author info of this build printed to the host during boot and M115
64-
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Original author or contributor.
64+
#define STRING_CONFIG_H_AUTHOR "(MarlinFirmware)" // Original author or contributor.
6565
//#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes)
6666

6767
// @section machine
@@ -468,7 +468,7 @@
468468
//===========================================================================
469469
//============================= Thermal Settings ============================
470470
//===========================================================================
471-
// @section temperature
471+
// @section temperature sensors
472472

473473
/**
474474
* Temperature Sensors:
@@ -652,6 +652,8 @@
652652
#define TEMP_SENSOR_REDUNDANT_MAX_DIFF 10 // (°C) Temperature difference that will trigger a print abort.
653653
#endif
654654

655+
// @section temperature
656+
655657
// Below this temperature the heater will be switched off
656658
// because it probably indicates a broken thermistor wire.
657659
#define HEATER_0_MINTEMP 5
@@ -1860,15 +1862,12 @@
18601862
//#define DISABLE_V
18611863
//#define DISABLE_W
18621864

1863-
// Turn off the display blinking that warns about possible accuracy reduction
1864-
//#define DISABLE_REDUCED_ACCURACY_WARNING
1865-
18661865
// @section extruder
18671866

18681867
//#define DISABLE_E // Disable the extruder when not stepping
18691868
#define DISABLE_OTHER_EXTRUDERS // Keep only the active extruder enabled
18701869

1871-
// @section motion
1870+
// @section stepper drivers
18721871

18731872
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
18741873
#define INVERT_X_DIR false
@@ -1881,8 +1880,6 @@
18811880
//#define INVERT_V_DIR false
18821881
//#define INVERT_W_DIR false
18831882

1884-
// @section extruder
1885-
18861883
// For direct drive extruder v9 set to true, for geared extruder set to false.
18871884
#define INVERT_E0_DIR false
18881885
#define INVERT_E1_DIR false
@@ -2527,7 +2524,7 @@
25272524
//
25282525
//#define TEMPERATURE_UNITS_SUPPORT
25292526

2530-
// @section temperature
2527+
// @section temperature presets
25312528

25322529
//
25332530
// Preheat Constants - Up to 10 are supported without changes

Marlin/Configuration_adv.h

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,6 +1526,9 @@
15261526

15271527
// @section lcd
15281528

1529+
// Turn off the display blinking that warns about possible accuracy reduction
1530+
//#define DISABLE_REDUCED_ACCURACY_WARNING
1531+
15291532
#if HAS_MANUAL_MOVE_MENU
15301533
#define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 2*60 } // (mm/min) Feedrates for manual moves along X, Y, Z, E from panel
15311534
#define FINE_MANUAL_MOVE 0.025 // (mm) Smallest manual move (< 0.1mm) applying to Z on most machines
@@ -2355,7 +2358,7 @@
23552358
//#define WATCHDOG_RESET_MANUAL
23562359
#endif
23572360

2358-
// @section lcd
2361+
// @section baby-stepping
23592362

23602363
/**
23612364
* Babystepping enables movement of the axes by tiny increments without changing
@@ -2608,13 +2611,15 @@
26082611
#endif
26092612
#endif // PTC_PROBE || PTC_BED || PTC_HOTEND
26102613

2611-
// @section extras
2614+
// @section gcode
26122615

26132616
//
26142617
// G60/G61 Position Save and Return
26152618
//
26162619
//#define SAVED_POSITIONS 1 // Each saved position slot costs 12 bytes
26172620

2621+
// @section motion
2622+
26182623
//
26192624
// G2/G3 Arc Support
26202625
//
@@ -2646,6 +2651,8 @@
26462651
*/
26472652
//#define DIRECT_STEPPING
26482653

2654+
// @section calibrate
2655+
26492656
/**
26502657
* G38 Probe Target
26512658
*
@@ -2852,7 +2859,7 @@
28522859
*/
28532860
//#define EXTRA_FAN_SPEED
28542861

2855-
// @section gcode
2862+
// @section firmware retraction
28562863

28572864
/**
28582865
* Firmware-based and LCD-controlled retract
@@ -3669,7 +3676,7 @@
36693676
//#define PHOTO_RETRACT_MM 6.5 // (mm) E retract/recover for the photo move (M240 R S)
36703677

36713678
// Canon RC-1 or homebrew digital camera trigger
3672-
// Data from: https://www.doc-diy.net/photo/rc-1_hacked/
3679+
// Data from: https://web.archive.org/web/20250327153953/www.doc-diy.net/photo/rc-1_hacked/
36733680
//#define PHOTOGRAPH_PIN 23
36743681

36753682
// Canon Hack Development Kit
@@ -4306,7 +4313,7 @@
43064313
* Developed by Chris Barr at Aus3D.
43074314
*
43084315
* Wiki: https://wiki.aus3d.com.au/Magnetic_Encoder
4309-
* Github: https://github.com/Aus3D/MagneticEncoder
4316+
* GitHub: https://github.com/Aus3D/MagneticEncoder
43104317
*
43114318
* Supplier: https://aus3d.com.au/products/magnetic-encoder-module
43124319
* Alternative Supplier: https://reliabuild3d.com/

Marlin/Version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* here we define this default string as the date where the latest release
4242
* version was tagged.
4343
*/
44-
//#define STRING_DISTRIBUTION_DATE "2025-12-20"
44+
//#define STRING_DISTRIBUTION_DATE "2026-01-11"
4545

4646
/**
4747
* The protocol for communication to the host. Protocol indicates communication
@@ -58,7 +58,7 @@
5858
/**
5959
* The SOURCE_CODE_URL is the location where users will find the Marlin Source
6060
* Code which is installed on the device. In most cases —unless the manufacturer
61-
* has a distinct Github fork— the Source Code URL should just be the main
61+
* has a distinct GitHub fork— the Source Code URL should just be the main
6262
* Marlin repository.
6363
*/
6464
//#define SOURCE_CODE_URL "github.com/MarlinFirmware/Marlin"

Marlin/src/HAL/AVR/HAL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ void MarlinHAL::init() {
9696
// Might disable other peripherals using the pin; to circumvent that please undefine one of the above things!
9797
// The true culprit is the AVR ArduinoCore that enables peripherals redundantly.
9898
// (USART1 on the GeeeTech GT2560)
99-
// https://www.youtube.com/watch?v=jMgCvRXkexk
99+
// https://youtube.be/jMgCvRXkexk
100100
_ATmega_savePinAlternate(BEEPER_PIN);
101101

102102
OUT_WRITE(BEEPER_PIN, LOW);

Marlin/src/HAL/DUE/Tone.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
/**
2626
* Description: Tone function for Arduino Due and compatible (SAM3X8E)
27-
* Derived from https://forum.arduino.cc/index.php?topic=136500.msg2903012#msg2903012
27+
* Derived from https://forum.arduino.cc/t/arduino-due-and-tone/133302/13
2828
*/
2929

3030
#ifdef ARDUINO_ARCH_SAM

Marlin/src/HAL/ESP32/Tone.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
/**
2626
* Description: Tone function for ESP32
27-
* Derived from https://forum.arduino.cc/index.php?topic=136500.msg2903012#msg2903012
27+
* Derived from https://forum.arduino.cc/t/arduino-due-and-tone/133302/13
2828
*/
2929

3030
#ifdef ARDUINO_ARCH_ESP32

Marlin/src/HAL/HC32/README.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This document provides notes on the HAL for the HC32F460 MCU.
66

77
The HC32F460 HAL is designed to be generic enough for any HC32F460-based board. Adding support for a new HC32F460-based board will require the following steps:
88

9-
1. Follow [the usual instructions](https://marlinfw.org/docs/development/boards.html#adding-a-new-board) to add a new board to Marlin. (i.e., Add a pins file, edit `boards.h` and `pins.h`, etc.)
9+
1. Follow [the usual instructions](//marlinfw.org/docs/development/boards.html#adding-a-new-board) to add a new board to Marlin. (i.e., Add a pins file, edit `boards.h` and `pins.h`, etc.)
1010
2. Determine the flash size your board uses:
1111
- Examine the board's main processor. (Refer the naming key in `hc32.ini`.)
1212
- Extend the `HC32F460C_common` base env for 256K, or `HC32F460E_common` for 512K.
@@ -49,11 +49,9 @@ SCB->VTOR = ((uint32_t) APP_START_ADDRESS & SCB_VTOR_TBLOFF_Msk);
4949

5050
Just searching for `SCB->VTOR` should yield some results. From there, you just need to look at the value that's assigned to it. The example uses `APP_START_ADDRESS`.
5151

52-
> [!NOTE]
53-
> Some vendors publish incomplete source code. But they sometimes leave version control related files in the repo, which can contain previous version of files that were removed. Find these by including folders like `.git` or `.svn` in your search.
52+
> [!NOTE] Some vendors publish incomplete source code. But they sometimes leave version control related files in the repo, which can contain previous version of files that were removed. Find these by including folders like `.git` or `.svn` in your search.
5453
55-
> [!NOTE]
56-
> The example is based on the [Voxelab-64/Aquila_X2](https://github.com/Voxelab-64/Aquila_X2/blob/d1f23adf96920996b979bc31023d1dce236d05db/firmware/Sources/.svn/pristine/ec/ec82bcb480b511906bc3e6658450e3a803ab9813.svn-base#L96) which actually includes deleted files in its repo.
54+
> [!NOTE] The example is based on the [Voxelab-64/Aquila_X2](//github.com/Voxelab-64/Aquila_X2/blob/main/firmware/Sources/.svn/pristine/ec/ec82bcb480b511906bc3e6658450e3a803ab9813.svn-base#L96) which actually includes deleted files in its repo.
5755
5856
2. Using a linker script
5957

@@ -71,8 +69,7 @@ MEMORY
7169
}
7270
```
7371

74-
> [!NOTE]
75-
> This example is based on [Voxelab-64/Aquila_X2](https://github.com/Voxelab-64/Aquila_X2/blob/d1f23adf96920996b979bc31023d1dce236d05db/firmware/Sources/main/hdsc32core/hc32f46x_flash.ld#L55)
72+
> [!NOTE] This example is based on [Voxelab-64/Aquila_X2](//github.com/Voxelab-64/Aquila_X2/blob/d1f23adf96920996b979bc31023d1dce236d05db/firmware/Sources/main/hdsc32core/hc32f46x_flash.ld#L55)
7673
7774
## Documentation on the HC32F460
7875

@@ -96,15 +93,15 @@ Contact me on Discord (@shadow578) if you need it.
9693

9794
This HAL depends on the following projects:
9895

99-
- [shadow578/platform-hc32f46x](https://github.com/shadow578/platform-hc32f46x) (PlatformIO platform for HC32F46x)
100-
- [shadow578/framework-arduino-hc32f46x](https://github.com/shadow578/framework-arduino-hc32f46x) (Arduino framework for HC32F46x)
101-
- [shadow578/framework-hc32f46x-ddl](https://github.com/shadow578/framework-hc32f46x-ddl) (HC32F46x DDL framework)
96+
- [shadow578/platform-hc32f46x](//github.com/shadow578/platform-hc32f46x) (PlatformIO platform for HC32F46x)
97+
- [shadow578/framework-arduino-hc32f46x](//github.com/shadow578/framework-arduino-hc32f46x) (Arduino framework for HC32F46x)
98+
- [shadow578/framework-hc32f46x-ddl](//github.com/shadow578/framework-hc32f46x-ddl) (HC32F46x DDL framework)
10299

103100
## Credits
104101

105102
This HAL wouldn't be possible without the following projects:
106103

107-
- [Voxelab-64/Aquila_X2](https://github.com/Voxelab-64/Aquila_X2) (original implementation)
108-
- [alexqzd/Marlin-H32](https://github.com/alexqzd/Marlin-H32) (misc. fixes to the original implementation)
109-
- [kgoveas/Arduino-Core-Template](https://github.com/kgoveas/Arduino-Core-Template) (template for Arduino headers)
110-
- [stm32duino/Arduino_Core_STM32](https://github.com/stm32duino/Arduino_Core_STM32) (misc. Arduino functions)
104+
- [Voxelab-64/Aquila_X2](//github.com/Voxelab-64/Aquila_X2) (original implementation)
105+
- [alexqzd/Marlin-H32](//github.com/alexqzd/Marlin-H32) (misc. fixes to the original implementation)
106+
- [kgoveas/Arduino-Core-Template](//github.com/kgoveas/Arduino-Core-Template) (template for Arduino headers)
107+
- [stm32duino/Arduino_Core_STM32](//github.com/stm32duino/Arduino_Core_STM32) (misc. Arduino functions)

Marlin/src/HAL/LPC1768/HAL_SPI.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@
4040
* SPI sharing pins. The SCK, MOSI & MISO pins can NOT be set/cleared with
4141
* WRITE nor digitalWrite when the hardware SPI module within the LPC17xx is
4242
* active. If any of these pins are shared then the software SPI must be used.
43-
*
44-
* A more sophisticated hardware SPI can be found at the following link.
45-
* This implementation has not been fully debugged.
46-
* https://github.com/MarlinFirmware/Marlin/tree/071c7a78f27078fd4aee9a3ef365fcf5e143531e
4743
*/
4844

4945
#ifdef TARGET_LPC1768

0 commit comments

Comments
 (0)