This document provides the guidelines to create a toggle LED application in the FRDM-K64F by using the KDS 1.1.0 + KSDK 1.0.0 and Non Processor Expert usage. This is helpful to understand how to create a project for KDS that uses the KSDK.
This document is assuming that KDS 1.1.0 and KSDK 1.0.0 are installed under a Windows OS system.
#include "board.h"
enum _gpio_pins
{
kGpioLED4 = GPIO_MAKE_PIN(HW_PORTE, 0x1A),//PTE26
};
GPIO_DRV_SetPinDir(kGpioLED4, kGpioDigitalOutput);
GPIO_DRV_WritePinOutput(kGpioLED4, value);
#include "fsl_device_registers.h"
#include "board.h"
enum _gpio_pins
{
kGpioLED4 = GPIO_MAKE_PIN(HW_PORTE, 0x1A),//PTE26
};
static int i = 0;
int main(void)
{
short value = 1; /* Write your code here */
hardware_init();
GPIO_DRV_SetPinDir(kGpioLED4, kGpioDigitalOutput);
/* This for loop should be replaced. By default this loop allows a single stepping. */
for (;;) {
for (i = 0; i<0xFFFFFF; i++)
{
}
value = value^1;
GPIO_DRV_WritePinOutput(kGpioLED4, value);
}
/* Never leave main */
return 0;
}
Great work!
Hi Garabo,
I have a relatively clean install of KDS 1.1.0 GA and KSDK 1.0.0 GA. When trying to add the library from location "C:\Freescale\KSDK_1.0.0\lib\ksdk_platform_lib\kds\K64F12\Debug\ksdk_platform_lib.a", I don't have the library file or even the DEBUG folder. Do I need to build a different project first?
Thanks and regards,
Norm
Hi Garabo,
I found my issue - I needed to build the KDS platform driver library per Appendix A of the Kinetis SDK K64 User's Guide.
Thanks for the great work!
Regards,
Norm
Hi Norman,
Right, the compilation of the library is missing in my document. I will try to update in the next revision of the document. Thanks for the heads up!
Best Regards,
Garabo
hello Garabo,
I do refer to your design ,
while ,when i build ,it errors ,
please help me
Waiting for your answer
Thank you !
Alice
Hi, Garabo,
My problem is resolved
Alice
Good to hear, What was the issue?
Regads,
Garabo
Great!!
Could you now write a tutorial about a new project GPIO with Processor Expert and/or MQX for KDS?
i have added the headers properly to inclues but still getting this errors everytime,
http://oi62.tinypic.com/n14ff7.jpg
plz help
Hi Kane,
Please try to compile the KSDK library. These errors are cause by two issues:
-KSDK lib is not compiled
-KSDK library is not added to the in the linker setting:
I hope this solved the problem
Best Regards,
Garabo
Hi Jose,
Let me work on that and hopefully have it ready in a few weeks.
Best Regards,
Garabo