Hello @Pavel A.,
cmd /c "${cubeide_cubeprogrammer_path}\STM32_Programmer_CLI.exe -e [16 63]" seems to be the correct way to invoke STM32_Programmer_CLI.exe.
Now the tool is launched, but it doesn't perform the erase operation because of the following error:
cmd /c "C:\ST\STM32CubeIDE_1.11.2\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.0.500.202209151145\tools\bin//STM32_Programmer_CLI.exe -e [16 63]"
make[1]: *** [makefile:93: pre-build] Error -1073741819
Even if I don't know what this return code indicates (I cannot find a return code list in UM2237), I guess that one of the problems is that I need also to specify the connection port.
So I have added the -c port=SWD option in the command line and now the erase operation seems to be performed correctly, as suggested by the output dumped on the console:
make -j7 all
cmd /c "C:\ST\STM32CubeIDE_1.11.2\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.0.500.202209151145\tools\bin\STM32_Programmer_CLI.exe -c port=SWD -e [16 63]"
-------------------------------------------------------------------
STM32CubeProgrammer v2.12.0
-------------------------------------------------------------------
ST-LINK SN : 001D0008544B500520343637
ST-LINK FW : V3J10M3B5S1
Board : STLINK-V3SET
Voltage : 3.28V
SWD freq : 24000 KHz
Connect mode: Normal
Reset mode : Software reset
Device ID : 0x460
Revision ID : Rev B
Device name : STM32G07x/STM32G08x
Flash size : 128 KBytes
Device type : MCU
Device CPU : Cortex-M0+
BL Version : 0xB2
Debug in Low Power mode enabled
Erase sector(s) ...
Existing specified sectors are erased successfully
Protected sectors are not erased
Is it right?
Regards,
Carlo