2015-07-17 03:48 AM
Hello,
A few days ago I started my adventure with stm32 microcontrollers. To be able to programm them easly I downloaded CubeMX from this sidehttp://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1533/PF259242?sc=stm32cube#
and of course something for debugging which is system workbench for stm32 Everything was going smoothly. I created my first project in CubeMX, chose IDE SW4STM32 in >>project >>settings (it downloaded some libraries) and saved in a workspace. Then I opened a Workbench for stm32, imported that project and clicked a debugging hammer. Unfortunatelly I got one error but I totally don't know what it is about. make all Building file: C:/Users/Dominik/Documents/Test1/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal.c Invoking: MCU GCC Compiler 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..\..\..\Inc -I..\..\..\Drivers\STM32F3xx_HAL_Driver\Inc -I..\..\..\Drivers\CMSIS\Include -I..\..\..\Drivers\CMSIS\Device\ST\STM32F3xx\Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -MMD -MP -MF''Drivers/STM32F3xx_HAL_Driver/stm32f3xx_hal.d'' -MT''Drivers/STM32F3xx_HAL_Driver/stm32f3xx_hal.d'' -o ''Drivers/STM32F3xx_HAL_Driver/stm32f3xx_hal.o'' ''C:/Users/Dominik/Documents/Test1/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal.c'' /usr/bin/sh: -c: line 1: syntax error near unexpected token `-D__weak=__attribute__((' /usr/bin/sh: -c: line 1: `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..\..\..\Inc -I..\..\..\Drivers\STM32F3xx_HAL_Driver\Inc -I..\..\..\Drivers\CMSIS\Include -I..\..\..\Drivers\CMSIS\Device\ST\STM32F3xx\Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -MMD -MP -MF''Drivers/STM32F3xx_HAL_Driver/stm32f3xx_hal.d'' -MT''Drivers/STM32F3xx_HAL_Driver/stm32f3xx_hal.d'' -o ''Drivers/STM32F3xx_HAL_Driver/stm32f3xx_hal.o'' ''C:/Users/Dominik/Documents/Test1/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal.c''' make: *** [Drivers/STM32F3xx_HAL_Driver/stm32f3xx_hal.o] Error 258 During my Internet research I found this article: I did the same thing as described above but it didn't help. Please help me with this matter. What am I doing wrong? I guess the problem lays in connection between CubeMX and eclipse and it is about linking libraries. But I have no idea how to fix it. Im using a 64 bit Windows 7, I also have Java 64bit installed. Please help Regards Dominik O.2015-07-24 01:51 AM
Dear user,
Unfortunately we are facing several issues that will be fixed asap in our next release. Please edit your .cproject file and make the following changes: Replace (~line 28): <builder buildPath=''${workspace_loc:/$(PROJECT_NAME)}/Debug'' id=''cdt.managedbuild.builder.gnu.cross.997189082'' superClass=''cdt.managedbuild.builder.gnu.cross'' /> with : <builder buildPath=''${workspace_loc:/cubemx_f0}/Debug'' id=''fr.ac6.managedbuild.builder.gnu.cross.997189082'' keepEnvironmentInBuildfile=''false'' managedBuildOn=''true'' name=''Gnu Make Builder'' superClass=''fr.ac6.managedbuild.builder.gnu.cross''> <outputEntries> <entry flags=''VALUE_WORKSPACE_PATH|RESOLVED'' kind=''outputPath'' name=''Debug''/> <entry flags=''VALUE_WORKSPACE_PATH|RESOLVED'' kind=''outputPath'' name=''Release''/> </outputEntries> </builder> Replace (~ligne 87) : <storageModule moduleId=''refreshScope'' versionNumber=''2''> <configuration artifactName=''cubemx_proj Configuration'' configurationName=''Debug''> <resource resourceType=''PROJECT'' workspacePath=''/STM32072B_EVAL'' /> </configuration> <!--configuration configurationName=''Release''> <resource resourceType=''PROJECT'' workspacePath=''/STM32072B_EVAL''/> </configuration--> </storageModule> with : <storageModule moduleId=''refreshScope'' versionNumber=''2''> <configuration artifactName=''cubemx_proj Configuration'' configurationName=''Debug''> <resource resourceType=''PROJECT'' workspacePath=''/$(NOM_PROJET)'' /> </configuration> <!--configuration configurationName=''Release''> <resource resourceType=''PROJECT'' workspacePath=''/$(NOM_PROJET)''/> </configuration--> </storageModule> Edit also the .project file:In the .project file, in the linkedRessources description there is an empty link , remove it as it causes parsing error when import the project:
<link> <name /> <type /> <location /> </link> Best regards.2015-07-24 06:15 AM
2015-07-30 01:52 AM
Hello,
I have the exactly same problem as described above. Editing the project files did not help. Previously it was working fine for weeks (CubeMX F1x 1.0 with STM32F103 chip and SW4STM32). I think something went wrong after migrating to newer version of System Workbench (1.3.0.20150724 ) and to newest CubeMX 4.9.0 and its F1 lib 1.1.