cancel
Showing results for 
Search instead for 
Did you mean: 

PyOCD Programming

matias_efe
Associate II

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.

5 REPLIES 5

@matias_efe wrote:

alternative ways of programming these devices besides using TouchGFX or STM32CubeIDE.


There's CubeProgrammer?

It has a command-line mode ...

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

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].

GUI, or command-line ?

Please show more details  - screenshot; the full log text ...

Can you program OK from within the CubeIDE ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
matias_efe
Associate II

matias_efe_0-1744382283759.png

matias_efe_1-1744382561527.png

 

In STM32CubeProgrammer, I encounter this error when loading a .hex file, and I get the other  issue from the console when using PyOCD.

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??

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.