cancel
Showing results for 
Search instead for 
Did you mean: 

File added and path added, but still get "no such file".

warm38
Associate III

Added folder Drivers/BSP. Added file stm32f4xx_nucleo.h to the new directory. Added it to the include path. I even copied the file to Core/Inc. Still "no such file". Why is it missing?

1 ACCEPTED SOLUTION

Accepted Solutions

Right click on your project within Project Explorer then "Properties"

0693W000003BGhZQAW.jpg

As addon here is my setup adding BSP without any issue

0693W000003BGj1QAG.jpg

View solution in original post

10 REPLIES 10

Quality software...

Perhaps look at what exactly is being feed on the compiler/linker command lines, and if that is wrong or malformed.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
TDK
Guru

> Why is it missing?

The compiler can't find it.

Hard to know why without any details. Make sure the path to the include file is added.

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

every line contains "-I../Drivers/BSP" as seen in the line with the error:

arm-none-eabi-gcc "../Core/Src/DiagnosticStack/DiagnosticSlaveReceiveHandler.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DUSE_HAL_DRIVER -DSTM32F401xE -DDEBUG -c -I../Core/Src/DiagnosticStack -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Core/Src/bootSupport -I../Core/Src/halLayer -I../Drivers/CMSIS/Include -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/BSP -I../Core/Src/DiagnosticClasses -I../Core/Inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/DiagnosticStack/DiagnosticSlaveReceiveHandler.d" -MT"Core/Src/DiagnosticStack/DiagnosticSlaveReceiveHandler.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/DiagnosticStack/DiagnosticSlaveReceiveHandler.o"

In file included from ../Core/Src/halLayer/halTimer.h:30:0,

                from ../Core/Src/DiagnosticStack/Diagnostic.c:30:

../Core/Inc/main.h:39:10: fatal error: stm32f4xx_nucleo.h: No such file or directory

 #include "stm32f4xx_nucleo.h"

Hints? Comments? Suggestions?

warm38
Associate III

Project->Properties->Tool Settings -> MCU GCC Compiler -> Include paths Add "Drivers/BSP". It is visible as "../Drivers/BSP" Any suggestions as to how to make that line effective?

Is such line effective from Eclipse point of view already ? Please could you check if such line is leading to plain or grayed include like following sanpshot ... if grayed means Eclipse not able to reach

0693W000003BG9cQAG.png

Thanks. Good find. I did find one bad directory which starts with a "/". How do I get rid of the bad one? How do I replace it with a good one with no '/"?

Unfortunately, stm32f4xx_nucleo.h isn't in that one directory and cannot be found.

Right click on your project within Project Explorer then "Properties"

0693W000003BGhZQAW.jpg

As addon here is my setup adding BSP without any issue

0693W000003BGj1QAG.jpg

warm38
Associate III

Thanks again. I'm back in business.

Please tag as "Answered" will help Community.