MCUXpresso Library Include Issue

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MCUXpresso Library Include Issue

ソリューションへジャンプ
2,159件の閲覧回数
michaelc77
Contributor II

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.

ラベル(1)
タグ(1)
0 件の賞賛
1 解決策
1,898件の閲覧回数
converse
Senior Contributor V

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.

元の投稿で解決策を見る

2 返答(返信)
1,899件の閲覧回数
converse
Senior Contributor V

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.

1,898件の閲覧回数
michaelc77
Contributor II

Thank you. I think I was confused with the IDE saying the #include was broken in my main project and not in the library. I added the paths correctly in my library and it compiles fine.

0 件の賞賛