FRDM-KL25Z and KDS - any example applications?

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

FRDM-KL25Z and KDS - any example applications?

6,655 Views
l0wside
Contributor II

After getting myself a FRDM-KL25Z, I looked up which IDE to use and went for the KDS, as CW will not support future KLxxx devices.

Now, I am looking for sample code for the FRDM-KL25Z. However, all I find is for CW. Do I need to uninstall the KDS and go back to CW? Or did I miss something?

 

Max

Labels (1)
12 Replies

2,086 Views
kyizawwin
Contributor II

Thanks, Erich!

That works! I could start using your sample code for UART. Another thing i make mistake is that I didn't copy the sample code to my workspace at first which caused compilation error. After I import again with ticking the option to copy the code into workspace, it's ok again.

Bryan

0 Kudos
Reply

2,086 Views
kyizawwin
Contributor II

Hi Erich,

I just started using Freescale KL25Z on KDS. (previously, I mainly use mbed). I have problem in compilation (using USB mouse example) showing "unsolved inclusion" at LEDR.h / LEDG.h etc. I guess my setting is wrong somewhere. Could you please kindly point me out?

error1.jpg

When I tried to use your example (FRDM_KL25Z-printf), there is compilation error as follow. Could you please kindly point me out where I did wrong

error2.jpg

Thanks and appreciate your help. You have tons of projects done in Freedom boards.

Bryan

0 Kudos
Reply

2,086 Views
BlackNight
NXP Employee
NXP Employee

The grayed out components in you screenshot tell me that you have not installed the needed components from GitHub.

See http://mcuoneclipse.com/2014/10/21/mcuoneclipse-releases-on-sourceforge/ how to download and install them from SourceForge.

Then generate code, and there should be no errors.

Erich

0 Kudos
Reply

2,086 Views
kyizawwin
Contributor II

Thanks Erich!

The PE components looks ok now but I still have error as below. Any path I didn't set correctly? Thanks!

Bryan

error3.jpg

0 Kudos
Reply

2,086 Views
BlackNight
NXP Employee
NXP Employee

Have you generated code already?

pastedImage_0.png

Erich

0 Kudos
Reply

2,086 Views
l0wside
Contributor II

Thanks to all who answered. After some fiddling around (and with help from Erich´s great blog), I found my way around the PE. At least the LED is blinking :smileyhappy: It was a lot easier than I had expected.

I am sure I will come back once I want to handle events, use the UART or whatever.

One side note: the code which PE generates for pin handling is slightly weird. For the green LED on the FRDM-KL25Z, it defines the function

void Bit2_PutVal(LDD_TDeviceData *DeviceDataPtr, bool Val)

The help states that DeviceDataPtr is to be initialized with Bit2_Init().

Looking deeper into the function, however, it starts with the somewhat funny line

(void)DeviceDataPtr;         /* Parameter is not used, suppress unused argument warning */

What´s happening here?

Another note: A debug cycle (compile, load, run) is much faster than with TI´s CCS6 which I´m used to. But: how can I reflash the device (using SDA) without disconnecting the debugger first? I feel I have to use more mouse clicks than it should take. An automatic load after (successful) compile would be great.

Regards,

Max

0 Kudos
Reply

2,086 Views
BlackNight
NXP Employee
NXP Employee

Hi Max,

good to hear that you are making progress!

That DeviceDataPtr is basically a device handle (see There is a Time and Date for both Worlds | MCU on Eclipse if you are interested in more of the background). It is not used for a bare metal.

There is a way around this: Optimized BitIO_LDD Programming with Processor Expert | MCU on Eclipse

But the future is now the new Kinetis SDK () which comes with a set of device drivers (Software Development Kit for Kinetis MCUs|Freescale).

It boils down to the way how drivers are written, where to put the layers, etc.

Regards,

Erich

0 Kudos
Reply

2,086 Views
warrenc
Contributor I

Hi Erich,

I don't think the SDK supports FRDM-KL25Z - but I'm very new to this and might have misunderstood what I read.

Warren

0 Kudos
Reply

2,086 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Warren:

You are correct, right now KL25 is not supported by KSDK. The support will come next year, I just cannot tell you when because that depends on the KSDK development team.

However KL25 (as in FRDM-KL25) is fully supported by CodeWarrior, KDS (Kinetis Design Studio), Processor Expert, MBED, IAR, Keil uVision and more, so there are no limitations.

Regards!

Jorge Gonzalez

0 Kudos
Reply

2,086 Views
mjbcswitzerland
Specialist V

Hi

FRDM-KL25Z is supported in the code at http://www.utasker.com/forum/index.php?topic=1721.0

It contains KDS, CW, IAR, Keil, Atollic, Crossworks, CooCox, GCC and VisualStudio simulation support with USB stack, FAT and much more in a single project, as well as boot loaders for the board (SD card, USB-MSD, USB-HID, serial - kboot compatible - also prepared for building with any of these IDEs).

Regards

Mark

µTasker Kinetis support

0 Kudos
Reply

2,086 Views
BlackNight
NXP Employee
NXP Employee

It is true that there are more examples around for CodeWarrior, as KDS is pretty new. There is an importer in KDS which helps converting projects, but the challenge is with the different linker settings.

What works well for me is to create a new project with the KDS wizard, and then add the sources of the CodeWarrior project to it.

I have posted some KDS examples here:

mcuoneclipse/Examples/KDS at master · GitHub

With the approach above, you can use the examples here too:

mcuoneclipse/Examples/FRDM-KL25Z at master · GitHub

If you are interested in a specific example above, let me know, and I could port it for you to KDS.

Erich

0 Kudos
Reply

2,086 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Max,

In the future ,   all the kinetis will supported by KDS,  so, in personal view , you'd better use KDS.

And it really has no sample in KDS, while KDS is so much like CW,  when you create project in KDS, you can refer to the demo of CW and  user guide of KDS(C:\Freescale\KDS_1.1.1\doc\pdf).

If you have any  question when create project in KDS,  please ask us without hesitate. 

I find a KDS+FRDM-KL25Z demo,  Using the FRDM-KL25 Board as a USB Mouse in KDS  

Best Regards,

Alice

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you for your support to us!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply