FRDM-K64 Ethernet / web HVAC example using MQX

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

FRDM-K64 Ethernet / web HVAC example using MQX

FRDM-K64 Ethernet / web HVAC example using MQX

Since the mbed Ethernet library and interface for FRDM-K64 have not yet been fully tested, instead of using mbed we will use one of the latest demo codes from MQX specifically developed for the FRDM-K64 platform.

Before starting please make sure you have the following files and software installed in your computer:

  1. CodeWarrior 10.6 (professional or evaluation edition)
  2. MQX 4.1 for FRDM-K64 (it is not necessary to install full MQX 4.1)
  3. JLink_OpenSDA_V2.bin (this is the debugger application)

* If you don't have a valid license, you can find a temporary license below, it will only be valid until 7/30/2014 and it will only be available online until 7/05/2014.

Building the project

The first step to use an MQX project is to compile the target/IDE libraries for the specific platform:

1. Open CodeWarrior and drag the file from the following path C:\Freescale\Freescale_MQX_4_1_FRDMK64F\build\frdmk64f\cw10gcc onto your project area:

MQX Libraries.JPG.jpg

This will load all the necessary libraries to build the project, once they are loaded build them it is necessary to modify a couple of paths on the BSP:

2. Right click on the BSP project and then click on properties

BSP Paths.JPG.jpg

3. Once the properties are displayed, expand the C/C++ Build option, click on settings, on the right pane expand the ARM Ltd Windows GCC Assembler and select the directories folder, this will display all the libraries paths the compiler is using

BSP Paths2.JPG.jpg

4. Double click on the "C\Freescale\CW MCU v10.6\MCU\ProcessorExpert\lib\Kinetis\pdd_100331\inc" path to modify it, once the editor window is open, change the path from "pdd_100331" to "pdd"

BSP Paths3.JPG.jpg

5. Repeat steps 2 and 3 for the ARM Ltd Windows GCC Compiler

BSP Paths4.JPG.jpg

6. Now you can build the libraries, build them one at a time by right clicking on the library and selecting build project, build them in the following order, it is imperative you do it in that order.

  1. BSP
  2. PSP
  3. MFS
  4. RTCS
  5. SHELL
  6. USBD
  7. USBH

7. Once all the libraries are built, import the web hvac demo, do it by dragging the .project file to your project area; the project is located in the following directory:

                    C:\Freescale\Freescale_MQX_4_1_FRDMK64F\demo\web_hvac\build\cw10gcc\web_hvac_frdmk64f

Web HVAC 1.JPG.jpg

8. Once the project is loaded, build it by right clicking on the project folder and select Build project

Debugging the project


To debug the project it is necessary to update the FRDM-K64 debugging application:

  1. Press the reset button on the board and connect the USB cable
  2. Once the board enumerates as "BOOTLOADER" copy the JLink_OpenSDA_vs.bin file to the unit
  3. Disconnect and reconnect the board
  4. On CodeWarrior (having previously compiled the libraries and project) click on debug configurations

Debug4.JPG.jpg


5. Select the connection and click on debug

Debug5.JPG.jpg


6. Open HVAC.h and change the IP Address to 192.168.1.202

pastedImage_15.png




Now the demo code has been downloaded to the platform you will need the following to access all the demo features:

  • Router
  • Ethernet Cable
  • Serial Terminal

The code enables a shell access through the serial terminal, it also provides web server access with a series of options to simulate an Heating Air Conditioning Ventilation System, the system was implemented using MQX and a series of tasks, for more details on how the task are created, the information regarding how to modify the code please check the attached document:

Freescale MQX RTOS Example guide.

Attachments
Comments

Hi Pedro,

I've followed your guide to the letter and it debugs fine but am having problems getting the board to actually 'ping' anything other than itself. If I attempt to ping something I get 'Error 0x1510 - Unknown Error'. I've also tried putting 192.168.1.202 in my browser but it never reaches the board.

Any advice?


Hello Pedro,

Thank you for putting this guide together.  I was successful in building and deploying the project on the board.  I would like to take this project and copy it so that I can keep the original and modify the copy.  I copied and pasted the project in code warrior but am getting some build path issues that I cannot figure out.

When I build the copied project I get warnings, that lead to a no build that include:

Invalid Project path: Include path not found (C:\lib\frdmk64f.cw10gcc\debug)

Invalid Project path: Include path not found (C:\lib\frdmk64f.cw10gcc\debug\bsp)

Invalid Project path: Include path not found (C:\lib\frdmk64f.cw10gcc\debug\bsp\Generated_Code)

...

What I cant figure out is what is generating this error.  I have tried linking in the bsp/psp etc. resoures, I have added path variable but these warnings are persistent.

Where is this error being generated from and how can i correct it?

No ratings
Version history
Last update:
‎06-29-2014 07:31 AM
Updated by: