BIGTREETECH Manta M8P Control Board

repository·master·Indexed 43 days ago

https://github.com/bigtreetech/manta-m8p

Documentation and resources for the Manta M8P high-performance control board, including hardware manuals for V1.0, V1.1, and V2.0 revisions. Includes guides for building and installing Klipper firmware, configuring printer.cfg with the generic-bigtreetech-manta-m8p.cfg template, and flashing bootloaders using dfu-util for STM32G0B1 and H723 processors.

Tokens
2.6K
Snippets
11
Records
14
Agent score
55%

What's inside Manta M8P

  1. Install Klipper firmware on Manta M8P

    master

    The Manta M8P uses a bootloader that allows firmware updates via an MCU SD card. Follow these steps to flash the firmware:

    1. Obtain your firmware file (firmware-USB.bin or your custom-built klipper.bin).
    2. CRITICAL: Rename the file to firmware.bin. The bootloader will not update properly if the file is not renamed.
    3. Ensure your SD card is formatted as FAT32.
    4. Copy firmware.bin to the root directory of the MCU SD card.
    5. Power off the motherboard.
    6. Insert the MCU SD card.
    7. Power on the motherboard.
    8. Wait a few seconds for the flashing process to complete.

    Verification: Run the following command on your Raspberry Pi to confirm the flash was successful:

    ls /dev/serial/by-id

    You should see a Klipper device listed in the output.

  2. Install Klipper firmware on Manta M8P via SD Card

    master

    The Manta M8P includes a bootloader that allows firmware updates via an SD card. Follow these steps to flash the firmware:

    1. Prepare the file: Take your built klipper.bin (or the provided firmware-USB.bin) and rename it exactly to firmware.bin. IMPORTANT: You must rename the file to firmware.bin for the bootloader to recognize it.
    2. Prepare the SD card: Ensure the SD card is formatted as FAT32 and copy firmware.bin to the root directory.
    3. Flash the board:
      • Power off the motherboard.
      • Insert the MCU SD card.
      • Power on the motherboard.
      • Wait a few seconds for the flashing process to complete.
    4. Verify: Run ls /dev/serial/by-id on your host (e.g., Raspberry Pi). If successful, you will see a Klipper device listed in the output.
  3. Write the bootloader for M8P V2.0

    master

    To write the bootloader to an M8P V2.0 board using a CB1 or CM4, follow these steps:

    1. Prepare the file: Download the M8P_V2_H723_bootloader.bin file and place it on your CB1/CM4 device.
    2. Enter DFU Mode: Press and hold the boot button on the M8P board, then press the reset button. This puts the M8P into DFU mode.
    3. Flash the bootloader: Open a terminal on the CB1/CM4 and execute the dfu-util command provided below. Ensure the path to the .bin file is correct.

    Note: The DFU ID 0483:df11 can be verified by running the lsusb command on your terminal.

    sudo dfu-util -d 0483:df11 -R -a 0 -s 0x8000000:leave -D ./M8P_V2_H723_bootloader.bin
  4. Write the bootloader for M8P V1.0/1.1

    master

    To write the bootloader to an M8P V1.0 or V1.1 board, you must first put the board into DFU mode and then use dfu-util from the terminal of a connected CB1 or CM4 module.

    Prerequisites

    1. Download the M8P_bootloader.bin file to your CB1/CM4.
    2. Ensure dfu-util is installed on your CB1/CM4.

    Steps

    1. Enter DFU Mode: Press and hold the boot button on the M8P, then click the reset button. This puts the M8P into DFU mode.
    2. Verify DFU ID (Optional): You can confirm the device is recognized by running lsusb. The default DFU ID for M8P is 0483:df11.
    3. Flash the Bootloader: Run the dfu-util command from the terminal, specifying the path to your .bin file.

    Command Syntax

    sudo dfu-util -d 0483:df11 -R -a 0 -s 0x8000000:leave -D ./M8P_bootloader.bin

    Note: Replace ./M8P_bootloader.bin with the actual path where you saved the bootloader file.

    sudo dfu-util -d 0483:df11 -R -a 0 -s 0x8000000:leave -D ./M8P_bootloader.bin
  5. Configure Klipper printer parameters for Manta M8P

    master

    After flashing the firmware, you must configure Klipper to recognize the hardware:

    1. Use the provided generic-bigtreetech-manta-m8p.cfg as your base printer.cfg. This file contains the correct pinouts for the Manta M8P.
    2. Identify your MCU's serial ID by running this command on your Raspberry Pi:
      ls /dev/serial/by-id/*
    3. Update your printer.cfg with the correct [mcu] serial path.

    Example printer.cfg snippet:

    [mcu]
    serial: /dev/serial/by-id/usb-Klipper_stm32g0b1xx_190028000D50415833323520-if00
  6. Configure printer.cfg for Manta M8P

    master

    After flashing the firmware, you must configure Klipper to communicate with the board.

    1. Base Configuration: Use the provided generic-bigtreetech-manta-m8p.cfg as the foundation for your printer.cfg. This file contains the correct pin mappings for the M8P.
    2. Identify MCU Serial ID: Run the following command on your Raspberry Pi to find the unique ID of your board: ls /dev/serial/by-id/*
    3. Update printer.cfg: Copy the resulting ID into the [mcu] section of your printer.cfg file.
    ls /dev/serial/by-id/*
    
    [mcu]
    serial: /dev/serial/by-id/usb-Klipper_stm32g0b1xx_190028000D50415833323520-if00
  7. Update Manta M8P firmware via SD card

    master

    The Manta M8P features a bootloader that allows firmware updates via an SD card. Follow these steps to update the MCU:

    1. Prepare the file: Take your compiled klipper.bin (or the provided firmware-USB.bin) and rename it exactly to firmware.bin. Note: The bootloader will not recognize the file if it is not named firmware.bin.
    2. Prepare the SD card: Ensure the SD card is formatted as FAT32 and copy firmware.bin to the root directory.
    3. Flash the board:
      • Power off the mainboard.
      • Insert the SD card into the MCU SD card slot.
      • Power on the mainboard.
    4. Wait: The update process takes a few seconds. The board will automatically complete the update.
    5. Verify: If using USB communication, run ls /dev/serial/by-id to confirm the Klipper device ID appears.
    # Verify successful flash (USB mode only)
    ls /dev/serial/by-id
  8. Access Manta M8P documentation and manuals

    master

    Documentation for the Manta M8P board is version-specific. Ensure you are using the correct manual for your hardware revision:

    • For V1.0 and V1.1 boards: Consult the manuals available within this repository or visit the official BTT Wiki at https://bttwiki.com/M8P.html.
    • For V2.0 boards: Consult the relevant manual provided within this repository.
  9. Build Klipper firmware for Manta M8P

    master

    To build custom Klipper firmware for the Manta M8P, follow the official Klipper installation guide to download the source code to your Raspberry Pi, then use the following configuration settings in make menuconfig:

    Standard USB Configuration:

    • Enable extra low-level configuration options: [*] Enable extra low-level configuration options
    • Micro-controller architecture: STMicroelectronics STM32
    • Processor model: STM32G0B1
    • Bootloader offset: 8KiB bootloader
    • Clock Reference: 8 MHz crystal
    • Communication interface: USB (on PA11/PA12)

    USB to CAN Bridge Configuration (M8P V1.1+ only):

    • Communication interface: USB to CAN bus bridge (USB (on PA11/PA12))
    • CAN bus interface: (CAN bus (on PD12/PD13))

    After configuring, save the settings and run make. The resulting file will be located at ~/klipper/out/klipper.bin.

    make
  10. Configure printer parameters in printer.cfg

    master

    After flashing the firmware, you must configure Klipper to communicate with the Manta M8P.

    1. Base Configuration: Use the provided generic-bigtreetech-manta-m8p.cfg as a template for your printer.cfg. This file contains the pinout definitions for almost all components on the board.
    2. Set MCU Serial ID: If communicating via USB, find your device ID by running ls /dev/serial/by-id/* on your Raspberry Pi. Update the [mcu] section in printer.cfg with this exact ID.
    [mcu]
    serial: /dev/serial/by-id/usb-Klipper_stm32g0b1xx_190028000D50415833323520-if00
  11. Build custom Klipper firmware for Manta M8P

    master

    To build your own firmware, follow these steps on your Raspberry Pi after installing the Klipper source code:

    1. Run the Klipper configuration menu (e.g., make menuconfig).
    2. Apply the following settings:
      • Enable extra low-level configuration options: Checked
      • Micro-controller Architecture: STMicroelectronics STM32
      • Processor model: STM32G0B1
      • Bootloader offset: 8KiB bootloader
      • Clock Reference: 8 MHz crystal
      • Communication interface: USB (on PA11/PA12)

    Note for M8P V1.1+ users (USB to CAN bridge): If you intend to use the USB to CAN bridge, use these settings instead: * Communication interface: USB to CAN bus bridge (USB (on PA11/PA12)) * CAN bus interface: (CAN bus (on PD12/PD13))

    1. Save the configuration and run make.
    2. The resulting file klipper.bin will be located in home/pi/klipper/out.

    You can transfer the file to your computer using pscp from a Windows CMD terminal:

    pscp -C pi@192.168.0.101:/home/pi/klipper/out/klipper.bin c:\klipper.bin

    (Replace 192.168.0.101 with your Pi's IP and use the password raspberry if prompted).

  12. Compile Klipper firmware for Manta M8P

    master

    To use the latest version of Klipper, you must compile the firmware manually on your Raspberry Pi. Use the specific configuration settings below to ensure compatibility with the Manta M8P hardware.

    Configuration Settings:

    • Enable extra low-level configuration options: [*]
    • Micro-controller Architecture: STMicroelectronics STM32
    • Processor model: STM32G0B1
    • Bootloader offset: 8KiB bootloader
    • Clock Reference: 8 MHz crystal
    • Communication interface: USB (on PA11/PA12)

    After configuring, exit the menu with q, select Yes to save, and run make to build the firmware. The resulting file will be located at ~/klipper/out/klipper.bin.

    make
    # The output will be in ~/klipper/out/klipper.bin