How-To: Modify Marlin to control a laser with an SKR Pro

So I’m stuck again.

If I use Tuco’s firmware from the first post on this thread

I can make his changes and it compiles fine but when I load it onto my primo I get an all low error.

If I start with the firmware Jeff recommended

https://github.com/V1EngineeringInc/MarlinBuilder/releases/download/505/V1CNC_SkrPro_Dual_2209-2.0.6.1-src.zip

My primo with dual end stops functions correctly (no all low error) but after changing the lines from method three of Tuco’s instructions, Platformio won’t compile and throws these errors.

Building in release mode
Compiling .pio/build/BIGTREE_SKR_PRO/src/src/HAL/STM32/HAL.cpp.o
Compiling .pio/build/BIGTREE_SKR_PRO/src/src/HAL/STM32/HAL_SPI.cpp.o
Compiling .pio/build/BIGTREE_SKR_PRO/src/src/HAL/STM32/MarlinSerial.cpp.o
Compiling .pio/build/BIGTREE_SKR_PRO/src/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp.o
In file included from Marlin/src/HAL/STM32/…/…/inc/MarlinConfig.h:41,
from Marlin/src/HAL/STM32/HAL.cpp:28:
Marlin/src/HAL/STM32/…/…/inc/SanityCheck.h:417:4: error: #error “SPINDLE_LASER_ACTIVE_HIGH is now SPINDLE_LASER_ACTIVE_STATE. Please update your Configuration_adv.h.”
417 | #error “SPINDLE_LASER_ACTIVE_HIGH is now SPINDLE_LASER_ACTIVE_STATE. Please update your Configuration_adv.h.”
| ^~~~~
In file included from Marlin/src/HAL/STM32/…/…/inc/MarlinConfig.h:41,
from Marlin/src/HAL/STM32/HAL_SPI.cpp:25:
Marlin/src/HAL/STM32/…/…/inc/SanityCheck.h:417:4: error: #error “SPINDLE_LASER_ACTIVE_HIGH is now SPINDLE_LASER_ACTIVE_STATE. Please update your Configuration_adv.h.”
417 | #error “SPINDLE_LASER_ACTIVE_HIGH is now SPINDLE_LASER_ACTIVE_STATE. Please update your Configuration_adv.h.”
| ^~~~~
In file included from Marlin/src/HAL/STM32/…/…/inc/MarlinConfig.h:42,
from Marlin/src/HAL/STM32/HAL.cpp:28:
Marlin/src/HAL/STM32/…/…/inc/…/HAL/STM32/inc/SanityCheck.h:32:4: error: #error “Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on STM32.”
32 | #error “Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on STM32.”
| ^~~~~
In file included from Marlin/src/HAL/STM32/…/…/inc/MarlinConfig.h:41,
from Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp:23:
Marlin/src/HAL/STM32/…/…/inc/SanityCheck.h:417:4: error: #error “SPINDLE_LASER_ACTIVE_HIGH is now SPINDLE_LASER_ACTIVE_STATE. Please update your Configuration_adv.h.”
417 | #error “SPINDLE_LASER_ACTIVE_HIGH is now SPINDLE_LASER_ACTIVE_STATE. Please update your Configuration_adv.h.”
| ^~~~~
In file included from Marlin/src/HAL/STM32/…/…/inc/MarlinConfig.h:41,
from Marlin/src/HAL/STM32/MarlinSerial.cpp:22:
Marlin/src/HAL/STM32/…/…/inc/SanityCheck.h:417:4: error: #error “SPINDLE_LASER_ACTIVE_HIGH is now SPINDLE_LASER_ACTIVE_STATE. Please update your Configuration_adv.h.”
417 | #error “SPINDLE_LASER_ACTIVE_HIGH is now SPINDLE_LASER_ACTIVE_STATE. Please update your Configuration_adv.h.”
| ^~~~~
In file included from Marlin/src/HAL/STM32/…/…/inc/MarlinConfig.h:42,
from Marlin/src/HAL/STM32/HAL_SPI.cpp:25:
Marlin/src/HAL/STM32/…/…/inc/…/HAL/STM32/inc/SanityCheck.h:32:4: error: #error “Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on STM32.”
32 | #error “Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on STM32.”
| ^~~~~
In file included from Marlin/src/HAL/STM32/…/…/inc/MarlinConfig.h:42,
from Marlin/src/HAL/STM32/MarlinSerial.cpp:22:
Marlin/src/HAL/STM32/…/…/inc/…/HAL/STM32/inc/SanityCheck.h:32:4: error: #error “Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on STM32.”
32 | #error “Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on STM32.”
| ^~~~~
In file included from Marlin/src/HAL/STM32/…/…/inc/MarlinConfig.h:42,
from Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp:23:
Marlin/src/HAL/STM32/…/…/inc/…/HAL/STM32/inc/SanityCheck.h:32:4: error: #error “Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on STM32.”
32 | #error “Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on STM32.”
| ^~~~~
*** [.pio/build/BIGTREE_SKR_PRO/src/src/HAL/STM32/HAL_SPI.cpp.o] Error 1
*** [.pio/build/BIGTREE_SKR_PRO/src/src/HAL/STM32/HAL.cpp.o] Error 1
*** [.pio/build/BIGTREE_SKR_PRO/src/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp.o] Error 1
*** [.pio/build/BIGTREE_SKR_PRO/src/src/HAL/STM32/MarlinSerial.cpp.o] Error 1
============================== [FAILED] Took 7.40 seconds ==============================

Environment Status Duration


BIGTREE_SKR_PRO FAILED 00:00:07.397
======================== 1 failed, 0 succeeded in 00:00:07.397 ========================
The terminal process “pio ‘run’” terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.


I either need to fix the all low error on tucos firmware or fix the compile error on Jeff’s firmware (with Tuco laser mods).

Thanks in advance smart people!