MCUXpresso: Missing header files even with correct include paths

cancel
Showing results for 
Search instead for 
Did you mean: 

MCUXpresso: Missing header files even with correct include paths

571 Views
cennis
Contributor II

Hello, 

I'm working on a project with the MK22FN1M0Axxx12 chip.   In my MCUXpresso project, I am using the SDK_2.x_MK22FN1M0Axxx12.  I have a few components from the SDK enabled such as GPIO, Port, and common, but when I go to build my configuration I get errors in my utilities folder for missing header files.  These header files exist in my workspace under a separate folder (drivers). 

pastedImage_9.png

From reading other community posts, I have double checked my Project properties to make sure I am including the proper pathways.  Above, you can see that my utilities and drivers folders exist in my include path.  

If I attempt to manually resolve the error in my file by typing out the full pathway for the missing header file, I get new errors based on missing header files in that file.  I have double checked to ensure that my folders in question are not being excluded from the build.  

pastedImage_11.png

 

I have also double checked that under "Manage SDK components" the proper driver has been enabled.  For example, my error says I am missing "fsl_common.h", and above you can see that common has been enabled.  

 

I have tried deleting my project and recloning from my team's source control, which is working for them, but I am still seeing the same issue occur.  I am wondering if there is a step somewhere I have missed with making sure my IDE and my project are configured properly.  Any help in the matter would be appreciated.  

Thanks for your time and assistance, 

Carson.  

Labels (1)
0 Kudos
2 Replies

481 Views
ErichS
Senior Contributor III

Could you share a screenshot of the problem itself? And maybe the console output of the compiler command line (there you should see where it searches for the includes).

From the screenshot I see

"${workspace_loc:/$(ProjectName}/utilities}"

"${workspace_loc:/$(ProjectName}/drivers}"

but you say

"These header files exist in my workspace under a separate folder (drivers). "

So they are not in your project, not on yourr workspace root? Your setting above is for a path of a project in your workspace and then inside a subfolder.

If what I assume is that you have utilities and drivers *inside* your project, then simply use project relative paths (relative to the 'Debug' or 'Release' output folder, for example have this:

"../drivers"

I hope this helps,

Erich

0 Kudos

481 Views
cennis
Contributor II

Thanks for getting back to me so quickly, Erich, 

 Here is what I am seeing on the console at build time:

pastedImage_1.png

From my understanding, my utilities and drivers folder are both inside the workspace, so the pathways you highlighted should be appropriate, right?

Immediately proceeding the error, the console outputs the following:

arm-none-eabi-gcc -DCPU_MK22FN1M0AVLQ12 -DCPU_MK22FN1M0AVLQ12_cm4 -DCPU_MK22FN1M0VLQ12 -DUSB_STACK_BM -DCPU_MK22FN1M0VLQ12_cm4 -D__REDLIB__ -DSDK_OS_BAREMETAL -DFSL_RTOS_BM -I"\\VMWARE-HOST\Shared Folders\SHARE\repositories\MCUX SSCB HW Test\drivers" -I"\\VMWARE-HOST\Shared Folders\SHARE\repositories\MCUX SSCB HW Test\usb\device\source\khci" -I"\\VMWARE-HOST\Shared Folders\SHARE\repositories\MCUX SSCB HW Test\usb\include" -I"\\VMWARE-HOST\Shared Folders\SHARE\repositories\MCUX SSCB HW Test\osa" -I"\\VMWARE-HOST\Shared Folders\SHARE\repositories\MCUX SSCB HW Test\utilities" -I"\\VMWARE-HOST\Shared Folders\SHARE\repositories\MCUX SSCB HW Test\drivers" -I"\\VMWARE-HOST\Shared Folders\SHARE\repositories\MCUX SSCB HW Test\sources" -I"\\VMWARE-HOST\Shared Folders\SHARE\repositories\MCUX SSCB HW Test\drivers" -I"\\VMWARE-HOST\Shared Folders\SHARE\repositories\MCUX SSCB HW Test\CMSIS" -I"\\VMWARE-HOST\Shared Folders\SHARE\repositories\MCUX SSCB HW Test\CMSIS_driver" -I"\\VMWARE-HOST\Shared Folders\SHARE\repositories\MCUX SSCB HW Test\board" -I"\\VMWARE-HOST\Shared Folders\SHARE\repositories\MCUX SSCB HW Test\source" -I"\\VMWARE-HOST\Shared Folders\SHARE\repositories\MCUX SSCB HW Test" -I"\\VMWARE-HOST\Shared Folders\SHARE\repositories\MCUX SSCB HW Test\startup" -I"\\VMWARE-HOST\Shared Folders\SHARE\repositories\MCUX SSCB HW Test\usb\device\class\cdc" -I"\\VMWARE-HOST\Shared Folders\SHARE\repositories\MCUX SSCB HW Test\usb\device\class" -I"\\VMWARE-HOST\Shared Folders\SHARE\repositories\MCUX SSCB HW Test\usb\device\source" -I"\\VMWARE-HOST\Shared Folders\SHARE\repositories\MCUX SSCB HW Test\usb\device\include" -O0 -fno-common -g3 -Wall -c -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -fmerge-constants -fmacro-prefix-map="../utilities/"=. -mcpu=cortex-m4 -mthumb -D__REDLIB__ -fstack-usage -specs=redlib.specs -MMD -MP -MF"utilities/fsl_log.d" -MT"utilities/fsl_log.o" -MT"utilities/fsl_log.d" -o "utilities/fsl_log.o" "../utilities/fsl_log.c"

If I'm following your suggestion correctly, then the issue is that my workspace is a different directory from the source files in my project?  For example, my project files are in a source control repository in the pathway shown in the console output, but my IDE workspace is in a different directory. 

Thanks again for your help and your follow up, 

Carson.  

0 Kudos