Building demo program for TWR-K60D100M

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

Building demo program for TWR-K60D100M

Jump to solution
1,564 Views
markusbraitner
Contributor IV

Hi,

I'm just evaluating K60 using a TWR-K60D100M tower system. To get started, I wanted to re-build the demo program in order to change it and try out some tests this way. After some research I found the CodeWarrior project for the demo program (TWR-K60D100M_Quick_Start_Demo - TWR-K60D100M_QSD_SBCH from TWR-K60D100M: Kinetis K60 100 MHz MCU Tower System Module) and followed the instructions given in TWR-K60D100M_Quick_Start_Demo_Lab_Guide.pdf, but building always exits with approx. 450 errors...

I'm using CodeWarrior for MCU, Version 10.5, Build Id 130916

I've also installed MQX 4.0.2 (using FSLMQXOS_4_0_2_GA.exe), imported the libaries for TWR-K60D100M (by importing ..\Freescale_MQX_4_0\config\twrk60d100m\cw10\twrk60d100m.wsd) and re-compiled them (in Debug configuration).

Importing the Quick Start Demo project worked, but starting the build process (in debug configuration) always results in a lot of errors (mostly syntax errors, "';' missing" errors and undefined identifiers). For me it seems as CW would not find the MQX libraries (altough I even http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=TWR-K60D100M&fpsp=1&tab=Design_Tools_...) or maybe it is also a problem with interpreting C++ code?

One project that I could build was adc_demo in ..\CW MCU v10.5\MCU\CodeWarrior_Examples\Kinetis_Examples\k60\.

Any ideas what could be the reason?

Greetings from Vienna,

Markus

1 Solution
917 Views
kyleyang
Contributor IV

Hi Markus

I am Kyle, I think I has fix this issue and you can try my suggestion as below.

  1. check your MQX install path, for example, "C:\Freescale\Freescale_MQX_4_0"
  2. check your project properties setting
    1. Resource→Linked Resources:check the MQX_ROOT_DIR should same as MQX install path
    2. C/C++ Build→Build Variables:check the MQX_ROOT_DIR should same as MQX install path
    3. C/C++ General→Paths and Symbols:check no more warning path apeared
  3. Press OK and clear all rebuild it.

I can executing this demo code on my TWR-K60D100M platform.

Hope that you can fix re-build issues and enjoy this demo code.

View solution in original post

0 Kudos
8 Replies
917 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Markus,

In my memory, TWR-K60D100M_Quick_Start_Demo project was setup for the MQX   previous version 3.7, the path for BSP is 'C:/Freescale/Freescale_MQX_4_0/lib/twrk60n512.cw10/bsp,but in MQX 4.0 the paths for the bsp is 'C:/Freescale/Freescale_MQX_4_0/lib/twrk60n512.cw10/debug/bsp, so you can see lots of compile errors.

I suggest you use demo 'C:\Freescale\Freescale_MQX_4_0\demo' and 'C:\Freescale\Freescale_MQX_4_0\mqx\examples' to evaluate K60 MQX


917 Views
markusbraitner
Contributor IV

Hi Daniel,

thank you for your answer! This, of course, explains something...

But apparently then there's a mistake in the Quick Start Demo Guide (see attachment) from the quick start demo package provided on the freescale site for TWR-K60D100M - in section 5.1 (page 8) it states under point 4) that MQX version 4.0 has to be installed in order to be able to build the demo program. Maybe someone could correct this so that others don't get confused by this?

Kind regards,

Markus

0 Kudos
918 Views
kyleyang
Contributor IV

Hi Markus

I am Kyle, I think I has fix this issue and you can try my suggestion as below.

  1. check your MQX install path, for example, "C:\Freescale\Freescale_MQX_4_0"
  2. check your project properties setting
    1. Resource→Linked Resources:check the MQX_ROOT_DIR should same as MQX install path
    2. C/C++ Build→Build Variables:check the MQX_ROOT_DIR should same as MQX install path
    3. C/C++ General→Paths and Symbols:check no more warning path apeared
  3. Press OK and clear all rebuild it.

I can executing this demo code on my TWR-K60D100M platform.

Hope that you can fix re-build issues and enjoy this demo code.

0 Kudos
917 Views
markusbraitner
Contributor IV

Hi Kyle,

I finally got it working - your hints helped a lot to succeed in compiling the demo code!

The crucial point really was to set the correct path in the linked resources options.

However, I also had to change the workspace to the demo project folder before compilation finally succeeded with no errors. Maybe there would have also been some other option to get it running by setting corresponding paths, but I didn't get that working (importing the project into my existing workspace resulted in the compiler not finding all the source files).

So, thanks again - it works like a charm now :-)

Greetings,

Markus

917 Views
markusbraitner
Contributor IV

Hi Kyle,

thanks for your answer! I'll immediately try your solution and give you feedback!

Greetings from Austria,

Markus

0 Kudos
917 Views
soledad
NXP Employee
NXP Employee

Hi Markus,

Could you please try following the attached video?, let me know if this works.

Regards

Soledad

917 Views
markusbraitner
Contributor IV

Hi Soledad,

I've now worked through the video and building, flashing and debugging worked - thank you very much for providing the video - it was quite helpful! I guess the point was the selection of the Freescale compiler.

Howevery, I still can't build the demo project (TWR-K60D100M_Quick_Start_Demo), which I simply imported to the same workspace. Maybe it is also the compiler here. Is there an easy way to switch to the Freescale compiler for an existing project?

Kind regards,

Markus

0 Kudos
917 Views
markusbraitner
Contributor IV

Hi Soledad,

thank you for your fast response - I'll have a look at the video and will let you know the outcome.

Kind regards,

Markus

0 Kudos