MANTA M5P Flashing and Running Custom Firmware

Okay, I’m literally doing what you’re trying to do with my custom board. It has a CM4 that plugs into it and can communicate with the MCU on the board via the same USB connection as the Manta M5P. In my application, I’m working on producing a functional test - this means I have to access IO features on the main controller board, including the stepper controllers and various other pieces of hardware.

In my case, I’m loading Klipper onto the board’s MCU (no custom firmware) and then accessing the board hardware from a Bash script. For example, to check the status of the board, I use the code:

TTY=~/printer_data/comms/klippy.serial

echo -ne "STATUS\n" > "$TTY" 
RESPONSE=$(timeout 2 cat "$TTY") || true

if echo "$RESPONSE" | grep -q "Klipper state: Ready"; then
  echo -e "Klipper is running!"
else
  echo -e "No Klipper Available"
fi

The “echo -ne…” statement sends a “STATUS” request to Klipper and then returns the response over the next two seconds.

You can access all the features of Klipper and if there are some you can’t, then look to Dynamic Macros and the conversation I had about them with @3dcoded (Read ACCELEROMETER_QUERY response in macro).

If you’re going to be using the basic 3D Printer features of your Manta M5P you might as well install Klipper and access them rather than trying to create your own.

2 Likes