How do I get a blank project to successfully compile FRDM-K22 in Kinetis Design Studio?

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

How do I get a blank project to successfully compile FRDM-K22 in Kinetis Design Studio?

Jump to solution
1,426 Views
bosleymusic_com
Contributor IV

I'm coming from the land of visual studio and Ipython, so Eclipse is very foreign to me. So, I've been through this tutorial to attempt to create a blank C project for my FRDM-K22 Board, because no other way I was doing has proved successful: Tutorial: DIY Kinetis SDK Project with Eclipse – Startup | MCU on Eclipse

 

And still no dice.

I had the idea to copying an example project as a template, but that leads to more errors than trying to create one from scratch.

 

Here is what I have done:

1)SDK is installed, and I have imported ksdk_platform_lib_K22F51212 and built within the project.

2)I build a new C project and provide KSDK linking along with some other things in the preprocessor, such as ARM_MATH_CM4.

3)By default the OSA and Utilities folder are not showing up, so I add them in includes.

 

I can tell from syntax highlighting that the libraries are there, and it recognizes my includes like "fsl_os_abstraction.h" as valid, along with data structures, and various other things that could only come from the SDK.

 

The minute I add any actual functions from the SDK like "OSA_Init()", it gives me an undefined reference to "insert function name here."

I've looked very hard at the examples (particularly the DSPI example)  then  try to find differences in my setup, or linking, but I can't find them, nor get it to compile successfully.

 

Thoughts?

15953_15953.pngScreenShot.png

Labels (1)
1 Solution
635 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Donald:

I am sorry to know you have been struggling.

I think you are just missing to include the compiled library in your K22 KSDK project, in Project -> Properties -> C/C++ Build -> Settings -> Cross ARM C++ Linker -> Miscellaneous:

K22_Library.png

So the errors should be gone.

For further reference you can check K22 SDK User's Guide in your KSDK installation:

C:\Freescale\KSDK_1.0.0\doc\Kinetis SDK K22 User's Guide.pdf

And also, the next good tutorial by coleague Carlos Musich:

https://community.freescale.com/docs/DOC-102612

This is a step-by-step tutorial to create a KSDK project, and mentions the thing about adding the library, which I think you missed.


Regards!,
Jorge Gonzalez

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

View solution in original post

4 Replies
635 Views
bosleymusic_com
Contributor IV

Tried the following :

1)Uninstall everything, deleting workspaces, etc...

2)Re-Install KDS

3)Re-Install KDSK

4)Install the tools\eclipse_update 1.0.0 update (thinking something in the 1.0.1 may have been missing?)

5)Install the 1.0.1 update from downloaded .zip (displayed update vs. full install)

6)Create new workspace

7)Import and build ksdk_platform_lib_K22F51212 inside workspace

8)Create New Kinetis Design Studio project w/no Processor Expert.


- Now, HAL functions will compile in a new KDS project, however anything from a driver still gives the undefined reference error, although as before I can auto-fill the functions, it recognized fsl driver headers, etc...

- Demo projects will not build if I copy them into the workspace. Directory info is totally messed up.

- Demo projects will build if I do not copy them into the workspace.

- This is almost 5 days straight now of trying every combination of linker and compiler settings. uninstalling, re-installing, demo-ing, manually copying settings, importing settings, going through the above tutorial...

0 Kudos
636 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Donald:

I am sorry to know you have been struggling.

I think you are just missing to include the compiled library in your K22 KSDK project, in Project -> Properties -> C/C++ Build -> Settings -> Cross ARM C++ Linker -> Miscellaneous:

K22_Library.png

So the errors should be gone.

For further reference you can check K22 SDK User's Guide in your KSDK installation:

C:\Freescale\KSDK_1.0.0\doc\Kinetis SDK K22 User's Guide.pdf

And also, the next good tutorial by coleague Carlos Musich:

https://community.freescale.com/docs/DOC-102612

This is a step-by-step tutorial to create a KSDK project, and mentions the thing about adding the library, which I think you missed.


Regards!,
Jorge Gonzalez

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

635 Views
bosleymusic_com
Contributor IV

I had done this in an earlier iteration of trying settings, but I think I put the link in the wrong spot.

Lifesaver, I'm sitting here writing drivers based on HAL...so much time will be saved!

Thanks.

635 Views
bosleymusic_com
Contributor IV

Even in processor expert I'm getting undefined reference to built-in functions.

0 Kudos