cancel
Showing results for 
Search instead for 
Did you mean: 

Downgrade STM32CubeProgrammer in STM32CubeIDE

CCend.2
Associate III

STM32CubeProgrammer v2.13 was giving me the famous "Failed to execute MI command" and "Failed to download Segment[0]" errors within the STM32CubeIDE, so I downloaded the standalone STM32CubeProgrammer v2.10 and it works fine. The IDE still uses v2.13, so how do I downgrade that one to v2.10 so I can program my chip through the IDE?

1 ACCEPTED SOLUTION

Accepted Solutions
CCend.2
Associate III

I discovered that the original error was coming from the line "file segment @0x08000000 is not 255-bytes aligned. it will be aligned to @0x07FFFFF8" in the STM32CubeProgrammer output. The programmer cannot download the binary to 0x07FFFFF8 because that is an invalid address for flash memory. For some reason certain versions of the programmer does this incorrect alignment (v2.13 and v2.10, in my experience).

I fixed the problem by downgrading the IDE from v1.12 to v1.11.2, which uses STM32CubeProgrammer v2.12 and works as expected.

View solution in original post

7 REPLIES 7

Rename the directory it currently lives in, and replace it with an unpacked copy of the tools into a directory or the original naming?

Check pathing / naming in the settings for the tools, or within the project meta-data?

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

Ok, I did your first suggestion. I went into my debug configuration and clicked "Show Command Line" and got this:

/opt/st/stm32cubeide_1.12.0/plugins/com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.linux64_2.0.500.202301161003/tools/bin/ST-LINK_gdbserver -p 61234 -l 1 -d -s -cp /opt/st/stm32cubeide_1.12.0/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.linux64_2.0.600.202301161003/tools/bin -m 0 -k

So I went into the cubeprogrammer directory that's used in the command and replaced the bin folder with the bin folder of my v2.10 STM32CubeProgrammer installation, and it actually worked. Now the IDE uses v2.10 when I click "Debug". However, it's still giving me the "Error: failed to download Sigment[0]" error that v2.13 was giving me, which is strange because the standalone v2.10 STM32CubeProgrammer still works fine. Any suggestions? I'll keep messing around and report back if anything changes.

CCend.2
Associate III

I discovered that the original error was coming from the line "file segment @0x08000000 is not 255-bytes aligned. it will be aligned to @0x07FFFFF8" in the STM32CubeProgrammer output. The programmer cannot download the binary to 0x07FFFFF8 because that is an invalid address for flash memory. For some reason certain versions of the programmer does this incorrect alignment (v2.13 and v2.10, in my experience).

I fixed the problem by downgrading the IDE from v1.12 to v1.11.2, which uses STM32CubeProgrammer v2.12 and works as expected.

ego
Associate II

Hello,

I am using the STM32H730ZBTX and the problem is solved for IDE version 1.16.1 and programmer version 2.17.0, but again reapears for 1.17.0 and 2.18.0 versions respectively...

 

Please, could someone check and fix it?

 

Thank you.

Many thanks to the above post - I wasted a day of my life (and project schedule) because I assumed that the latest versions of these tools would not re-introduce problems that had already been fixed.

Hello @ego,

 

This issue has already been raised to our development team and will be fixed in upcoming releases.

Solved: STM32CubeProgrammer 2.18 BUG on STM32H730 - STMicroelectronics Community

We apologize for any inconvenience and appreciate your understanding.

 

Maryem.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
ego
Associate II

I encountered the same problem with STM32 Cube CLT V1.17. Works OK with V1.16 but not with V1.17.

Please, check it too, it's a real pain.