I am trying to create a project that will contain FreeRTOS, FATFS, LWIP, etc. A separate library will contain my application firmware.
I used the FreeRTOS Hello World example for board init calls. I took the task it creates and placed it in my library main. The library has includes through the IDE to the project that contains my SDK elements. This part of the project works fine.
I then add LWIP through the SDK GUI to my main project. My code will then compile fine with just LWIP added, but not used. I added the #includes to my library and I make sure to have includes to the LWIP header files in my main project (via C/C++ Build->Settings->MCU C Compiler->Includes). When I go to compile, my console says that no such file or directory exists (see below error). If I go to my main project, I can right click and do an open declaration and it will open the header file. I have tried deleting the "LWIP/" part of the #include, and that does make a difference, but it will regenerate when I add anything from the SDK GUI.
C:\Users\michaelc\Documents\MCUXpressoIDE_11.0.0_2516\workspace\Test_Project_freertos_hello\lwip\src\include\lwip/api.h:40:10: fatal error: lwip/opt.h: No such file or directory
#include "lwip/opt.h"
Has anyone seen this issue before? Any help or advice is greatly appreciated.
已解决! 转到解答。
I've had a quick look at your project...
The issue is that you do not have the correct include paths listed.
To illustrate the issue, here is an imaginary scenario.
Organisation of files
- source
-- include
--- lwip
---- header.h
In your source file:
(1) #include "lwip/header.h"
Then your include path needs to add
(2) source/include
and NOT
(3) source/include/lwip
So, back to your project.
It is not clear what you have changed in the supplied sources (hint - do not change any of it!), but you now seem to have a mixture of (1), (2) and (3) (above). SO, I suggest that you return the source code to how it was supplied and then add the correct include path directories, like (2) above, not like (3).
Hope that helps.
I've had a quick look at your project...
The issue is that you do not have the correct include paths listed.
To illustrate the issue, here is an imaginary scenario.
Organisation of files
- source
-- include
--- lwip
---- header.h
In your source file:
(1) #include "lwip/header.h"
Then your include path needs to add
(2) source/include
and NOT
(3) source/include/lwip
So, back to your project.
It is not clear what you have changed in the supplied sources (hint - do not change any of it!), but you now seem to have a mixture of (1), (2) and (3) (above). SO, I suggest that you return the source code to how it was supplied and then add the correct include path directories, like (2) above, not like (3).
Hope that helps.