KDS Include Paths With Sub-Directories

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

KDS Include Paths With Sub-Directories

Jump to solution
2,677 Views
guitardenver
Contributor IV

Hello,

 

In a KDS projects I would like to tell the compiler where to look for include files. When I add a path in the C/C++ settings "Include Paths (-I)", I would like to point it to a folder that has all my include files. The folder will have sub folders that I would like to tell the compiler to look at. Is there a way to tell KDS to automatically look in all the subfolders in a folder pointed to? Adding a path for every sub folder is tedious.

 

 

Thanks

Labels (1)
1 Solution
1,294 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Matt:

There is no need to copy all KSDK .c files. The package contains library projects for different toolchains including KDS, which produce a library object file (.a) so you can reference it from your own project. Hence with KSDK v1.1 you only need a few include paths for a bareboard project:

  • ${KSDK_PATH}/platform/drivers/inc
  • ${KSDK_PATH}/platform/hal/inc
  • ${KSDK_PATH}/platform/osa/inc
  • ${KSDK_PATH}/platform/system/inc

If you are starting with KDS and Kinetis SDK I recommend you to follow the next guide:

Writing my first KSDK Application in KDS - Hello World and Toggle LED with GPIO Interrupt

Now if you are really not convinced about the library mode, yes there is a way you can "point" to .c files. Check the next tutorial:

Link to Files and Folders in Eclipse | MCU on Eclipse

Regards!,

Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
3 Replies
1,294 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Matt Lang:

The same question was answered by colleague Erich Styger in the next thread:

Re: Include subfolder KDS

Unfortunately you need to have every folder in the include paths.


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,294 Views
guitardenver
Contributor IV

Is there a quick and easy way to get the whole KSDK into your project? Preferably just to reference the KSDK folder so my project file does not get to big. Or do I have to add every folder for all the includes and add every .c file into my project manually? Can I have the compiler point to .c files like the .h files? Instead of making a local copy of all the .c files in the KSDK?

1,295 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Matt:

There is no need to copy all KSDK .c files. The package contains library projects for different toolchains including KDS, which produce a library object file (.a) so you can reference it from your own project. Hence with KSDK v1.1 you only need a few include paths for a bareboard project:

  • ${KSDK_PATH}/platform/drivers/inc
  • ${KSDK_PATH}/platform/hal/inc
  • ${KSDK_PATH}/platform/osa/inc
  • ${KSDK_PATH}/platform/system/inc

If you are starting with KDS and Kinetis SDK I recommend you to follow the next guide:

Writing my first KSDK Application in KDS - Hello World and Toggle LED with GPIO Interrupt

Now if you are really not convinced about the library mode, yes there is a way you can "point" to .c files. Check the next tutorial:

Link to Files and Folders in Eclipse | MCU on Eclipse

Regards!,

Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply