Skip to main content
GDare.1
Associate II
September 14, 2021
Solved

STM32 Programmer CLI hangs on parsing large file

  • September 14, 2021
  • 6 replies
  • 3931 views

I am trying to program an F4 with an external flash chip in mapped memory mode using the STM32_Programmer_CLI. I use the cli command

STM32_Programmer_CLI.exe --connect port=SWD mode=UR reset=hwRst -halt --erase all --download <path_to_hex> -el <path>/N25Q128A_STM32469I-DISCO.stldr

Which completes erase on internal flash and external flash, but then sits at parsing file. The file I am trying to write is 12.9MB with some flash existing in internal flash space and some flash existing in the hex position that correlates to the mapped memory modes position.

If I try to write all of just the external hex (11.8MB), I still experience the same issue. If I crop the hex file into smaller parts, it will program the correct locations in external flash.

I can successfully use the ST-LINK Utility with the same external loader to program the same hex file. I require the CLI however, because I require programming this through a script.

Is there a known limitation to the hex size the CLI can accept? How do I solve this issue?

EDIT:

I used the ST-LINK_CLI.exe with the same hex, the same external loader, and similar command line arguments and the programming worked as expected.

This topic has been closed for replies.
Best answer by Houda GHABRI

Hi @GDare.1​ ,

I send you a patch fixing this issue by private message, please test and tell me if it is OK.

If your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Houda

6 replies

Tesla DeLorean
Guru
September 14, 2021

Will it ingest the original .ELF file directly?

Could you use the ST-LINK Utilities CLI?

That it works in pieces perhaps means it's not an alignment or normalization issue with the .HEX lines/records.

While all these tools do similar things the code is somewhat divergent and buggy in different ways. It has frustrated me for several years.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
GDare.1
GDare.1Author
Associate II
September 14, 2021

Thanks for your reply, we use the Cube Programmer CLI for other projects, so I would prefer not change the tool we use that drastically.

Will it ingest the original .ELF file directly?

I am not entirely sure what you mean here? When I use the above command and point it to the hex file with both internal and external flash locations, it hangs on the parsing file step.

Tesla DeLorean
Guru
September 21, 2021

Linker should be generating a .ELF (or .AXF) first, and then generate .HEX from that. The tools should accept the ELF Object.​

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Houda GHABRI
ST Employee
September 21, 2021

Hi GDare.1 ,

Can you please tell me the Board are you using ? Are you using STM32CubeProgrammer 2.8.0 version ?

Houda

Tesla DeLorean
Guru
September 21, 2021

F469I-DISCO or equivalent by looks of command line​

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Houda GHABRI
ST Employee
September 23, 2021

Hello @Gdare,

It is possible to switch to CubeProgrammer 2.8.0 version and tell me if it is OK?

In the meantime, I am trying to reproduce the problem, I will come back soon with updates.

Houda

Houda GHABRI
ST Employee
September 23, 2021

Hi @GDare.1​ ,

Issue is reproduced , thanks for bringing it to our attention.

An internal ticket is submitted to CubeProgrammer development team to  to debug further and solve this issue .

Internal ticket number 114171: (PS: This is an internal tracking number and is not accessible or usable by customers). 

Houda

Houda GHABRI
Houda GHABRIBest answer
ST Employee
September 28, 2021

Hi @GDare.1​ ,

I send you a patch fixing this issue by private message, please test and tell me if it is OK.

If your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Houda

GDare.1
GDare.1Author
Associate II
October 5, 2021

The patch has solved my issue

Houda GHABRI
ST Employee
October 5, 2021

Hi @GDare.1​ ,

Glad that the issue is solved !

Houda