cancel
Showing results for 
Search instead for 
Did you mean: 

The elf loader file is not accessible when using ST-LINK_CLI.exe

LPetr.1
Senior

I am using ST-LINK-V3 to flash my STM32G03 board.

 

I am using ST-LINK_CLI.exe tool (I have used it in the past without any issues).

I have built my firmware and generated .hex file. I then try to use the ST-LINK_CLI.exe tool as following:

 

```

C:\Users\my_user\tools\st_link>ST-LINK_CLI.exe -c SN=003500293532511031333430 -P My_proram -Rst
STM32 ST-LINK CLI v3.3.0.0
STM32 ST-LINK Command Line Interface

ST-LINK SN: 003500293532511031333430
ST-LINK Firmware version : V3J8M3B5S1
Connected via SWD.
Target voltage = 0.0 V
Connection mode: Normal
Reset mode: Software reset
Device ID: 0x466
Device flash Size: 32 Kbytes
Device family: STM32G0

Loading file...
Flash Programming:
File : My_program.hex
Address : 0x08000000
Memory programming...
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 0%
The elf loader file is not accessible.

Unable to reset the MCU!


C:\Users\my_user\tools\st_link>

```

 

Why would it complain something about the elf loader file? I am not even using .elf format file.

 

I have noticed that this is quite a common issue with the ST-LINK_CLI but I haven't managed to find straight forward solution to this issue. Would highly appreciate if someone could shed some light

6 REPLIES 6

The internal / external flash loaders are .STLDR files in ELF format

STM32CubeProgrammer_v2.15.0\bin\FlashLoader\0x466.stldr

So it would need paths to the tools.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Appreciate the response but is still not fully clear to me what is your suggested solution.

 

Do I need to modify my command (C:\Users\my_user\tools\st_link>ST-LINK_CLI.exe -c SN=003500293532511031333430 -P My_proram -Rst) in any way?

 

You have mentioned something about the STM32CubeProgrammer_v2.15.0\bin\FlashLoader\0x466.stldr  however it is not fully clear what I am meant to do with this file? Do I need to copy/paste this to my directory from which I am using ST-LINK_CLI.exe ?

 

 

Additionally, why would I be able to flash some other STM32 boards that I have lying around and only have problem with this specific STM32G03 board?

Pavel A.
Evangelist III

@LPetr.1 ST-LINK utility is quite old, it does not know newer products. Have you tried STM32_Programmer_CLI.exe instead?

Its complaining about not finding the loader salient for your hardware. You weren't clear about what loader/elf files it related too, but each part has it's own piece of code that needs to be pushed into RAM to program the internal FLASH.

G0 DEVID = 0x466

Either you're not using the right tools, or the subdirectory structure doesn't reflect expectations. Thus it "can't find" or "can't load"

As Pavel indicates the "ST-LINK Utilities" are old, and don't support newer families like the G0, so you likely need to start by using the right tools.

A complete / full install of STM32 Cube Programmer is strongly suggested.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Evangelist III

A complete / full install of STM32 Cube Programmer is strongly suggested.

Or CubeIDE, because it includes STM32_Programmer_CLI with its MCU and boards database and the loaders up to date.

 

Using STM32_Cube_Programmer_CLI instead of the st-link_cle.exe seems to work without any issues. :) Thanks