Wiznet makers

matthew

Published July 07, 2026 ©

174 UCC

9 WCC

46 VAR

0 Contests

1 Followers

1 Following

Original Link

Flexi-Ninja

Flexi-Ninja is a fork of stepper-ninja for Expatria's hardware. Flexi-Ninja replaces the breakout board abstraction with a PlatformIO based build system and boa

COMPONENTS
PROJECT DESCRIPTION

Canadian-designed open source hardware. For everyone.

 

Flexi-Ninja is a fork of stepper-ninja for Expatria's hardware. Flexi-Ninja replaces the breakout board abstraction with a PlatformIO based build system and board definitions in config.h.

Different in this fork from upstream stepper-ninja:

  • Fixed I/O with intuitive HAL pin names that match PCB
  • PIO-based step generation with added position feedback to LinuxCNC for closed-loop tracking
  • Configurable DIR pin setup time per axis via HAL pin to meet stepper driver timing requirements
  • FlexGPIO I2C IO expander Used for alarm inputs, tool/probe sensors, axis enables, coolant, spindle, and auxiliary outputs
  • Hybrid encoder handling: A high-speed PIO-based encoder (ENC1) and an IRQ-based encoder (ENC2). ENC2 can be disabled to free its pins as Aux inputs.
  • All pin and module configuration in config.h

Using the SPI build of this firmware is recommended. To use this with LinuxCNC requires a Raspberry Pi 4 or 5 (Pi 5 strongly recommended). A pre-configured Pi image is available in the Releases section of the Flexi-Pi repository, with setup notes for the Pi image in the README over there.

Supported Boards

Note that FlexiHAL 2350 board rev A3.1 will require an interposer for the Pi header, which will be provided with your board. Boards newer than A3.1 will not require the interposer. If using the interposer, you will need to add spi_bus=1 to the loadrt flexi-ninja line, so it reads loadrt flexi-ninja spi_bus=1. With the interposer, the FlexGPIO bootloader will need to be installed on the RP2040 with its USB port rather than the flashing script. This will only need to be done once at initial setup.

Details on the interposer are here:

Flashing

Recommended: Use the flash_firmware script to flash both MCUs on the board via the Pi header.

Alternate: USB drag-and-drop using the UF2 bootloaders in the RP2350 and RP2040. You will need to be sure you flash both the RP2350 that runs the main firmware and the RP2040 with the FlexGPIO bootloader. There are reset and boot buttons for each MCU on the edge of the PCB near the USBC connector.
 

Documents
Comments Write