Advertisement

Quick Links

Freescale Semiconductor
User's Guide
Getting Started with
Freescale MQX™ RTOS and IAR
Embedded Workbench
PRODUCT:
PRODUCT VERSION:
DESCRIPTION:
RELEASE DATE:
© 2015 Freescale Semiconductor, Inc. All rights reserved.
Freescale MQX™ RTOS
4.2.0
Using IAR Embedded Workbench Tools with Freescale MQX™ RTOS
April, 2015
Document Number: MQXGSIAR
Rev. 5, 04/2015
®

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the MQX RTOS and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Freescale Semiconductor MQX RTOS

  • Page 1 Getting Started with Freescale MQX™ RTOS and IAR ® Embedded Workbench Freescale MQX™ RTOS PRODUCT: 4.2.0 PRODUCT VERSION: Using IAR Embedded Workbench Tools with Freescale MQX™ RTOS DESCRIPTION: April, 2015 RELEASE DATE: © 2015 Freescale Semiconductor, Inc. All rights reserved.
  • Page 2 Freescale, the Freescale logo, and CodeWarrior are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. Vybrid and Tower are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners.
  • Page 3: Table Of Contents

    3.1 Run MQX RTOS Hello World program ..................5 3.2 Multi-core debugging ....................... 6 3.3 Debugging (attach) the Application loaded by MQX RTOS Bootloader ........11 3.4 MQX RTOS Task Aware Debugging ..................13 4 Using the MQX RTOS DebugI/O Driver with EWARM IDE ............19 ®...
  • Page 4: Getting Started With Freescale Mqx™ Rtos And Iar Embedded Workbench

    Freescale MQX™ RTOS operating system. See Getting Started with Freescale MQX™ RTOS and other user documentation included within the latest Freescale MQX RTOS installation for more details not specifically related to the IAR Embedded Workbench tools.
  • Page 5: Building The Mqx Rtos Libraries And Example Application

    For MQX RTOS v4.2.0, each example/demo application comes with one workspace file, which contains the path to the example/demo project file and all dependent MQX RTOS library project files. Import the workspace file in the folder. For example, with MQX RTOS: <mqx_install_dir>/mqx/examples/<example>/build/iar/<example>_<board_name>/<exampl...
  • Page 6: Build Example/Demo Application Project File

    2.2 Build example/demo application project file  Select the build target and memory configuration for the example/demo application. With the Hello World example application of MQX RTOS for FRDMK64120M, it is Int Flash Debug/Int Flash Release Figure 3- Build application ...
  • Page 7: Running And Debugging The Mqx Rtos Application

     In project/Options-Debugger check debugger Driver settings. Default is J-Link. When a MQX RTOS application is compiled and linked to all MQX RTOS libraries, press the debug button to download the application to target. The application gets executed and stops at the default C language entry point in the main() function.
  • Page 8: Multi-Core Debugging

    3.2 Multi-core debugging This chapter describes the basics of multi-core debugging with MQX RTOS. Description is provided for twrvf65gs10_a5 a twrvf65gs10_m4 (Vybrid) board support package and MCC (multi-core ® ® communication) example application. In this case, the ARM Cortex -A5 is the primary core while ®...
  • Page 9 J-Link/J-Trace setting. The number 0 and 3 are the indexes of the CPUs on JTAG chain. Since this can differ on other processors, see your processor Reference Manual for details. ® Getting Started with Freescale MQX™ and IAR Embedded Workbench , Rev. 5, 04/2015 Freescale Semiconductor...
  • Page 10 Figure 11- Terminal  Start the auxiliary core (Cortex-M4) application . The responder starts and the message “pingpong” starts between the cores. ® Getting Started with Freescale MQX™ and IAR Embedded Workbench , Rev. 5, 04/2015 Freescale Semiconductor...
  • Page 11 See the steps bellow:  First, the debugger needs to switch to I-Jet got you I-Jet/JTAGjet menu and update Firmware in EmuDialog Menu. ® Getting Started with Freescale MQX™ and IAR Embedded Workbench , Rev. 5, 04/2015 Freescale Semiconductor...
  • Page 12  The frequency needs to be set to 1 Mhz. The autodetect does not work correctly. This will be solved in future IAR versions. ® Getting Started with Freescale MQX™ and IAR Embedded Workbench , Rev. 5, 04/2015 Freescale Semiconductor...
  • Page 13: Debugging (Attach) The Application Loaded By Mqx Rtos Bootloader

    Bootloader usage, see Readme.txt located in the MQX RTOS Bootloader application folder. <mqx_install_dir>/mqx/examples/bootloader_vybrid/Readme.txt) Building Bootloader and creating bootable SD card  Import the MQX RTOS Bootloader project to your workspace by using Project/Add Existing Project menu.  Select the bootloader_vybrid from your MQX RTOS installation directory.
  • Page 14 Remove the SD Card from the PC and plug it into Micro SD Card slot on your Vybrid board.  Power up the Vybrid board. MQX RTOS Bootloader prints out the following message on default console (RS232 TWR-SER) and start execution of M4 and A5 applications. The pingpong example image files are copied to the root directory on the bootable SD card.
  • Page 15: Mqx Rtos Task Aware Debugging

    Stop the selected core and debug the booted image. 3.4 MQX RTOS Task Aware Debugging MQX RTOS Task Aware Debugging plug-in (TAD) is an optional extension to a debugger tool which enables easy debugging of multi-tasking applications. It helps to visualize internal MQX RTOS data structures, task-specific information, I/O device drivers, and other MQX RTOS context data.
  • Page 16 Figure 18-Plugins ® Getting Started with Freescale MQX™ and IAR Embedded Workbench , Rev. 5, 04/2015 Freescale Semiconductor...
  • Page 17 3.4.2 Using MQX RTOS TAD Screens Using the MQX RTOS or RTCS menu in IAR IDE main window, several TAD “screens” may be opened during the debugging session. Figure 19- MQX RTOS TAD screens The most helpful and frequently used screens are shown in the images below: ...
  • Page 18  Stack Usage Summary – displays information about interrupt and task stacks. Typically, a stack overflow is a root cause for vast majority of problems in MQX RTOS user applications. Figure 21 – Stack usage summary  Memory Block Summary (or Lightweight Memory Block Summary) – displays address, size, and type information about each memory block allocated in the default memory pool by the MQX RTOS system or applications.
  • Page 19 Figure 23- Lightweight semaphore summary ® Getting Started with Freescale MQX™ and IAR Embedded Workbench , Rev. 5, 04/2015 Freescale Semiconductor...
  • Page 20 “Break” red-hand toolbar button. In the MQX RTOS menu, in the IAR IDE main window, select the “Task List” item at the top of the menu. The Task List view opens at the top of the window and gives you a list of all running tasks.
  • Page 21: Using The Mqx Rtos Debugi/O Driver With Ewarm Ide

    4 Using the MQX RTOS DebugI/O Driver with EWARM IDE The MQX RTOS provides the DebugIO driver allowing the processor to communicate with PC host computer via a debugger probe. The DebugIO channel can also be used as a default console for standard input and output operations.
  • Page 22 The console can be opened during debugger session using the View / Terminal I/O menu in the EWARM IDE. Figure 26- Terminal I/O ® Getting Started with Freescale MQX™ and IAR Embedded Workbench , Rev. 5, 04/2015 Freescale Semiconductor...

This manual is also suitable for:

Iar embedded workbench

Table of Contents