Porting Marlin to a printer that wasn't supposed to run it
I bought an Anycubic Kobra Neo because it was cheap and competent and I wanted a small-format printer for ESP32 enclosures and telescope mount parts. The stock firmware works fine if your needs are modest. Mine weren’t, so I started a Marlin 2.1.x port.
The MCU is a HC32F460 — an ARM Cortex-M4 from HDSC (Huada Semiconductor) that hardly anyone outside the 3D printer community has ever heard of, with a peripheral set that overlaps STM32F4 in places and disagrees with it loudly in others. Marlin had no HAL for it. So step one was a HAL. Step two was the boot/linker scripts. Step three was the part where the screen finally drew something instead of staying black.
The tricky bits, in rough order of pain:
- The TFT. Anycubic’s stock display is an ST7789V over SPI, but they’re doing a lot of unusual things in the bring-up sequence that the datasheet doesn’t spell out. I have a companion Klipper port with the cleaned-up display driver if you want to see the final init sequence.
- Bed leveling. ABL works, with the stock probe. Z-offset behavior is consistent now after a fix to the probe deploy/stow sequence.
- Input shaping. This is the headline feature. With the right shaper parameters for the Neo’s frame, you can run noticeably faster prints without ringing.
- Linear advance. Calibrated and stable. K factor varies by filament, obviously, but the firmware no longer mis-handles the deceleration.
If you have a Kobra Neo and you want a printer that behaves like the rest of the modern Marlin ecosystem — Octoprint, Fluidd-friendly serial, the full M-code set — both repos are public. The latest tagged release is v0.2 and the README still says “Not for production use. Use with caution!”, which I mean — there are sharp edges, and you should expect to be flashing firmware a few times before things settle. Issues welcome. PRs more welcome.