CubeMX BUG report: CubeMX generated projects ALWAYS cause error when uploading via SW4STM32
Hi Ac6,
CubeMX generates projects and always concatinates project names with ’ Configuration’. This is bad and confuses the openOCD upload command interpreter.
When flashing (aka uploading), the ’ Configuration’ part ALWAYS results in errors because openOCD command interpreter does not accept blanks in filenames.
When uploading via SW4STM32 eclipse generates a command line as follows: /home/benoit/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.externaltools.openocd.linux32_1.3.0.201507241119/tools/openocd/bin/openocd -f STM32F103C8T6_minimalsystem_PC13LED.cfg -s “/home/benoit/workspaceSTM32Fxx/PC13LED_stm32f103c8t6/SW4STM32/PC13LED_stm32f103c8t6 Configuration” -s /home/benoit/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.debug_1.3.0.201507241045/resources/openocd/scripts -c “program Debug/PC13LED_stm32f103c8t6 Configuration.elf verify exit”.
Because of the blank between projectname and ‘Configuration.elf’, ‘Configuration.elf’ is seen as a separate command argument. Hence the command interpreter does not understand ‘Configuration.elf’ as an argument. Hence the argument error.
Please completely eliminate the ’ Configuration’ concatination or replace it by ‘_Configuration’ in CubeMX. Do this and your openOCD implementation in SW4STM32 will manage the uploading of compiled CubeMX projects flawlessly. CubeMX is a promissing tool! Don’t squander it.
As long as Ac6 does not correct this filenaming problem in the next version of CubeMX, developers using CubeMX generated code will ALWAYS have to manually truncate the elf filename by cutting off the ’ Configuration’ part.
As long as Ac6 does not correct this filenaming problem autodidacts will continuously and unnecessarily suffer annoying ‘illegal arguments’ errors when uploading simple tryouts starting with CubeMX generated projects and clog the forum.
Greets!
Ben