Custom Marlin firmware configurations for Creality Ender 3 with CR Touch auto bed leveling
- Clone the repositories:
# Create base directory
mkdir ~/3d_printing
cd ~/3d_printing
# Clone Marlin
git clone -b bugfix-2.1.x https://github.com/MarlinFirmware/Marlin.git Marlin-2.1.x
# Clone configurations
git clone https://github.com/yourusername/ender-bender-firmware.git
- Link configurations:
# Create symbolic link to configurations
cd Marlin-2.1.x/Marlin
ln -s ../../ender-bender-firmware/configs config
# Verify the link
ls -la config
📁 My-Project-Directory (~/3d_printing)
├── 📁 Marlin-2.1.x (cloned from MarlinFirmware/Marlin)
│ ├── 📁 Marlin
│ │ ├── 📁 config -> ../../ender-bender-firmware/configs # Symbolic link
│ │ ├── 📄 Configuration.h # Comes with Marlin
│ │ ├── 📄 Configuration_adv.h # Comes with Marlin
│ │ ├── 📄 Configuration_override.h # Generated during build
│ │ └── 📄 Marlin.ino # Comes with Marlin
│ ├── 📄 platformio.ini # Comes with Marlin, we modify
│ └── 📄 README.md # Marlin's documentation
│
└── 📁 ender-bender-firmware (my config repository)
├── 📁 configs
│ └── 📁 ender3
│ ├── 📄 ender3-crtouch.ini # CR Touch config
│ └── 📄 ender3-stock.ini # Stock config
├── 📄 README.md # This documentation
├── 📄 flashing-instructions.md # How to flash firmware
└── 📄 managing-configurations.md # Configuration management guide
-
From Marlin Repository:
Configuration.h
- Base configuration fileConfiguration_adv.h
- Advanced configuration fileMarlin.ino
- Main Marlin sketchplatformio.ini
- Build configuration (we modify this)
-
Generated During Build:
Configuration_override.h
- Created from your INI file
-
From Your Repository:
- All files in
ender-bender-firmware
- INI configuration files
- Documentation
- All files in
- See PlatformIO Setup
- Keep configurations in the
config
subdirectory - The path in
platformio.ini
is relative to the Marlin directory
Create a new file Configuration_override.h
:
#pragma once
// This file is automatically generated from the INI config
// Do not edit this file directly
#include "config.h"