Updating MCU

Basic Information:

Printer Model: Neptune 4 Pro with Opennept4une
MCU / Printerboard:

klippy.log (3.0 MB)

Host / SBC
klippy.log

Hi All. I’m stuck, and admit I’m not the best at this. I’m getting the following error and for the life of me I can’t update the MCU.
”Klipper warnings found.

  • MCU ‘mcu’ has deprecated code (it is missing feature ‘STEPPER_STEP_BOTH_EDGE’). Recompiling and flashing is recommended (MCU version ‘v0.12.0-192-gb7f7b8a3’, host version ‘v0.13.0-562-g7a4472649-dirty’).”

I’ve recompiled in putty with the following settings:

  • Micro-controller Architecture: STMicroelectronics STM32

  • Processor model: STM32F401

  • Bootloader offset: 64KiB bootloader

  • Clock Reference: 8 MHz crystal

  • Communication interface**: USB on PA11/PA12**

  • I can’t get the printer to read a USB drive to update. It won’t auto update with the USB drive in on boot, and it won’t read the USB if I go to Settings>About Machine. I also noticed that I can’t get the ls /dev/serial/by-id/* command to work, but lsusb does show the USB drive.

  • I’m trying to follow this process, but can’t get past step 5, even if I just try to skip it and download the Firmware.bin using WinSCP

  1. Update Klipper: Log into your host via SSH (using a program like Putty or an in-browser terminal in Mainsail/Fluidd) and navigate to the Klipper directory:

    bash

    cd ~/klipper/
    git pull
    
    

    This ensures your local Klipper repository is up-to-date.

  2. Configure Firmware: Run the menu configuration tool to select the correct settings for your specific MCU board (microcontroller, crystal frequency, bootloader offset, communication interface, etc.). You may need to consult the board manufacturer’s documentation or the Klipper documentation for the exact settings:

    bash

    make menuconfig
    
    
  3. Compile Firmware: Exit the menu (save the configuration when prompted) and compile the firmware file (klipper.bin):

    bash

    make
    
    

    This creates the firmware file in the ~/klipper/out/ directory.

  4. Stop Klipper Service: Stop the Klipper host software to prevent communication issues during flashing:

    bash

    sudo service klipper stop
    
    
  5. Flash the MCU: The method varies by board.

    • Using make flash (for boards with a compatible bootloader): Identify your device’s serial port name using ls /dev/serial/by-id/* and use the make flash command:

      bash

      make flash FLASH_DEVICE=/dev/serial/by-id/YOUR_DEVICE_ID
      
      

      (Replace YOUR_DEVICE_ID with the actual ID from the ls command output).

    • Manual SD Card flash (common for many 32-bit boards): Copy the generated klipper.bin file from the ~/klipper/out/ folder to a formatted SD card (sometimes it needs to be renamed, e.g., to firmware.bin or Robin_nano.bin, check your board’s documentation). Insert the SD card into the powered-off printer and turn it on. The board should flash automatically.

    • Using a helper script: For some boards, you can use the flash-sdcard.sh script to automate the process via SSH without physically removing the SD card.

      bash

      ./scripts/flash-sdcard.sh /dev/ttyACM0 YOUR_BOARD_NAME
      
      
  6. Start Klipper Service: Once the flashing is complete, restart the Klipper service:

    bash

    sudo service klipper start
    
    
  7. Verify: Check the status in your web interface (Mainsail/Fluidd) to confirm that the MCU and host software versions match and are connected. The terminal should show a successful connection and a status report.

I would suggest you to:

  1. Connect the board by USB
  2. Put it in the DFU mode (normally there is boot0 jumper or button)
  3. and flash it with:
    make flash FLASH_DEVICE=1v50:606f

Where you can get the ID from the lsusb output of the device in the DFU mode.
Where later, optionally, one can replace the bootloader with a katapult bootloader, and so, would be able to use it later:

make flash FLASH_DEVICE=/dev/ttyS0`

Hope that helps,
-Timofey


Ah, and yes, MCU has no idea about USB drive. It probably can be flashed from the sdcard, but not from USB drive.

Hi, thank you,

I would love to say I followed that, but most of it was over my head.

Connect the board by USB? As in the mainboard from inside the Neptune 4 Pro?
I assume the jumper/button would be on said mainboard?

Can you confirm what the name of the .bin file needs to be to flash the MCU?

According to instructions at Opennept4une’d Githup:

You have to open up your printer to access the SD card socket.

2 Likes

First of all, it is your board, I never had one.
I can only give you a generic explanations.

From what I can see:

it is sort of integrated OEM boards.
There is SBC (SOC + Board/CPU with Linux) where there is Linux and there is MCU STM32F401 aside.

So, I’m not sure, SDCard expected to be connected to the MCU.
H-USB - Type-C, IDK, it can be either. But I would guess it is SBC’s USB

So, I guess, you can only use SDCard for firmware upgrade right now.

-Timofey

1 Like