2025-04-11 4:51 AM
Hello, I’m trying to use the PyOCD library to program an STM32H747 and an STM32U5A9 using .hex or .bin files generated by STM32CubeIDE. So far, I haven’t had much success, and I’d like to know if anyone has experience with this or can offer guidance on how to proceed. I’m also open to alternative ways of programming these devices besides using TouchGFX or STM32CubeIDE.
2025-04-11 4:53 AM
@matias_efe wrote:alternative ways of programming these devices besides using TouchGFX or STM32CubeIDE.
There's CubeProgrammer?
It has a command-line mode ...
2025-04-11 6:50 AM
Hi, the STM32CubeProgrammer doesn't work, and I get an error when uploading the file. The specific error is: Failed to upload file Sector [0].
2025-04-11 7:19 AM
GUI, or command-line ?
Please show more details - screenshot; the full log text ...
Can you program OK from within the CubeIDE ?
2025-04-11 7:43 AM
In STM32CubeProgrammer, I encounter this error when loading a .hex file, and I get the other issue from the console when using PyOCD.
2025-04-11 8:17 AM
Is this downloading directly from a build in CubeIDE ?
If CubeIDE can't download the file that it's built, then it's no surprise that PyOCD can't do it, either!
Need to find what's wrong!
Can CubeIDE download the ELF ?
Can CubeIDE build and download a simple Blinky ?
@matias_efe wrote:program an STM32H747 and an STM32U5A9.
What do you mean by that?
Loading two chips simultaneously? One After the other? One chip is programming the other? Or what??