Include files are incorrect even after updating them

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Include files are incorrect even after updating them

144 Views
RogerDavisWork
Contributor II

I am having a great amount of difficulty with MCUXpresso include file paths.

I am using MCUXpresso IDE v11.8.0 [Build 1165] [2023-07-26].


I had a project that was building but then I added a new set of directories and files and added new include paths to go with them. From that point on, I could no longer build the project because it could not find include files that clearly were in the include path. I have investigated it and it seems that not only is the include path wrong, it will not allow itself to be fixed.
I noticed that the offending include paths are listed in the project "Includes" dropdown and are grayed-out.  It would be nice to know where these came from and how to delete them.

If I narrow things down to just building a single file and then look at the console output, the list of includes is wrong. So, I then deleted all include paths from "Properties - C/C++ Build - Settings - Includes", and then made sure the list is also gone from "Properties - C/C++ General - Paths and Symbols" so taht both lists are completely empty. Then I build that one file and the console output still shows a list of includes (-I paths) that are from before and include wrong things even though the list should now be empty. This is true after hitting "Apply - Rebuild Index" and watching the "C/C++ Indexer" count to 100%. I have exited MCUXpresso and restarted among other things, but nothing seems to change.

I noticed that the error is replicated in all of the subdir.mk files that get automatically generated. If I delete the entire Debug directory containing these files, it gets regenerated, which I would expect, but the new subdir.mk files still have the wrong include file lists in them.

So, my question is - who is generating these subdir.mk files and where is it getting the incorrect include path data that is going into them? It must be pulling it from somewhere besides my settings because it is there even when I delete all of the include paths from the settings.
And, more importantly, how do I fix it?

0 Kudos
2 Replies

96 Views
AdrianOltean
NXP Employee
NXP Employee

So, my question is - who is generating these subdir.mk files and where is it getting the incorrect include path data that is going into them?

All build-related files (e.g. subdir.mk) are generated by the IDE based on the build settings associated to your project. There's no other place where the IDE can obtain these. Note that most of the build settings can be hierarchically placed at project-level, folder-level and file-level. Please double-check the presence of include paths at all levels. Also make sure you modify the desired build configuration.

I noticed that the offending include paths are listed in the project "Includes" dropdown and are grayed-out.  It would be nice to know where these came from and how to delete them.

Please help with a screenshot. There are no dropdowns in the Includes section under C/C++ Build Settings.

Regards,

Adrian

 

0 Kudos

104 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi RogerDavisWork,

When we create a new folder in a project, make sure the folder and files are included in the project.

go to "Exclude from Build", 

ZhangJennie_0-1711359733738.png

unckeck "debug" and "release"

ZhangJennie_1-1711359836605.png

the folder will be included in mk files after build.

 

Accordingly, checking "Debug" and "Release" excludes the folder from the project and remove the path from mk file.

Hope this helps,

Jun Zhang 

 

0 Kudos