Skip to main content
Associate
Jan 13, 2024 19:17 UTC
Solved

Cannot Build imported stm32 project

Hi,

I have imported a stm32 project from Git Hub that was there from 2 years ago to my stm32cudeide but when I try to build using internal builder: I get this error message:
Info: Internal Builder is used for build
arm-none-eabi-gcc "..\\..\\..\\..\\..\\..\\..\\..\\Drivers\\BSP\\X-NUCLEO-IHMxx\\x_nucleo_ihmxx.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DUSE_HAL_DRIVER -DSTM32F401xE -DUSE_STM32F4XX_NUCLEO -DNUCLEO_F401RE -DSTM32F401RETx -DSTM32 -DSTM32F4 -DDEBUG -c -I../../../Inc -I../../../../../../../../Drivers/BSP/STM32F4xx-Nucleo -I../../../../../../../../Drivers/BSP/X-NUCLEO-IHMxx -I../../../../../../../../Drivers/BSP/Components/Common -I../../../../../../../../Drivers/BSP/Components/l6474 -I../../../../../../../../Drivers/CMSIS/Include -I../../../../../../../../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../../../../../../../../Drivers/STM32F4xx_HAL_Driver/Inc -O0 -ffunction-sections -Wall -fstack-usage -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers\\BSP\\X-NUCLEO-IHMxx\\x_nucleo_ihmxx.o"
Cannot run program "arm-none-eabi-gcc": The directory name is invalid.

and using external builder: 
5:00:36 **** Incremental Build of configuration Debug for project STM32F401RE-Nucleo ****
make all

15:46:32 **** Build of configuration Debug for project STM32F401RE-Nucleo ****

make all

Cannot run program "make": Code 0x10b: The directory name is invalid.

I don't know how to tackle this problem. Can someone help me with regards to this issue?

This topic has been closed for replies.
aelgammalBest answer
Associate
Jan 25, 2024 00:02 UTC

Hi Pavel and Semer,

After a lot of debugging and trying to figure out why my project wasnt building .I built  a simple to project and realised it has nothing to do with the builder being used or the toolchain. It was actually funny. I realised it might be a path issue. Basically, some of the files that it was trying to build had a path that was very lengthy, so i reduced the folders name length and voila it worked. So luckily i was able to find my own solution. Thanks for all  the help @Pavel A. and @Semer CHERNI.

12 replies

Pavel A.
Jan 13, 2024 19:34 UTC

Well, both internal and external builders fail with  same error, so this is objective. Check in the project (or workspace) properties which  toolchain is used. Is an old toolchain selected, which is no longer installed? If so, install this older toolchain (preferred) or try to jump ahead and choose a toolchain that is available.

Try to reinstall CubeIDE (again, the same version that you've used then, is preferred).

 

 

aelgammalAuthor
Associate
Jan 14, 2024 03:11 UTC

I'm still getting the same problem after trying that. The thing is the project is not mine so i don't know which version ide was used back then when it was made.

Pavel A.
Jan 14, 2024 15:51 UTC

Can you post a screenshot of the toolchain selection in your project?

PavelA_0-1705247447304.png

PavelA_1-1705247491317.png

 

 

 

 

Semer CHERNI
ST Employee
Jan 15, 2024 10:09 UTC

Hello @aelgammal 

First let me thank you for posting.

Could you try to make the build using the "GNU Tools for STM32(11.3.rev1) toolchain.

KR,
Semer.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
aelgammalAuthor
Associate
Jan 15, 2024 22:25 UTC

Hi @Semer CHERNI 

Thank you for the reply. I  tried that and still getting the same issue.

Regards,

Amro

Pavel A.
Jan 15, 2024 22:42 UTC

Still get "Cannot run program "arm-none-eabi-gcc": The directory name is invalid" ?

Have you imported this SW4STM project into CubeIDE?

 

aelgammalAuthor
Associate
Jan 15, 2024 22:45 UTC

yup same exact issue for both internal and external builder

Pavel A.
Jan 16, 2024 16:09 UTC

The message means that the builder cannot find the gcc compiler. Either CubeIDE setup is broken or the project is broken too badly. Maybe the author of that github project would be able to port his work from SW4STM to CubeIDE - try motivate them?

aelgammalAuthor
Associate
Jan 16, 2024 23:09 UTC

Okay ill try to get in contact with him. Is there anything else I can try in the meanwhile

 

Pavel A.
Jan 17, 2024 21:08 UTC

>Is there anything else I can try in the meanwhile

Try to understand why you get this error: "Cannot run program "arm-none-eabi-gcc": The directory name is invalid."

or "Cannot run program "make": Code 0x10b: The directory name is invalid.".

 

aelgammalAuthorBest answer
Associate
Jan 25, 2024 00:02 UTC

Hi Pavel and Semer,

After a lot of debugging and trying to figure out why my project wasnt building .I built  a simple to project and realised it has nothing to do with the builder being used or the toolchain. It was actually funny. I realised it might be a path issue. Basically, some of the files that it was trying to build had a path that was very lengthy, so i reduced the folders name length and voila it worked. So luckily i was able to find my own solution. Thanks for all  the help @Pavel A. and @Semer CHERNI.