Skip to main content
Associate
January 13, 2024
Solved

Cannot Build imported stm32 project

  • January 13, 2024
  • 12 replies
  • 4906 views

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.
Best answer by aelgammal

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.
January 13, 2024

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
January 14, 2024

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.
January 14, 2024

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

PavelA_0-1705247447304.png

PavelA_1-1705247491317.png

 

 

 

 

aelgammalAuthor
Associate
January 14, 2024
Semer CHERNI
ST Employee
January 15, 2024

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
January 15, 2024

Hi @Semer CHERNI 

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

Regards,

Amro

Pavel A.
January 15, 2024

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

Have you imported this SW4STM project into CubeIDE?

 

aelgammalAuthor
Associate
January 15, 2024

yup same exact issue for both internal and external builder

Pavel A.
January 16, 2024

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
January 16, 2024

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

 

Pavel A.
January 17, 2024

>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
January 25, 2024

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.