Skip to main content
OLenz.1
Associate II
Jul 18, 2020 6:58 AM UTC
Solved

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

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?

This topic has been closed for replies.
hs2
hs2Best answer
Visitor II
Jul 18, 2020 3:12 PM UTC

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.

5 replies

TDK
Jul 18, 2020 11:10 AM UTC

> 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
OLenz.1Author
Associate II
Jul 18, 2020 2:52 PM UTC

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
hs2Best answer
Visitor II
Jul 18, 2020 3:12 PM UTC

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
OLenz.1Author
Associate II
Jul 18, 2020 3:33 PM UTC

"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
OLenz.1Author
Associate II
Jul 18, 2020 3:49 PM UTC

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.