Skip to main content
warm38
Associate III
July 23, 2020
Solved

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

  • July 23, 2020
  • 3 replies
  • 3298 views

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?

This topic has been closed for replies.
Best answer by Cartu38 OpenDev

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

3 replies

Tesla DeLorean
Guru
July 23, 2020

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 VenmoUp vote any posts that you find helpful, it shows what's working..
warm38
warm38Author
Associate III
July 24, 2020

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?

TDK
July 23, 2020

> 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""."
warm38
warm38Author
Associate III
July 24, 2020

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?

Cartu38 OpenDev
Graduate II
July 24, 2020

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

warm38
warm38Author
Associate III
July 24, 2020

Thanks again. I'm back in business.

Cartu38 OpenDev
Graduate II
July 28, 2020

Please tag as "Answered" will help Community.

warm38
warm38Author
Associate III
July 28, 2020

I cant seem to find the "answered" button.