I have a PCB with an STM32H7 that runs micropyhton, there is a second STM32 on the PCB and I would like to be able to program from the H7 processor running MP. I have access to the second STM32 over the native UART bootloader and the SWD pins.
In Linux for example I use a tool called stm32flash that programs an STM32 over UART + BOOT+RST using the factory ROM bootloader of the STM32.
Does anybody know if there is a solution for this in Micropython? The options are native STM bootloader over UART or some kind of bit-bashing on the SWD pins.
Micropyhton Method to program an STM32 connected
Re: Micropyhton Method to program an STM32 connected
The source code for stm32flash can be found here: https://github.com/stm32duino/stm32flash
This code is intended for the host and has way more functionality than you need, so you'd need to extract/modify it to do what you want.
The bootloader protocol is described in this document: https://www.st.com/resource/en/applicat ... ronics.pdf and it's simple enough you can probably just implement what you need in micropython.
This code is intended for the host and has way more functionality than you need, so you'd need to extract/modify it to do what you want.
The bootloader protocol is described in this document: https://www.st.com/resource/en/applicat ... ronics.pdf and it's simple enough you can probably just implement what you need in micropython.
Re: Micropyhton Method to program an STM32 connected
I use this already like I said, but how can I do it from micropython?
Re: Micropyhton Method to program an STM32 connected
Is there an existing Micropython module or library that can do this? I do not know how to compile C into micropython