KDS Include Paths With Sub-Directories

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

KDS Include Paths With Sub-Directories

ソリューションへジャンプ
2,679件の閲覧回数
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

ラベル(1)
1 解決策
1,296件の閲覧回数
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 件の賞賛
返信
3 返答(返信)
1,296件の閲覧回数
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,296件の閲覧回数
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,297件の閲覧回数
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 件の賞賛
返信