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

3 REPLIES 3

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.