forked from Mirrors/Marlin
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e9077fc419 | ||
|
|
eaf466b6da | ||
|
|
0089de17b5 | ||
|
|
baf9d5f12d | ||
|
|
30bfebdef5 |
@@ -28,7 +28,7 @@
|
||||
/**
|
||||
* Marlin release version identifier
|
||||
*/
|
||||
//#define SHORT_BUILD_VERSION "2.0.9.7"
|
||||
//#define SHORT_BUILD_VERSION "2.0.9.9"
|
||||
|
||||
/**
|
||||
* Verbose version identifier which should contain a reference to the location
|
||||
@@ -41,7 +41,7 @@
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
//#define STRING_DISTRIBUTION_DATE "2023-07-04"
|
||||
//#define STRING_DISTRIBUTION_DATE "2025-11-13"
|
||||
|
||||
/**
|
||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||
|
||||
@@ -109,8 +109,8 @@ FORCE_INLINE void HAL_timer_start(const uint8_t timer_num, const uint32_t) {
|
||||
* (otherwise, characters will be lost due to UART overflow).
|
||||
* Then: Stepper, Endstops, Temperature, and -finally- all others.
|
||||
*/
|
||||
#define HAL_timer_isr_prologue(T) NOOP
|
||||
#define HAL_timer_isr_epilogue(T) NOOP
|
||||
inline void HAL_timer_isr_prologue(const uint8_t) {}
|
||||
inline void HAL_timer_isr_epilogue(const uint8_t) {}
|
||||
|
||||
#ifndef HAL_STEP_TIMER_ISR
|
||||
|
||||
|
||||
@@ -126,4 +126,4 @@ FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
|
||||
pConfig->pTimerRegs->TC_CHANNEL[pConfig->channel].TC_SR;
|
||||
}
|
||||
|
||||
#define HAL_timer_isr_epilogue(T) NOOP
|
||||
inline void HAL_timer_isr_epilogue(const uint8_t) {}
|
||||
|
||||
@@ -136,5 +136,5 @@ void HAL_timer_enable_interrupt(const uint8_t timer_num);
|
||||
void HAL_timer_disable_interrupt(const uint8_t timer_num);
|
||||
bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
|
||||
|
||||
#define HAL_timer_isr_prologue(T) NOOP
|
||||
#define HAL_timer_isr_epilogue(T) NOOP
|
||||
inline void HAL_timer_isr_prologue(const uint8_t) {}
|
||||
inline void HAL_timer_isr_epilogue(const uint8_t) {}
|
||||
|
||||
@@ -92,5 +92,5 @@ void HAL_timer_enable_interrupt(const uint8_t timer_num);
|
||||
void HAL_timer_disable_interrupt(const uint8_t timer_num);
|
||||
bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
|
||||
|
||||
#define HAL_timer_isr_prologue(T) NOOP
|
||||
#define HAL_timer_isr_epilogue(T) NOOP
|
||||
inline void HAL_timer_isr_prologue(const uint8_t) {}
|
||||
inline void HAL_timer_isr_epilogue(const uint8_t) {}
|
||||
|
||||
@@ -170,4 +170,4 @@ FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
|
||||
}
|
||||
}
|
||||
|
||||
#define HAL_timer_isr_epilogue(T) NOOP
|
||||
inline void HAL_timer_isr_epilogue(const uint8_t) {}
|
||||
|
||||
@@ -87,5 +87,5 @@ void HAL_timer_enable_interrupt(const uint8_t timer_num);
|
||||
void HAL_timer_disable_interrupt(const uint8_t timer_num);
|
||||
bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
|
||||
|
||||
#define HAL_timer_isr_prologue(T) NOOP
|
||||
#define HAL_timer_isr_epilogue(T) NOOP
|
||||
inline void HAL_timer_isr_prologue(const uint8_t) {}
|
||||
inline void HAL_timer_isr_epilogue(const uint8_t) {}
|
||||
|
||||
@@ -140,4 +140,4 @@ FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
|
||||
}
|
||||
}
|
||||
|
||||
#define HAL_timer_isr_epilogue(timer_num)
|
||||
inline void HAL_timer_isr_epilogue(const uint8_t) {}
|
||||
|
||||
@@ -116,5 +116,5 @@ FORCE_INLINE static void HAL_timer_set_compare(const uint8_t timer_num, const ha
|
||||
}
|
||||
}
|
||||
|
||||
#define HAL_timer_isr_prologue(T) NOOP
|
||||
#define HAL_timer_isr_epilogue(T) NOOP
|
||||
inline void HAL_timer_isr_prologue(const uint8_t) {}
|
||||
inline void HAL_timer_isr_epilogue(const uint8_t) {}
|
||||
|
||||
@@ -188,7 +188,7 @@ FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
|
||||
}
|
||||
}
|
||||
|
||||
#define HAL_timer_isr_epilogue(T) NOOP
|
||||
inline void HAL_timer_isr_epilogue(const uint8_t) {}
|
||||
|
||||
// No command is available in framework to turn off ARPE bit, which is turned on by default in libmaple.
|
||||
// Needed here to reset ARPE=0 for stepper timer
|
||||
|
||||
@@ -74,10 +74,10 @@ typedef uint32_t hal_timer_t;
|
||||
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(MF_TIMER_TEMP)
|
||||
|
||||
#ifndef HAL_STEP_TIMER_ISR
|
||||
#define HAL_STEP_TIMER_ISR() extern "C" void ftm0_isr() //void TC3_Handler()
|
||||
#define HAL_STEP_TIMER_ISR() extern "C" void ftm0_isr()
|
||||
#endif
|
||||
#ifndef HAL_TEMP_TIMER_ISR
|
||||
#define HAL_TEMP_TIMER_ISR() extern "C" void ftm1_isr() //void TC4_Handler()
|
||||
#define HAL_TEMP_TIMER_ISR() extern "C" void ftm1_isr()
|
||||
#endif
|
||||
|
||||
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency);
|
||||
@@ -110,4 +110,4 @@ void HAL_timer_disable_interrupt(const uint8_t timer_num);
|
||||
bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
|
||||
|
||||
void HAL_timer_isr_prologue(const uint8_t timer_num);
|
||||
#define HAL_timer_isr_epilogue(T) NOOP
|
||||
inline void HAL_timer_isr_epilogue(const uint8_t) {}
|
||||
|
||||
@@ -109,4 +109,4 @@ void HAL_timer_disable_interrupt(const uint8_t timer_num);
|
||||
bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
|
||||
|
||||
void HAL_timer_isr_prologue(const uint8_t timer_num);
|
||||
#define HAL_timer_isr_epilogue(T) NOOP
|
||||
inline void HAL_timer_isr_epilogue(const uint8_t) {}
|
||||
|
||||
@@ -30,41 +30,82 @@
|
||||
|
||||
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
|
||||
switch (timer_num) {
|
||||
|
||||
//
|
||||
// Step Timer – GPT1 - Compare Interrupt OCR1 - Reset Mode
|
||||
//
|
||||
case MF_TIMER_STEP:
|
||||
CCM_CSCMR1 &= ~CCM_CSCMR1_PERCLK_CLK_SEL; // turn off 24mhz mode
|
||||
// 24MHz mode off – Use peripheral clock (150MHz)
|
||||
CCM_CSCMR1 &= ~CCM_CSCMR1_PERCLK_CLK_SEL;
|
||||
// Enable GPT1 clock gating
|
||||
CCM_CCGR1 |= CCM_CCGR1_GPT1_BUS(CCM_CCGR_ON);
|
||||
|
||||
GPT1_CR = 0; // disable timer
|
||||
GPT1_SR = 0x3F; // clear all prior status
|
||||
GPT1_PR = GPT1_TIMER_PRESCALE - 1;
|
||||
GPT1_CR |= GPT_CR_CLKSRC(1); //clock selection #1 (peripheral clock = 150 MHz)
|
||||
GPT1_CR |= GPT_CR_ENMOD; //reset count to zero before enabling
|
||||
GPT1_CR |= GPT_CR_OM1(1); // toggle mode
|
||||
GPT1_OCR1 = (GPT1_TIMER_RATE / frequency) -1; // Initial compare value
|
||||
GPT1_IR = GPT_IR_OF1IE; // Compare3 value
|
||||
GPT1_CR |= GPT_CR_EN; //enable GPT2 counting at 150 MHz
|
||||
// Disable timer, clear all status bits
|
||||
GPT1_CR = 0; // Disable timer
|
||||
GPT1_SR = 0x3F; // Clear all prior status
|
||||
|
||||
OUT_WRITE(15, HIGH);
|
||||
// Prescaler = 2 => 75MHz counting clock
|
||||
GPT1_PR = GPT1_TIMER_PRESCALE - 1;
|
||||
|
||||
GPT1_CR = GPT_CR_CLKSRC(1) // Clock selection #1 (peripheral clock = 150 MHz)
|
||||
| GPT_CR_ENMOD // Reset count to zero before enabling
|
||||
| GPT_CR_OM2(TERN(MARLIN_DEV_MODE, 1, 0)); // 0 = edge compare, 1 = toggle
|
||||
|
||||
// Compare value – the number of clocks between edges
|
||||
GPT1_OCR1 = (GPT1_TIMER_RATE / frequency) - 1;
|
||||
|
||||
// Enable compare‑event interrupt
|
||||
GPT1_IR = GPT_IR_OF1IE; // OF1 interrupt enabled
|
||||
|
||||
// Pull Pin 15 HIGH (logic‑high is the “idle” state)
|
||||
TERN_(MARLIN_DEV_MODE, OUT_WRITE(15, HIGH));
|
||||
|
||||
// Attach and enable Stepper IRQ
|
||||
// Note: UART priority is 16
|
||||
attachInterruptVector(IRQ_GPT1, &stepTC_Handler);
|
||||
NVIC_SET_PRIORITY(IRQ_GPT1, 16);
|
||||
NVIC_SET_PRIORITY(IRQ_GPT1, 16); // Priority 16 (higher than Temp Timer)
|
||||
|
||||
// Start GPT1 counting at 150 MHz
|
||||
GPT1_CR |= GPT_CR_EN;
|
||||
|
||||
break;
|
||||
|
||||
//
|
||||
// Temperature Timer – GPT2 - Compare Interrupt OCR1 - Reset Mode
|
||||
//
|
||||
case MF_TIMER_TEMP:
|
||||
CCM_CSCMR1 &= ~CCM_CSCMR1_PERCLK_CLK_SEL; // turn off 24mhz mode
|
||||
// 24MHz mode off – Use peripheral clock (150MHz)
|
||||
CCM_CSCMR1 &= ~CCM_CSCMR1_PERCLK_CLK_SEL;
|
||||
// Enable GPT2 clock gating
|
||||
CCM_CCGR0 |= CCM_CCGR0_GPT2_BUS(CCM_CCGR_ON);
|
||||
|
||||
GPT2_CR = 0; // disable timer
|
||||
GPT2_SR = 0x3F; // clear all prior status
|
||||
GPT2_PR = GPT2_TIMER_PRESCALE - 1;
|
||||
GPT2_CR |= GPT_CR_CLKSRC(1); //clock selection #1 (peripheral clock = 150 MHz)
|
||||
GPT2_CR |= GPT_CR_ENMOD; //reset count to zero before enabling
|
||||
GPT2_CR |= GPT_CR_OM1(1); // toggle mode
|
||||
GPT2_OCR1 = (GPT2_TIMER_RATE / frequency) -1; // Initial compare value
|
||||
GPT2_IR = GPT_IR_OF1IE; // Compare3 value
|
||||
GPT2_CR |= GPT_CR_EN; //enable GPT2 counting at 150 MHz
|
||||
// Disable timer, clear all status bits
|
||||
GPT2_CR = 0; // Disable timer
|
||||
GPT2_SR = 0x3F; // Clear all prior status
|
||||
|
||||
OUT_WRITE(14, HIGH);
|
||||
// Prescaler = 10 => 15MHz counting clock
|
||||
GPT2_PR = GPT2_TIMER_PRESCALE - 1;
|
||||
|
||||
GPT2_CR = GPT_CR_CLKSRC(1) // Clock selection #1 (peripheral clock = 150 MHz)
|
||||
| GPT_CR_ENMOD // and reset count to zero before enabling
|
||||
| GPT_CR_OM2(TERN(MARLIN_DEV_MODE, 1, 0)); // 0 = edge compare, 1 = toggle
|
||||
|
||||
// Compare value – the number of clocks between edges
|
||||
GPT2_OCR1 = (GPT2_TIMER_RATE / frequency) - 1;
|
||||
|
||||
// Enable compare‑event interrupt
|
||||
GPT2_IR = GPT_IR_OF1IE; // OF1 interrupt enabled
|
||||
|
||||
// Pull Pin 14 HIGH (logic‑high is the “idle” state)
|
||||
TERN_(MARLIN_DEV_MODE, OUT_WRITE(14, HIGH));
|
||||
|
||||
// Attach Temperature ISR
|
||||
attachInterruptVector(IRQ_GPT2, &tempTC_Handler);
|
||||
NVIC_SET_PRIORITY(IRQ_GPT2, 32);
|
||||
NVIC_SET_PRIORITY(IRQ_GPT2, 32); // Priority 32 (lower than Step Timer)
|
||||
|
||||
// Start GPT2 counting at 150 MHz
|
||||
GPT2_CR |= GPT_CR_EN;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -82,6 +123,7 @@ void HAL_timer_disable_interrupt(const uint8_t timer_num) {
|
||||
case MF_TIMER_TEMP: NVIC_DISABLE_IRQ(IRQ_GPT2); break;
|
||||
}
|
||||
|
||||
// Ensure the CPU actually stops servicing the IRQ
|
||||
// We NEED memory barriers to ensure Interrupts are actually disabled!
|
||||
// ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the )
|
||||
asm volatile("dsb");
|
||||
@@ -97,8 +139,8 @@ bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
|
||||
|
||||
void HAL_timer_isr_prologue(const uint8_t timer_num) {
|
||||
switch (timer_num) {
|
||||
case MF_TIMER_STEP: GPT1_SR = GPT_IR_OF1IE; break; // clear OF3 bit
|
||||
case MF_TIMER_TEMP: GPT2_SR = GPT_IR_OF1IE; break; // clear OF3 bit
|
||||
case MF_TIMER_STEP: GPT1_SR = GPT_IR_OF1IE; break; // clear OF1
|
||||
case MF_TIMER_TEMP: GPT2_SR = GPT_IR_OF1IE; break;
|
||||
}
|
||||
asm volatile("dsb");
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ typedef uint32_t hal_timer_t;
|
||||
|
||||
#define STEPPER_TIMER_RATE GPT1_TIMER_RATE
|
||||
#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000)
|
||||
#define STEPPER_TIMER_PRESCALE ((GPT_TIMER_RATE / 1000000) / STEPPER_TIMER_TICKS_PER_US)
|
||||
#define STEPPER_TIMER_PRESCALE (GPT_TIMER_RATE / STEPPER_TIMER_RATE)
|
||||
|
||||
#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer
|
||||
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
|
||||
@@ -87,8 +87,16 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency);
|
||||
|
||||
FORCE_INLINE static void HAL_timer_set_compare(const uint8_t timer_num, const hal_timer_t compare) {
|
||||
switch (timer_num) {
|
||||
case MF_TIMER_STEP: GPT1_OCR1 = compare - 1; break;
|
||||
case MF_TIMER_TEMP: GPT2_OCR1 = compare - 1; break;
|
||||
case MF_TIMER_STEP:
|
||||
GPT1_CR |= GPT_CR_FRR; // Free Run Mode (setting OCRx preserves CNT)
|
||||
GPT1_OCR1 = compare - 1;
|
||||
GPT1_CR &= ~GPT_CR_FRR; // Reset Mode (CNT resets on trigger)
|
||||
break;
|
||||
case MF_TIMER_TEMP:
|
||||
GPT2_CR |= GPT_CR_FRR; // Free Run Mode (setting OCRx preserves CNT)
|
||||
GPT2_OCR1 = compare - 1;
|
||||
GPT2_CR &= ~GPT_CR_FRR; // Reset Mode (CNT resets on trigger)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,5 +121,4 @@ void HAL_timer_disable_interrupt(const uint8_t timer_num);
|
||||
bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
|
||||
|
||||
void HAL_timer_isr_prologue(const uint8_t timer_num);
|
||||
//void HAL_timer_isr_epilogue(const uint8_t timer_num) {}
|
||||
#define HAL_timer_isr_epilogue(T) NOOP
|
||||
inline void HAL_timer_isr_epilogue(const uint8_t) {}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* Release version. Leave the Marlin version or apply a custom scheme.
|
||||
*/
|
||||
#ifndef SHORT_BUILD_VERSION
|
||||
#define SHORT_BUILD_VERSION "2.0.9.7"
|
||||
#define SHORT_BUILD_VERSION "2.0.9.9"
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -42,7 +42,7 @@
|
||||
* version was tagged.
|
||||
*/
|
||||
#ifndef STRING_DISTRIBUTION_DATE
|
||||
#define STRING_DISTRIBUTION_DATE "2023-07-04"
|
||||
#define STRING_DISTRIBUTION_DATE "2025-11-13"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -519,7 +519,7 @@ public:
|
||||
static FSTR_P get_preheat_label(const uint8_t m);
|
||||
static void apply_preheat(const uint8_t m, const uint8_t pmask, const uint8_t e=active_extruder);
|
||||
static void preheat_set_fan(const uint8_t m) { TERN_(HAS_FAN, apply_preheat(m, _BV(PT_FAN))); }
|
||||
static void preheat_hotend(const uint8_t m, const uint8_t e=active_extruder) { TERN_(HAS_HOTEND, apply_preheat(m, _BV(PT_HOTEND))); }
|
||||
static void preheat_hotend(const uint8_t m, const uint8_t e=active_extruder) { TERN_(HAS_HOTEND, apply_preheat(m, _BV(PT_HOTEND), e)); }
|
||||
static void preheat_hotend_and_fan(const uint8_t m, const uint8_t e=active_extruder) { preheat_hotend(m, e); preheat_set_fan(m); }
|
||||
static void preheat_bed(const uint8_t m) { TERN_(HAS_HEATED_BED, apply_preheat(m, _BV(PT_BED))); }
|
||||
static void preheat_all(const uint8_t m) { apply_preheat(m, PT_ALL); }
|
||||
|
||||
@@ -1444,11 +1444,7 @@ HAL_STEP_TIMER_ISR() {
|
||||
HAL_timer_isr_epilogue(MF_TIMER_STEP);
|
||||
}
|
||||
|
||||
#ifdef CPU_32_BIT
|
||||
#define STEP_MULTIPLY(A,B) MultiU32X24toH32(A, B)
|
||||
#else
|
||||
#define STEP_MULTIPLY(A,B) MultiU24X32toH16(A, B)
|
||||
#endif
|
||||
#define STEP_MULTIPLY(A,B) TERN(CPU_32_BIT, MultiU32X24toH32, MultiU24X32toH16)(A, B)
|
||||
|
||||
void Stepper::isr() {
|
||||
|
||||
|
||||
@@ -702,7 +702,7 @@
|
||||
#elif MB(ARTILLERY_RUBY)
|
||||
#include "stm32f4/pins_ARTILLERY_RUBY.h" // STM32F4 env:Artillery_Ruby
|
||||
#elif MB(CREALITY_V24S1_301F4)
|
||||
#include "stm32f4/pins_CREALITY_V24S1_301F4.h" // STM32F4 env:STM32F401RC_creality env:STM32F401RC_creality_jlink env:STM32F401RC_creality_stlink
|
||||
#include "stm32f4/pins_CREALITY_V24S1_301F4.h" // STM32F4 env:STM32F401RC_creality env:STM32F401RC_creality_nobootloader env:STM32F401RC_creality_jlink env:STM32F401RC_creality_stlink
|
||||
|
||||
//
|
||||
// ARM Cortex M7
|
||||
|
||||
@@ -427,15 +427,15 @@
|
||||
#endif
|
||||
|
||||
//
|
||||
// AUX1 5V GND D2 D1
|
||||
// AUX1 5V GND D1 D0
|
||||
// 2 4 6 8
|
||||
// 1 3 5 7
|
||||
// 5V GND A3 A4
|
||||
//
|
||||
#define AUX1_05_PIN 57 // (A3)
|
||||
#define AUX1_06_PIN 2
|
||||
#define AUX1_06_PIN 1 // TX0
|
||||
#define AUX1_07_PIN 58 // (A4)
|
||||
#define AUX1_08_PIN 1
|
||||
#define AUX1_08_PIN 0 // RX0
|
||||
|
||||
//
|
||||
// AUX2 GND A9 D40 D42 A11
|
||||
|
||||
@@ -11,20 +11,20 @@
|
||||
|
||||
[features]
|
||||
YHCB2004 = red-scorp/LiquidCrystal_AIP31068@^1.0.4, red-scorp/SoftSPIB@^1.1.1
|
||||
HAS_TFT_LVGL_UI = lvgl=https://github.com/makerbase-mks/LVGL-6.1.1-MKS/archive/master.zip
|
||||
HAS_TFT_LVGL_UI = lvgl=https://github.com/makerbase-mks/LVGL-6.1.1-MKS/archive/a3ebe98bc6.zip
|
||||
build_src_filter=+<src/lcd/extui/mks_ui>
|
||||
extra_scripts=download_mks_assets.py
|
||||
POSTMORTEM_DEBUGGING = build_src_filter=+<src/HAL/shared/cpu_exception> +<src/HAL/shared/backtrace>
|
||||
build_flags=-funwind-tables
|
||||
MKS_WIFI_MODULE = QRCode=https://github.com/makerbase-mks/QRCode/archive/master.zip
|
||||
MKS_WIFI_MODULE = QRCode=https://github.com/makerbase-mks/QRCode/archive/261c5a696a.zip
|
||||
HAS_TRINAMIC_CONFIG = TMCStepper@~0.7.3
|
||||
build_src_filter=+<src/module/stepper/trinamic.cpp> +<src/gcode/feature/trinamic/M122.cpp> +<src/gcode/feature/trinamic/M906.cpp> +<src/gcode/feature/trinamic/M911-M914.cpp> +<src/gcode/feature/trinamic/M919.cpp>
|
||||
HAS_T(RINAMIC_CONFIG|MC_SPI) = build_src_filter=+<src/feature/tmc_util.cpp>
|
||||
HAS_STEALTHCHOP = build_src_filter=+<src/gcode/feature/trinamic/M569.cpp>
|
||||
SR_LCD_3W_NL = SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
|
||||
SR_LCD_3W_NL = SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/6f53c19a8a.zip
|
||||
HAS_MOTOR_CURRENT_I2C = SlowSoftI2CMaster
|
||||
build_src_filter=+<src/feature/digipot>
|
||||
HAS_TMC26X = TMC26XStepper=https://github.com/MarlinFirmware/TMC26XStepper/archive/master.zip
|
||||
HAS_TMC26X = TMC26XStepper=https://github.com/MarlinFirmware/TMC26XStepper/archive/a7d7c92a13.zip
|
||||
build_src_filter=+<src/module/stepper/TMC26X.cpp>
|
||||
HAS_L64XX = Arduino-L6470@0.8.0
|
||||
build_src_filter=+<src/libs/L64XX> +<src/module/stepper/L64xx.cpp> +<src/gcode/feature/L6470> +<src/HAL/shared/HAL_spi_L6470.cpp>
|
||||
@@ -44,7 +44,7 @@ HAS_(FSMC|SPI|LTDC)_TFT = build_src_filter=+<src/HAL/STM32/tft> +
|
||||
HAS_FSMC_TFT = build_src_filter=+<src/HAL/STM32/tft/tft_fsmc.cpp> +<src/HAL/STM32F1/tft/tft_fsmc.cpp>
|
||||
HAS_SPI_TFT = build_src_filter=+<src/HAL/STM32/tft/tft_spi.cpp> +<src/HAL/STM32F1/tft/tft_spi.cpp>
|
||||
I2C_EEPROM = build_src_filter=+<src/HAL/shared/eeprom_if_i2c.cpp>
|
||||
SOFT_I2C_EEPROM = SlowSoftI2CMaster, SlowSoftWire=https://github.com/felias-fogg/SlowSoftWire/archive/master.zip
|
||||
SOFT_I2C_EEPROM = SlowSoftI2CMaster, SlowSoftWire=https://github.com/felias-fogg/SlowSoftWire/archive/f34d777f39.zip
|
||||
SPI_EEPROM = build_src_filter=+<src/HAL/shared/eeprom_if_spi.cpp>
|
||||
HAS_DWIN_E3V2|IS_DWIN_MARLINUI = build_src_filter=+<src/lcd/e3v2/common>
|
||||
DWIN_CREALITY_LCD = build_src_filter=+<src/lcd/e3v2/creality>
|
||||
@@ -237,7 +237,7 @@ HAS_SERVOS = build_src_filter=+<src/module/servo.cpp
|
||||
MORGAN_SCARA = build_src_filter=+<src/gcode/scara>
|
||||
HAS_MICROSTEPS = build_src_filter=+<src/gcode/control/M350_M351.cpp>
|
||||
(ESP3D_)?WIFISUPPORT = AsyncTCP, ESP Async WebServer
|
||||
ESP3DLib=https://github.com/luc-github/ESP3DLib/archive/master.zip
|
||||
ESP3DLib=https://github.com/luc-github/ESP3DLib/archive/dc0f3d96c6.zip
|
||||
arduinoWebSockets=links2004/WebSockets@2.3.4
|
||||
luc-github/ESP32SSDP@1.1.1
|
||||
lib_ignore=ESPAsyncTCP
|
||||
|
||||
@@ -15,17 +15,18 @@
|
||||
[env:linux_native]
|
||||
platform = native
|
||||
framework =
|
||||
build_flags = -D__PLAT_LINUX__ -std=gnu++17 -ggdb -g -lrt -lpthread -D__MARLIN_FIRMWARE__ -Wno-expansion-to-defined
|
||||
build_flags = ${common.build_flags} -D__PLAT_LINUX__ -std=gnu++17 -ggdb -g -lrt -lpthread -D__MARLIN_FIRMWARE__ -Wno-expansion-to-defined
|
||||
build_src_flags = -Wall -IMarlin/src/HAL/LINUX/include
|
||||
build_unflags = -Wall
|
||||
lib_ldf_mode = off
|
||||
lib_deps =
|
||||
build_src_filter = ${common.default_src_filter} +<src/HAL/LINUX>
|
||||
|
||||
#
|
||||
# Native Simulation
|
||||
# Builds with a small subset of available features
|
||||
# Required system libraries: SDL2, SDL2-net, OpenGL, GLM
|
||||
# sudo apt-get install python3-venv build-essential libsdl2-dev libsdl2-net-dev libglm-dev
|
||||
# See https://docs.platformio.org/en/latest/platforms/native.html for more information
|
||||
#
|
||||
# Tested with Linux (Mint 20) : gcc [9.3.0, 10.2.0]: libsdl2-dev[2.0.10], libsdl2-net-dev[2.0.1], libglm-dev[0.9.9.7, 0.9.9.8]
|
||||
#
|
||||
@@ -34,18 +35,20 @@ build_src_filter = ${common.default_src_filter} +<src/HAL/LINUX>
|
||||
[simulator_common]
|
||||
platform = native
|
||||
framework =
|
||||
build_flags = ${common.build_flags} -std=gnu++17 -D__PLAT_NATIVE_SIM__ -DU8G_HAL_LINKS -I/usr/include/SDL2 -IMarlin -IMarlin/src/HAL/NATIVE_SIM/u8g
|
||||
build_src_flags = -Wall -Wno-expansion-to-defined -Wcast-align
|
||||
build_flags = ${common.build_flags} -std=gnu++17
|
||||
-I/usr/include/SDL2 -IMarlin -IMarlin/src/HAL/NATIVE_SIM/u8g
|
||||
-D__PLAT_NATIVE_SIM__ -DU8G_HAL_LINKS -DGLM_ENABLE_EXPERIMENTAL
|
||||
build_src_flags = -Wall -Wno-expansion-to-defined -Wno-deprecated-declarations -Wcast-align
|
||||
release_flags = -g0 -O3 -flto
|
||||
debug_build_flags = -fstack-protector-strong -g -g3 -ggdb
|
||||
lib_compat_mode = off
|
||||
build_src_filter = ${common.default_src_filter} +<src/HAL/NATIVE_SIM>
|
||||
lib_deps = ${common.lib_deps}
|
||||
MarlinSimUI=https://github.com/p3p/MarlinSimUI/archive/refs/heads/bugfix-2.0.x.zip
|
||||
Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/marlin_sim_native.zip
|
||||
LiquidCrystal=https://github.com/p3p/LiquidCrystal/archive/master.zip
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/simulator.py
|
||||
MarlinSimUI=https://github.com/p3p/MarlinSimUI/archive/8791f3ff43.zip
|
||||
Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/c6b319f447.zip
|
||||
LiquidCrystal=https://github.com/p3p/LiquidCrystal/archive/322fb5fc23.zip
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/simulator.py
|
||||
|
||||
[simulator_linux]
|
||||
extends = simulator_common
|
||||
@@ -65,40 +68,40 @@ build_flags = ${simulator_linux.build_flags} ${simulator_linux.release_flags}
|
||||
#
|
||||
|
||||
#
|
||||
# MacPorts:
|
||||
# sudo port install gcc11 glm libsdl2 libsdl2_net
|
||||
# Use the script buildroot/bin/mac_gcc to prepare your environment.
|
||||
#
|
||||
# cd /opt/local/bin
|
||||
# sudo rm -f gcc g++ cc
|
||||
# sudo ln -s gcc-mp-11 gcc ; sudo ln -s g++-mp-11 g++ ; sudo ln -s g++ cc
|
||||
# MacPorts:
|
||||
# https://www.macports.org/install.php
|
||||
#
|
||||
# sudo port install gcc14 glm mesa libsdl2 libsdl2_net
|
||||
#
|
||||
# cd $(dirname "$(which port)")
|
||||
# sudo rm gcc g++ cc ld
|
||||
# sudo ln -s gcc-mp-14 gcc ; sudo ln -s g++-mp-14 g++ ; sudo ln -s g++ cc
|
||||
# sudo ln -s ld-classic ld
|
||||
# cd -
|
||||
# rehash
|
||||
#
|
||||
# Use 'sudo port install mesa' to get a <GL/gl.h> if no Xcode is installed.
|
||||
# If Xcode is installed be sure to run `xcode-select --install` first.
|
||||
#
|
||||
#==================================================================================
|
||||
#
|
||||
# Homebrew:
|
||||
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
#
|
||||
# brew install gcc@12 glm sdl2 sdl2_net
|
||||
# brew install gcc@14 glm mesa sdl2 sdl2_net
|
||||
#
|
||||
# cd /opt/homebrew/bin
|
||||
# cd "$(brew --prefix)/bin"
|
||||
# sudo rm -f gcc g++ cc
|
||||
# sudo ln -s gcc-12 gcc ; sudo ln -s g++-12 g++ ; sudo ln -s g++ cc
|
||||
# sudo ln -s gcc-14 gcc ; sudo ln -s g++-14 g++ ; sudo ln -s g++ cc
|
||||
# cd -
|
||||
#
|
||||
# Use 'brew install mesa' to get a <GL/gl.h> if no Xcode is installed.
|
||||
# If Xcode is installed be sure to run `xcode-select --install` first.
|
||||
#
|
||||
|
||||
[simulator_macos]
|
||||
build_unflags = -lGL -fstack-protector-strong
|
||||
build_flags =
|
||||
build_unflags = -g3 -lGL -fstack-protector-strong
|
||||
build_flags = -g2
|
||||
-DHAS_LIBBSD
|
||||
-I/opt/local/include
|
||||
-I/opt/local/include/freetype2
|
||||
-I/opt/local/include/SDL2/
|
||||
-I/opt/local/include/SDL2
|
||||
-L/opt/local/lib
|
||||
-Wl,-framework,OpenGl
|
||||
-Wl,-framework,CoreFoundation
|
||||
@@ -123,10 +126,16 @@ custom_gcc = g++
|
||||
# Simulator for Windows 10
|
||||
#
|
||||
# MSYS2 mingw-w64-x86_64 with these packages:
|
||||
# pacman -S --needed base-devel mingw-w64-x86_64-toolchain mingw64/mingw-w64-x86_64-glm mingw64/mingw-w64-x86_64-SDL2 mingw64/mingw-w64-x86_64-SDL2_net mingw-w64-x86_64-dlfcn
|
||||
# pacman -S --needed base-devel mingw-w64-x86_64-toolchain mingw64/mingw-w64-x86_64-glm mingw64/mingw-w64-x86_64-SDL2 mingw64/mingw-w64-x86_64-SDL2_net mingw-w64-x86_64-dlfcn
|
||||
#
|
||||
# Ensure the following paths have been added to the PATH system environment variable:
|
||||
# C:\msys64\mingw64\bin, C:\msys64\ucrt64\bin, C:\msys64\usr\bin
|
||||
#
|
||||
|
||||
[env:simulator_windows]
|
||||
extends = simulator_common
|
||||
build_src_flags = ${simulator_common.build_src_flags} -fpermissive
|
||||
build_flags = ${simulator_common.build_flags} ${simulator_common.debug_build_flags} -IC:\\msys64\\mingw64\\include\\SDL2 -fno-stack-protector -Wl,-subsystem,windows -ldl -lmingw32 -lSDL2main -lSDL2 -lSDL2_net -lopengl32 -lssp
|
||||
build_flags = ${simulator_common.build_flags} ${simulator_common.debug_build_flags}
|
||||
-IC:\\msys64\\mingw64\\include\\SDL2 -fno-stack-protector -Wl,-subsystem,windows
|
||||
-ldl -lmingw32 -lSDL2main -lSDL2 -lSDL2_net -lopengl32 -lssp
|
||||
build_type = debug
|
||||
|
||||
@@ -35,7 +35,8 @@ extra_scripts = ${common_stm32.extra_scripts}
|
||||
# USB Flash Drive mix-ins for STM32
|
||||
#
|
||||
[stm_flash_drive]
|
||||
platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip
|
||||
# Arduino_Core_STM32 uses usb-host-msc-cdc-msc-3 branch
|
||||
platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/39f37d6d6a.zip
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DHAL_PCD_MODULE_ENABLED -DHAL_HCD_MODULE_ENABLED
|
||||
-DUSBHOST -DUSBH_IRQ_PRIO=3 -DUSBH_IRQ_SUBPRIO=4
|
||||
|
||||
@@ -621,7 +621,7 @@ extra_scripts = ${common_stm32.extra_scripts}
|
||||
#
|
||||
# Ender-3 S1 STM32F401RC_creality
|
||||
#
|
||||
[env:STM32F401RC_creality]
|
||||
[STM32F401RC_creality_base]
|
||||
extends = stm32_variant
|
||||
board = genericSTM32F401RC
|
||||
board_build.variant = MARLIN_CREALITY_STM32F401RC
|
||||
@@ -635,6 +635,18 @@ extra_scripts = ${stm32_variant.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/random-bin.py
|
||||
monitor_speed = 115200
|
||||
|
||||
[env:STM32F401RC_creality]
|
||||
extends = STM32F401RC_creality_base
|
||||
board_build.offset = 0x10000
|
||||
board_upload.offset_address = 0x08010000
|
||||
|
||||
[env:STM32F401RC_creality_nobootloader]
|
||||
extends = STM32F401RC_creality_base
|
||||
board_build.offset = 0x0000
|
||||
board_upload.offset_address = 0x08000000
|
||||
debug_tool = stlink
|
||||
upload_protocol = stlink
|
||||
|
||||
[env:STM32F401RC_creality_jlink]
|
||||
extends = env:STM32F401RC_creality
|
||||
debug_tool = jlink
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
[env:STM32G0B1RE_btt]
|
||||
extends = stm32_variant
|
||||
platform = ststm32@~14.1.0
|
||||
platform_packages = framework-arduinoststm32@https://github.com/stm32duino/Arduino_Core_STM32/archive/main.zip
|
||||
platform_packages = framework-arduinoststm32@~4.20600.231001
|
||||
toolchain-gccarmnoneeabi@1.100301.220327
|
||||
board = marlin_STM32G0B1RE
|
||||
board_build.offset = 0x2000
|
||||
board_upload.offset_address = 0x08002000
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
#
|
||||
[env:BTT_SKR_SE_BX]
|
||||
extends = stm32_variant
|
||||
platform_packages = framework-arduinoststm32@https://github.com/thisiskeithb/Arduino_Core_STM32/archive/biqu-bx-workaround.zip
|
||||
# framework-arduinoststm32 uses biqu-bx-workaround branch
|
||||
platform_packages = framework-arduinoststm32@https://github.com/thisiskeithb/Arduino_Core_STM32/archive/8b3522051a.zip
|
||||
board = marlin_BTT_SKR_SE_BX
|
||||
board_build.offset = 0x20000
|
||||
build_flags = ${stm32_variant.build_flags} ${stm_flash_drive.build_flags}
|
||||
@@ -45,17 +46,17 @@ debug_tool = cmsis-dap
|
||||
[env:STM32H743Vx_btt]
|
||||
extends = stm32_variant
|
||||
platform = ststm32@~14.1.0
|
||||
platform_packages = framework-arduinoststm32@https://github.com/stm32duino/Arduino_Core_STM32/archive/main.zip
|
||||
platform_packages = framework-arduinoststm32@~4.20600.231001
|
||||
board = marlin_STM32H743Vx
|
||||
board_build.offset = 0x20000
|
||||
board_upload.offset_address = 0x08020000
|
||||
build_flags = ${stm32_variant.build_flags}
|
||||
-DPIN_SERIAL1_RX=PA_10 -DPIN_SERIAL1_TX=PA_9
|
||||
-DPIN_SERIAL3_RX=PD_9 -DPIN_SERIAL3_TX=PD_8
|
||||
-DPIN_SERIAL4_RX=PA_1 -DPIN_SERIAL4_TX=PA_0
|
||||
-DSERIAL_RX_BUFFER_SIZE=1024 -DSERIAL_TX_BUFFER_SIZE=1024
|
||||
-DTIMER_SERVO=TIM5 -DTIMER_TONE=TIM2
|
||||
-DSTEP_TIMER_IRQ_PRIO=0
|
||||
-DD_CACHE_DISABLED
|
||||
-DPIN_SERIAL1_RX=PA_10 -DPIN_SERIAL1_TX=PA_9
|
||||
-DPIN_SERIAL3_RX=PD_9 -DPIN_SERIAL3_TX=PD_8
|
||||
-DPIN_SERIAL4_RX=PA_1 -DPIN_SERIAL4_TX=PA_0
|
||||
-DSERIAL_RX_BUFFER_SIZE=1024 -DSERIAL_TX_BUFFER_SIZE=1024
|
||||
-DTIMER_SERVO=TIM5 -DTIMER_TONE=TIM2
|
||||
-DSTEP_TIMER_IRQ_PRIO=0
|
||||
-DD_CACHE_DISABLED
|
||||
upload_protocol = cmsis-dap
|
||||
debug_tool = cmsis-dap
|
||||
|
||||
Reference in New Issue
Block a user