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

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

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

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

Hi everybody,

 

You can find the new version of this document using KDS2.0 and KSDK1.1.0 is in the following link:

Writing my first KSDK1.2 Application in KDS3.0 - Hello World and Toggle LED with GPIO Interrupt

 

Best regards,

Carlos

Technical Support Engineer

Labels (1)
Comments

Thank you for the write-up. Would have saved a lot of time when I got started with KDS and KSDK and I'm sure it will be of great help for people who get started now..

But I still have high hopes that most of these steps will be integrated into the Project Wizard in the next KDS release, so that it becomes trivial to start a new KSDK projects

i tried the tutorial & properly included the headers as mentioned in document, but still getting below errors:

http://oi62.tinypic.com/n14ff7.jpg

[ the image icon is disabled so i pasted the link ]

Plz help

Hi Kane,

did you added the ksdk library (.a file) in the linker settings of the project?

Hi, nice to be able to follow an example.

However I'm having the same problem as Kaen Taker

I believe there is a step missing in generating the .a - and its described in the locally installed

Freescale\KSDK_1.0.0\doc\Kinetis SDK K64 User's Guide.pdf

(and also Re: Cannot load KDS demo workspace on the Freedom K64?   )

which generates

Freescale\KSDK_1.0.0\lib\ksdk_startup_lib\kds\K64F12\Debug\ksdk_platform_lib.a  -

and then follow the example described here, and it builds successfully for me.

Neil

Hi Neil,

do you know what exact step is missing?

Please refer to point 1.5 It is necessary to build KSDK Platform Driver Library (ksdk_platform_lib.a), here is indicated which locally installed guide you must follow depending on the MCU you are using.

Best regards,

Carlos

Hi Carlos

Good to see that it is there.

I missed it when installing - and then searched the project pages to find someone else had commented on it elsewhere.

Perhaps in a future edition of the document when ksdk_platform_lib.a is used, it could be referenced back to where it was built. I assumed it was an error in the document. Sorry my oversight

Also - just an FYI ‘Freescale\KSDK_1.0.0\doc\Kinetis SDK K64 User's Guide.pdf  Appendix A doesn't show in the index (Adobe XI reader or FoxIt 7) - initially looks like another error No Appendix A, but I found it by reading the document. Append A is just before section  5

Again really appreciate having this guide - its enabled me to come up to speed building a KSDK project.  Hopefully I can actually get some work done, I've spent the whole of this week and last week trying to navigate undocumented tools and lib code issues between different compilers.

Neil

Thank you for your comments Neil!

I will make this updates for SDK1.1 which is coming soon (December I guess) and will have many enhancements, new features and support for more boards.

Regards,

Carlos

Before this document came out, I was about ready to go to another manufacturer or (until the SDK settles down), use mbed and export. Actually the mbed thing actually woks quite well - wrt exporting.

Mbed is pretty good as a 'prototype' developer, but kinda like burning proms and hoping for the best - with print statements.. :smileyhappy:

Bravo !

Scott

One thing - in this document the KSDK_PATH is set to "C:\Freescale\KSDK_1.0.0" where Appendix A points to KDS_1.1.1.

Thank you very much for your comments Scott.

Regarding to the paths, KSDK_PATH must be set to "C:\Freescale\KSDK_1.0.0" (Kinetis Software Development Kit) while KDS_1.1.1 is the Kinetis Design Studio path.

I have made a small edit according neilhancock suggestion.

Best regards,

Carlos Musich

Freescale TIC Engineer

I see you edited this a few hours ago.

Has this gitten simpler with KDS 2.0 and KSDK 1.1?

It seems like a lot of work for a board that is Supported by the Tool and SDK.

All that making directories, copying files, etc - has that gone away with the new releases?

Tom

Hi Carlos,

I've just spent a frustrating few hours trying to recreate the application from your document without any luck.

I downloaded and installed KDS 2.0.0 and KSDK 1.1.0 on Friday and (after much work) have them installed and I am able to build and load the demo applications onto a FRDM-K64F.

I now want to try and develop my own applications using the KSDK before going on to adding MQX.

When I read your document:

  1. There seems to be a lot of confusion regarding whether or not this is KSDK 1.1.0 - in your documentation, you continually refer to KSDK 1.0.0, Sections 1.5 & 3.6 for example, yet isn't this for KSDK 1.1.0?  Sorry, if the resources for KSDK 1.0.0 are to be used in a KSDK 1.1.0 application, could that be explicitly noted?
  2. When I look at your "Properties" screen shots versus what I see, there are quite a bit of differences.  For example, when I look at the screen shot in Figure 3.7 (Cross ARM C Compiler - Includes), I get a much smaller list of options. 
  3. You seem to be organizing your folders differently from the Demo Applications (ie putting "Board" and "utilities" under "Sources" rather than at the same level as "Sources") - why is that? 

Maybe I still don't have things properly installed. 

Two suggestions:

  1. Could you please date the document and, ideally, include a list of updates from previous versions?  From reading the thread, it sounds like the document has been updated and maybe I'm working from a downlevel version but I don't know. 
  2. Could somebody in Freescale write a SINGLE document explaining how to install the tools with not only getting demos working but your own application with correct screen shots and download links?  Getting to this point, it has taken me about 20 hours and I have had to reference:


I've been working with CW since 2009 and am very familiar with it as well as creating applications on it with MQX - this has been a lot more effort than I ever would imagined and I still don't have a working basic application and I haven't even started on MQX (which is my ultimate destination). 


Sorry for the bitch, but it's been a lot of work without anything to show for it. 


Thanx,


myke

Hey Carlos,

I went through your instructions as accurately as possible with the following notes:

  1. Section 1.3  I installed for KSDK_1.1.0. 
  2. Section 1.4  I verified that the KSDK_PATH was "C:\Freescale\KSDK_1.1.0"
  3. Section 2.4  I verified that the KSDK_PATH was "C:\Freescale\KSDK_1.1.0"
  4. Section 3.6  Shouldn't "fsl_debug_console.h" be in "C:\Freescale\KSDK_1.1.0\platform\utilities\inc" (added "\inc")? 
  5. Section 3.7  As noted in my previous post, the list of included paths is much shorter than what's shown in the screen shot and that leads to...
  6. Section 3.12  I first got the error:

14:44:51 **** Build of configuration Debug for project FRDM-K64_HelloWorld_GPIO_ISR ****

make all

'Building file: ../Sources/Utilities/fsl_debug_console.c'

'Invoking: Cross ARM C Compiler'

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g3 -D"CPU_MK64FN1M0VMD12" -I"../Sources" -I"../Sources/Board" -I"../Sources/Utilities" -I"../Project_Settings/Startup_Code" -I"../SDK/platform/CMSIS/Include" -I"../SDK/platform/CMSIS/Include/device" -I"../SDK/platform/CMSIS/Include/device/MK64F12" -std=c99 -MMD -MP -MF"Sources/Utilities/fsl_debug_console.d" -MT"Sources/Utilities/fsl_debug_console.o" -c -o "Sources/Utilities/fsl_debug_console.o" "../Sources/Utilities/fsl_debug_console.c"

In file included from ../Sources/Utilities/fsl_debug_console.c:35:0:

../Sources/Utilities/fsl_debug_console.h:35:32: fatal error: fsl_os_abstraction.h: No such file or directory

#include "fsl_os_abstraction.h"

                                ^

compilation terminated.

make: *** [Sources/Utilities/fsl_debug_console.o] Error 1

14:44:52 Build Finished (took 1s.420ms)

     Which I resolved by adding "${KSDK_PATH}/platform/osa/inc" which is where I found fsl_os_abstraction.h...

     Then I got another error indicating that fsl_uart_hal.h wasn't found, so I added "${KSDK_PATH}/platform/hal/inc"...

      which ended up with an error for fsl_clock_manager.h

And I stopped here. 

I then tried bringing in the include files that were in the ftm_pwm_frdmk64f demo program:

../../../../../platform/utilities/inc

../../../../../platform/osa/inc

../../../../../platform/CMSIS/Include

../../../../../platform/CMSIS/Include/device

../../../../../platform/startup/MK64F12

../../../../../platform/hal/inc

../../../../../platform/drivers/inc

../../../../../platform/system/inc

../../../../../platform/drivers/src/ftm

../../../../../boards/frdmk64f

With no difference, I tried adding the ${KSDK_PATH} prefix without any luck. 

I'm guessing the problem is that I've either not installed KDS and KSDK properly or ???

Thanx,

myke

Hi Myke,

I am sorry for the confusion I caused. The new version of the document is on this link: Writing my first KSDK Application in KDS - Hello World and Toggle LED with GPIO Interrupt

I removed the old document form this thread to avoid confusion.

Best regards,

Carlos

Hi Tom,

Although it is easier to create a full project it is still necessary to add files, folders and paths to have a complete project. I have already submitted feedback about this, hopefully in next release the wizard will provide all the necessary files and path for a full project.

Please note that the new file is in another thread.

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

Regards,

Carlos

Hi Carlos,

I got the demo working - a lot of work. 

If you look at the link you referenced above, you'll see my notes on what I had to do to get things going along with issues and suggestions.

Thanx for providing me with the correct link.

myke

No ratings
Version history
Last update:
‎10-22-2014 09:59 AM
Updated by: