Skip to content

🩹 Fix RP2040 sensorless homing, servos, and M997 - #28566

Open
thisiskeithb wants to merge 3 commits into
MarlinFirmware:bugfix-2.1.xfrom
thisiskeithb:pr/rp2040-fixes
Open

thisiskeithb wants to merge 3 commits into
MarlinFirmware:bugfix-2.1.xfrom
thisiskeithb:pr/rp2040-fixes

Conversation

@thisiskeithb

Copy link
Copy Markdown
Contributor

Description

Three RP2040 fixes:

  • LOW and HIGH are PinStatus enumerators on this core rather than macros, so the preprocessor evaluates both to 0 and every *_ENDSTOP_HIT_STATE check in SanityCheck.h fails regardless of the config. That breaks sensorless homing, BLTouch, and probe builds. The defines have to sit in Conditionals_type.h because it's included after HAL.h, once the enum exists.
  • HAL.h forward-declares libServo without including Servo.h, so PAUSE_SERVO_OUTPUT() and RESUME_SERVO_OUTPUT() hit an incomplete type from neopixel.h and eeprom_flash.cpp. A servo on its own builds fine, which is why config-01 never caught it.
  • flashFirmware() rebooted through the watchdog, so M997 restarted Marlin instead of entering the bootloader.

config-02.ini covers the first two.

Requirements

An RP2040 board. M997 needs one that exposes USB, like the SKR Pico.

Benefits

  • Sensorless homing, BLTouch, and probe configs build on RP2040.
  • Servos build alongside NeoPixels and flash EEPROM emulation.
  • M997 reboots into the UF2 bootloader instead of back into Marlin.
  • CI covers all three.

Configurations

Default configuration with MOTHERBOARD BOARD_BTT_SKR_PICO. buildroot/tests/SKR_Pico/config-02.ini has the exact options.

Related Issues

None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant