Hello!
I've got a 3D printer (Anker M5) and I want to see if I can flash new firmware on it. The board uses the ST32F407 and runs a bastardised version of Marlin.
I know that I can flash it using DFU mode, but that needs some soldering to set the boot pin and I'd like to find a solution others can also follow easily.
I'm sure the board must have a bootloader installed as the printer is able to update the firmware by flashing it over UART3 from an embedded linux system running on a different board.
So I would like to ask if there is a way to query the MCU and identify the bootloader in use?
Identify Bootloader?
Re: Identify Bootloader?
It is probably the system bootloader which is used, referring to the documentation:
https://www.st.com/resource/en/applicat ... ronics.pdf
USART3 can be used to flash the STM32F417xx
https://www.st.com/resource/en/applicat ... ronics.pdf
USART3 can be used to flash the STM32F417xx
Re: Identify Bootloader?
As far as I know, this requires the hardware boot pin to be pulled (low or high I don't remeber), right? Which is not happening, it's all software.
I have read that STM32duino bootloader has a 'key' you can send (leaf) that will active it. How does one send this, just ascii encoded over UART like typing in a terminal?
Is there a software key for HID so I wouldn't need to pull the boot pin manually?
I have read that STM32duino bootloader has a 'key' you can send (leaf) that will active it. How does one send this, just ascii encoded over UART like typing in a terminal?
Is there a software key for HID so I wouldn't need to pull the boot pin manually?
Re: Identify Bootloader?
Right, anyway it is possible to jump to the bootloader by software. I don't know the firmware it uses anyway I would advice to request support there (probably Marlin).Tenson_UK wrote: Mon Jan 09, 2023 1:04 pm As far as I know, this requires the hardware boot pin to be pulled (low or high I don't remeber), right? Which is not happening, it's all software.
Yes there is a key but it is used with the VCP (USB) not real hardwre U(S)ART.Tenson_UK wrote: Mon Jan 09, 2023 1:04 pm I have read that STM32duino bootloader has a 'key' you can send (leaf) that will active it. How does one send this, just ascii encoded over UART like typing in a terminal?
HID BL is a specific bootloader and as you state it flash thanks UART3, I don't think you have this one.Tenson_UK wrote: Mon Jan 09, 2023 1:04 pm Is there a software key for HID so I wouldn't need to pull the boot pin manually?
Re: Identify Bootloader?
Thanks for helping me understand better!
I found a library for 'HAL Drivers' in the source for the version of Marlin currently running on the board. Is this a bootloader?
Can I use this somehow to flash my own program on the board without the need to mess with the boot pins?
As you said, perhaps I need to seek help from the Marlin groups. Marlin was originally developed for AVR ATMega and used the Arduino bootloader. I don't know much about how they run it on ST32.
I found a library for 'HAL Drivers' in the source for the version of Marlin currently running on the board. Is this a bootloader?
Can I use this somehow to flash my own program on the board without the need to mess with the boot pins?
As you said, perhaps I need to seek help from the Marlin groups. Marlin was originally developed for AVR ATMega and used the Arduino bootloader. I don't know much about how they run it on ST32.
Re: Identify Bootloader?
HAL - Hardware Abstraction Layer
No, it's not a bootloader. Those a libraries that allow for easier access to hardware.
No, it's not a bootloader. Those a libraries that allow for easier access to hardware.
Re: Identify Bootloader?
I think various 3d printers used a sd card based boot loader, e.g. put the file with particular name in the root directory of the sd card and it'd load and flash it.
If you are flashing your firmware using the on-chip boot loaders e.g. DFU, uart, SWD etc, you would need to be sure the firmware has been compiled to run at 0x8000000. That can be done e.g. that you build your own firmware from Marlin's original source codes.
I'd guess your best bet is to find the JTAG/SWD connectors, and that if they are exposed, get a st-link v2 or better v3
https://www.adafruit.com/product/2548
https://www.st.com/en/development-tools ... ridge.html
https://www.st.com/en/development-tools ... v3set.html
https://www.st.com/en/development-tools/st-link-v2.html
and you'd be able to update the firmware without using the boot0 pin.
If you are flashing your firmware using the on-chip boot loaders e.g. DFU, uart, SWD etc, you would need to be sure the firmware has been compiled to run at 0x8000000. That can be done e.g. that you build your own firmware from Marlin's original source codes.
I'd guess your best bet is to find the JTAG/SWD connectors, and that if they are exposed, get a st-link v2 or better v3
https://www.adafruit.com/product/2548
https://www.st.com/en/development-tools ... ridge.html
https://www.st.com/en/development-tools ... v3set.html
https://www.st.com/en/development-tools/st-link-v2.html
and you'd be able to update the firmware without using the boot0 pin.