How can I compile code on K66 ?

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

How can I compile code on K66 ?

Jump to solution
1,564 Views
benjaminheder
Contributor III

Hello everybody,

I'm using the K66 board and Kinetis. I try to configure my Kinetis environment but It's not easy.

Project configurations:

                                          - Kinetis SDK 2x. Project

                                          - SDK_2.0_FRDM-K66F

                                          - Board: FRDM-K66F (not the microprocessor)

                                          - Current Toolchain: Cross ARM GCC

                                          - Gnu Make Builder

My board is linked to USB port with the good cable. 

And with a terminal like Teraterm, I checked if the board was able to receive data. It works.

Indeed I received x and y positions thanks to the code which is already inside.

The first question: The parameters sound good for you?

The second one: I am obliged to use Processor Expert to run the program on my k66?

The third one: How can I compile C code on K66?

Thank you by advance

Labels (1)
0 Kudos
1 Solution
1,091 Views
benjaminheder
Contributor III

Hi everyone,

Well, I finally found the solution.
1) I used Kinetis Project Generator. Then I chose my board and simply created a project.

2) On Kinetis Development Studio: Import -> General -> Existing project into Workshop -> In select Root Directory choose the KDS project folder

3) Build and then Flash with JLink debugger.

It works ! I checked it with Teraterm.

The snag was when I used OpenOCD as debugger. The suitest one is Segger JLink.

Thank you everybody

View solution in original post

0 Kudos
5 Replies
1,092 Views
benjaminheder
Contributor III

Hi everyone,

Well, I finally found the solution.
1) I used Kinetis Project Generator. Then I chose my board and simply created a project.

2) On Kinetis Development Studio: Import -> General -> Existing project into Workshop -> In select Root Directory choose the KDS project folder

3) Build and then Flash with JLink debugger.

It works ! I checked it with Teraterm.

The snag was when I used OpenOCD as debugger. The suitest one is Segger JLink.

Thank you everybody

0 Kudos
1,091 Views
MarekTrmac
NXP Employee
NXP Employee

Hi Benjamin,

Processor Expert is not supported for KSDK 2.x

If you have KDS 3.2 installed:

  1. update New Project Wizard from update site (Help - Check for Updates; and select New Project Wizard only)
  2. File - New - Kinetis SDK 2.x Project;
  3. Enter project name and select SDK folder where the SDK package is unpacked; [Next>]
  4. Select board [Finish]
  5. Project - Build All

Regards

Marek

0 Kudos
1,091 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Benjamin,

Please tell me the whole part number of you chip , I will help you to check

whether it support KSDK.

If the Processor Expert  support your chip , yes,  you  can use it ,  you can also don't use ,

it depends on your requirement.

Which version of KDS ?  After you finish your code ,just click build , it will compile your project .

BR

Alice

0 Kudos
1,091 Views
benjaminheder
Contributor III

Hello Alice,

My chip is MK66FN2M0VMD18 / 0N65N / CTAD1530E.

I saw on NXP, KSDK was supported. The good version of SDK for that IDE is SDK_2.0_FRDM-K66F.
It is recommended on the quick started on nxp.com.
About the project, I choose a Kinetis SDK 2.x Project, and the processor MK66FN2M0xxx18, "All drivers" and "none" for Selected RTOS.

So, the first problem I have is that debugger don't work (OCD, PNE, Segger). I have different problem for each.

The second one is that Kinetis can't compile C code on my board. I mean I try but I can't.

My code is very simple. I just add to the main script a printf and obviously the #include <stdio.h>.

No error in my code so BUILD is ok. I have the message on the console. However I have no message on the console for RUN.

So I check the board with a serial port connection on a terminal like TeraTerm, and I only see values of the basics program which are x and y positions.

So my program has not been compiled on the board.

How can I compile code on my board?

Thank you by advance

0 Kudos
1,091 Views
meisterbyte
Contributor I

Have you connected your Freedom FRDM-K66F board to the left USB connector (J26)? This is the debug M20xxxxx controller. If you setup a debugger in Kinetis add a new debug configuration of type GDB Segger J-Link. Edit this and check if the elf-file is defined and under debugger tab check the device name should be MK66FN2M0xxx18.

If you want to compile plain C-code: the file extension must be .c to compile with the c compiler. If it is .cpp it will be compiled by c++ compiler.....

0 Kudos