Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
ef969ff
Added CAN host support
rondlh Nov 26, 2024
2647273
Configuration.h MOTHERBOARD fix
rondlh Nov 26, 2024
9508283
clean up
thinkyhead Nov 26, 2024
5b97aef
Added FDCAN tool head part
rondlh Nov 29, 2024
a0ce07a
Rename BTT EBB42 environment, drop "ilament_extruder" from the CAN en…
rondlh Nov 30, 2024
dd5a2ff
Use BTT EBB32 base/common environment
thisiskeithb Nov 30, 2024
73bb491
Format MONSTER8 pins
thisiskeithb Nov 30, 2024
20ea87f
env:BTT_EBB42_V1_1_FDCAN build_flags fix
rondlh Dec 1, 2024
b6c8d50
Merge remote-tracking branch 'upstream/bugfix-2.1.x' into bugfix-2.1.x
rondlh Dec 2, 2024
adf012a
Add clock difference drift calculation
rondlh Dec 6, 2024
9af20e0
Merge upstream changes to endstops.cpp affecting CAN bus virtual IO
rondlh Dec 9, 2024
45ebd12
Undo Filament sensor missing text bugfix to solve merge conflict
rondlh Dec 13, 2024
8d49354
Added basic support for the ADXL345 3-axis accelerometer
rondlh Dec 13, 2024
d7e679d
Cleanup, improve FDCAN bus timing/sampling accuracy
rondlh Dec 23, 2024
7da4c13
Added FDCAN host for STM32H7, wear leveling for STM32H7
rondlh Jan 10, 2025
2536a09
Fix a few error defines
rondlh Jan 10, 2025
53be094
Update to safer SString class
rondlh Jan 11, 2025
f5e0b5e
Removed STM32H7 SERIAL_DMA and Flash Wear leveling and accelerometer
rondlh Jan 11, 2025
74a17cf
Small improvements and cleanup
rondlh Jan 11, 2025
28ed569
Auto initialize CAN device, auto calculate sample timing
rondlh Jan 24, 2025
22bca33
Trying to resolve some conflicts with bugfix-2.1.x
rondlh Jan 29, 2025
ddcaeb8
Resolving conflicts, second try
rondlh Jan 29, 2025
1765205
Merge branch 'bugfix-2.1.x' into pr/27547
thinkyhead Jun 14, 2025
0c4a052
review and clean up
thinkyhead Jun 14, 2025
4f8116a
add test, try to fix build
thinkyhead Jun 14, 2025
f7c6fd0
feature filter, etc
thinkyhead Jun 14, 2025
4deb3bf
more cleanup, todo
thinkyhead Jun 15, 2025
949ff20
Update to bugfix 2025-08-17
rondlh Sep 3, 2025
d70599b
Revert "Update to bugfix 2025-08-17"
rondlh Sep 3, 2025
f01420a
Merge branch 'bugfix-2.1.x' of https://github.com/rondlh/Marlin-CAN_H…
rondlh Sep 3, 2025
e6c7803
Copy missing CAN files to the repository
rondlh Sep 3, 2025
dd93412
Merge remote-tracking branch 'upstream/bugfix-2.1.x' into bugfix-2.1.x
rondlh Sep 3, 2025
4f0ac23
Small fixes to align code to latest bugfix
rondlh Sep 3, 2025
5e4e5b4
Merge upstream corrected typos, CANBUS files are in HAL\STM32\can
rondlh Sep 6, 2025
9f69cc0
Update inclusion of CAN_HOST for STM32F4 platform
rondlh Sep 6, 2025
c135d54
Fix mistakenly deleted env entry BTT_EBB42_V1_1_FDCAN
rondlh Sep 8, 2025
a4ef058
Update to bugfix 2026-04-12
rondlh Apr 16, 2026
30a67dc
Sync to Bugfix 2026-04-17, fix some merge errors
rondlh Apr 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/workflows/ci-build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ jobs:
- STM32F446VE_fysetc
- LERDGEK
- LERDGEX
- mks_monster8_usb_flash_drive_msc_CAN
- mks_robin_pro2
- Opulo_Lumen_REV3
- rumba32
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ out-language/
*.gen
*.sublime-workspace

# npm
node_modules/
package.json
package-lock.json

# OS
applet/
.DS_Store
Expand Down
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Prettier Ignore file
*.min.js
web-ui/
buildroot/share/PlatformIO/boards
buildroot/share/PlatformIO/variants
*.sublime-project
*.sublime-syntax
.github
.vscode
launch.json
79 changes: 71 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,42 @@
SCRIPTS_DIR := buildroot/share/scripts
MAKESCRIPTS_DIR := buildroot/share/make
CONTAINER_RT_BIN := docker
CONTAINER_RT_OPTS := --rm -v $(PWD):/code -v platformio-cache:/root/.platformio
CONTAINER_IMAGE := marlin-dev
UNIT_TEST_CONFIG ?= default

# Find a Python 3 interpreter
ifeq ($(OS),Windows_NT)
# Windows: use `where` – fall back through the three common names
PYTHON := $(shell which python 2>nul || which python3 2>nul || which py 2>nul)
# Windows: Use Python script to find pins files
PINS := $(shell $(PYTHON) $(MAKESCRIPTS_DIR)/find.py Marlin/src/pins -mindepth 2 -name 'pins_*.h')
else
# POSIX: use `command -v` – prefer python3 over python
PYTHON := $(shell command -v python3 2>/dev/null || command -v python 2>/dev/null)
# Unix/Linux: Use find command
PINS := $(shell find Marlin/src/pins -mindepth 2 -name 'pins_*.h')
endif

# Check that the found interpreter is Python 3
# Error if there's no Python 3 available
ifneq ($(strip $(PYTHON)),)
PYTHON_VERSION := $(shell $(PYTHON) -c "import sys; print(sys.version_info[0])" 2>/dev/null)
ifneq ($(PYTHON_VERSION),3)
$(error $(PYTHON) is not Python 3 – install a Python‑3.x interpreter or adjust your PATH)
endif
else
$(error No Python executable found – install Python 3.x and make sure it is in your PATH)
endif

help:
@echo "Tasks for local development:"
@echo "make marlin : Build Marlin for the configured board"
@echo "make format-pins -j : Reformat all pins files (-j for parallel execution)"
@echo "make validate-lines -j : Validate line endings, fails on trailing whitespace, etc."
@echo "make validate-pins -j : Validate all pins files, fails if any require reformatting"
@echo "make validate-boards -j : Validate boards.h and pins.h for standards compliance"
@echo "make validate-urls : Validate URLs in source files"
@echo "make tests-single-ci : Run a single test from inside the CI"
@echo "make tests-single-local : Run a single test locally"
@echo "make tests-single-local-docker : Run a single test locally, using docker"
Expand All @@ -19,7 +46,7 @@ help:
@echo "make unit-test-single-local-docker : Run unit tests for a single config locally, using docker"
@echo "make unit-test-all-local : Run all code tests locally"
@echo "make unit-test-all-local-docker : Run all code tests locally, using docker"
@echo "make setup-local-docker : Setup local docker using buildx"
@echo "make setup-local-docker : Setup local docker"
@echo ""
@echo "Options for testing:"
@echo " TEST_TARGET Set when running tests-single-*, to select the"
Expand All @@ -40,6 +67,9 @@ marlin:
./buildroot/bin/mftest -a
.PHONY: marlin

clean:
rm -rf .pio/build*

tests-single-ci:
export GIT_RESET_HARD=true
$(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) PLATFORMIO_BUILD_FLAGS=-DGITHUB_ACTION
Expand All @@ -56,10 +86,10 @@ tests-single-local-docker:
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)"

tests-all-local:
@python -c "import yaml" 2>/dev/null || (echo 'pyyaml module is not installed. Install it with "python -m pip install pyyaml"' && exit 1)
@$(PYTHON) -c "import yaml" 2>/dev/null || (echo 'pyyaml module is not installed. Install it with "$(PYTHON) -m pip install pyyaml"' && exit 1)
export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
&& for TEST_TARGET in $$(python $(SCRIPTS_DIR)/get_test_targets.py) ; do \
&& for TEST_TARGET in $$($(PYTHON) $(MAKESCRIPTS_DIR)/get_test_targets.py) ; do \
if [ "$$TEST_TARGET" = "linux_native" ] && [ "$$(uname)" = "Darwin" ]; then \
echo "Skipping tests for $$TEST_TARGET on macOS" ; \
continue ; \
Expand Down Expand Up @@ -87,27 +117,60 @@ unit-test-all-local-docker:
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make unit-test-all-local

USERNAME := $(shell whoami)
USER_ID := $(shell id -u)
GROUP_ID := $(shell id -g)

.PHONY: setup-local-docker setup-local-docker-old

setup-local-docker:
@echo "Building marlin-dev Docker image..."
$(CONTAINER_RT_BIN) build -t $(CONTAINER_IMAGE) \
--build-arg USERNAME=$(USERNAME) \
--build-arg USER_ID=$(USER_ID) \
--build-arg GROUP_ID=$(GROUP_ID) \
-f docker/Dockerfile .
@echo
@echo "To run all tests in Docker:"
@echo " make tests-all-local-docker"
@echo "To run a single test in Docker:"
@echo " make tests-single-local-docker TEST_TARGET=mega2560"

setup-local-docker-old:
$(CONTAINER_RT_BIN) buildx build -t $(CONTAINER_IMAGE) -f docker/Dockerfile .

PINS := $(shell find Marlin/src/pins -mindepth 2 -name '*.h')

.PHONY: $(PINS) format-pins validate-pins

$(PINS): %:
@echo "Formatting $@"
@python $(SCRIPTS_DIR)/pinsformat.py $< $@
@echo "Formatting pins $@"
@$(PYTHON) $(SCRIPTS_DIR)/pinsformat.py $< $@

format-pins: $(PINS)
@echo "Processed $(words $(PINS)) pins files"

validate-pins: format-pins
@echo "Validating pins files"
@git diff --exit-code || (git status && echo "\nError: Pins files are not formatted correctly. Run \"make format-pins\" to fix.\n" && exit 1)

.PHONY: format-lines validate-lines validate-urls

format-lines:
@echo "Formatting all sources"
@$(PYTHON) $(SCRIPTS_DIR)/linesformat.py buildroot
@$(PYTHON) $(SCRIPTS_DIR)/linesformat.py Marlin

validate-lines:
@echo "Validating text formatting"
@npx prettier --check . --editorconfig --object-wrap preserve --prose-wrap never

validate-urls:
@echo "Checking URLs in source files"
@$(MAKESCRIPTS_DIR)/check-urls.sh

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

.PHONY: validate-boards

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