cancel
Showing results for 
Search instead for 
Did you mean: 

CubeIDE: Build fails (make: returns with error 2)

OLenz.1
Associate II

Hi

I try to build a small project (only timer interrupt triggered led blinking) to get familiar with the basic tools. But CubeIDE quits a build with following:

08:47:42 **** Incremental Build of configuration Debug for project SandkastenF3 ****
make -j4 all 
arm-none-eabi-gcc -o "SandkastenF3.elf" @"objects.list"  -l"C:/Users/usersname/E-Technik/Bibliotheken\ und\ Projektdateien/STM32/SandkastenF3/Core/libraries/ledcircle/" -mcpu=cortex-m4 -T"C:\Users\usersname\E-Technik\Bibliotheken und Projektdateien\STM32\SandkastenF3\STM32F303VCTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="SandkastenF3.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
c:\program files\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.0.0.201904181610\tools\arm-none-eabi\bin\ld.exe: cannot find -lC:/Users/usersname/E-Technik/Bibliotheken\ und\ Projektdateien/STM32/SandkastenF3/Core/libraries/ledcircle/
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:45: SandkastenF3.elf] Error 1
"make -j4 all" terminated with exit code 2. Build might be incomplete.

Has anyone an idea to solve this, please?

1 ACCEPTED SOLUTION

Accepted Solutions
hs2
Senior

Better use -L to specify your (add) library paths and use e.g. -lledcircle to link with libledcircle.a.

It’s wise to avoid paths with spaces to avoid trouble and extra work with quoting.

View solution in original post

5 REPLIES 5
TDK
Guru

> cannot find -lC:/Users/usersname/E-Technik/Bibliotheken\ und\ Projektdateien/STM32/SandkastenF3/Core/libraries/ledcircle/

My guess is it doesn't play well with spaces in paths. Remote the spaces from the path and see if that solves it.

If you feel a post has answered your question, please click "Accept as Solution".
OLenz.1
Associate II

Well, I tried this before, but unfortunately without success.

16:49:37 **** Build of configuration Debug for project SandkastenF3 ****
make all 
arm-none-eabi-gcc -o "SandkastenF3.elf" @"objects.list"  -l"C:/Users/usersname/Desktop/SandkastenF3/Core/libraries/ledcircle/" -mcpu=cortex-m4 -T"C:\Users\usersname\Desktop\SandkastenF3\STM32F303VCTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="SandkastenF3.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
c:\program files\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.0.0.201904181610\tools\arm-none-eabi\bin\ld.exe: cannot find -lC:/Users/usersname/Desktop/SandkastenF3/Core/libraries/ledcircle/
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:45: SandkastenF3.elf] Error 1
"make all" terminated with exit code 2. Build might be incomplete.

hs2
Senior

Better use -L to specify your (add) library paths and use e.g. -lledcircle to link with libledcircle.a.

It’s wise to avoid paths with spaces to avoid trouble and extra work with quoting.

OLenz.1
Associate II

"Better use -L to specify your (add) library paths and use e.g. -lledcircle to link with libledcircle."

Ok...but how to do?

OLenz.1
Associate II

Ok, I found the option. Now it works.

Maybe there was another problem: The builder option was at "external builder". I set it to "internal builder" ans put the -L-option in, now it works. :)

Thanks.