AnsweredAssumed Answered

STM32CubeMX generates broken SW4STM32 code

Question asked by jer on Dec 31, 2016
Latest reply on Mar 1, 2017 by Sirma Siang

Hi,

 

I've created a very simple project in STM32CubeMX for the F3DISCOVERY board. The only things I changed from the default are enabling MCO, and setting the PLL multiplier to 16. When I import the code into SW4STM32 and press build, I get the following error:

 

17:41:40 **** Build of configuration Debug for project test_64mhz ****
make all
Building file: ../Src/main.c
Invoking: MCU GCC Compiler
/Users/jeremy/stm32_test/rcc_64mhz/test_64mhz/Debug
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -D__weak=__attribute__((weak)) -D__packed=__attribute__((__packed__)) -DUSE_HAL_DRIVER -DSTM32F303xC -I"/Users/jeremy/stm32_test/rcc_64mhz/test_64mhz/Inc" -I"/Users/jeremy/stm32_test/rcc_64mhz/test_64mhz/Drivers/STM32F3xx_HAL_Driver/Inc" -I"/Users/jeremy/stm32_test/rcc_64mhz/test_64mhz/Drivers/STM32F3xx_HAL_Driver/Inc/Legacy" -I"/Users/jeremy/stm32_test/rcc_64mhz/test_64mhz/Drivers/CMSIS/Device/ST/STM32F3xx/Include" -I"/Users/jeremy/stm32_test/rcc_64mhz/test_64mhz/Drivers/CMSIS/Include"  -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -MMD -MP -MF"Src/main.d" -MT"Src/main.o" -o "Src/main.o" "../Src/main.c"
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -D__weak=__attribute__((weak)) -D__packed=__attribute__((__packed__)) -DUSE_HAL_DRIVER -DSTM32F303xC -I"/Users/jeremy/stm32_test/rcc_64mhz/test_64mhz/Inc" -I"/Users/jeremy/stm32_test/rcc_64mhz/test_64mhz/Drivers/STM32F3xx_HAL_Driver/Inc" -I"/Users/jeremy/stm32_test/rcc_64mhz/test_64mhz/Drivers/STM32F3xx_HAL_Driver/Inc/Legacy" -I"/Users/jeremy/stm32_test/rcc_64mhz/test_64mhz/Drivers/CMSIS/Device/ST/STM32F3xx/Include" -I"/Users/jeremy/stm32_test/rcc_64mhz/test_64mhz/Drivers/CMSIS/Include"  -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -MMD -MP -MF"Src/main.d" -MT"Src/main.o" -o "Src/main.o" "../Src/main.c"'
make: *** [Src/main.o] Error 2

17:41:40 Build Finished (took 94ms)

My operating system is OSX Yosemite, and both SW4STM32 and STM32CubeMX are updated to the latest versions.

 

Thanks,

Jeremy

Outcomes