MQX RTOS Training Knowledge Base

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

MQX RTOS Training Knowledge Base

Discussions

Sort by:
We are pleased to announce the release of MQX RTOS v4.2.  Important note on the roadmap: Future Freescale MQX RTOS releases will be part of the Kinetis SDK.  No future separate general releases of MQX RTOS 4.x are planned from Freescale. Contact Freescale Sales for availability of software and services.  MQX RTOS v4.2 Details Board Support Packages (BSPs) Supporting Kinetis K-Series MCUs & Vybrid MCUs TWR-K20D50M TWR-K20D72M TWR-K21D50M TWR-K21F120M FRDM-K22F NEW TWR-K22F120M NEW TWR-K24F120M NEW TWR-K40X256 TWR-K40D100M TWR-K53N512 TWR-K60D100M TWR-K60F120M TWR-K60N512 TWR-K64F120M FRDM-K64F TWR-K65F180M NEW TWR-K70120M TWR-VF65GS10 EVB-VF522R3 New Features and Updates MFS Updates – Multiple read/write support, improvements in directory & file search/seek, and general speed and code-size optimizations New USB Stack (Select MCUs only) – Simplified API, improved performance, reduced memory footprint, composite device support, more robust Hub support Driver Updates and Other Features New TLSF memory allocator (optional) for higher determinism / lower fragmentation RTCS Updates New Features – Websockets, Link-Local Multicast Name Resolution (LLMNR), GPRS modem example, iperf performance example, Secure webserver (HTTPs) example Sockets API updated for improved Berkeley Sockets compatibility New IPv6 protocols – DHCPv6 Client, Telnet Client, TFTP Client/Server, FTP Client [add-on for purchase] CyaSSL TLS/SSL [free add-on for evaluation] Tools support Kinetis Design Studio 3.0 IAR Embedded Workbench 7.40 Keil ARM-MDK 5.14 CodeWarrior 10.6 ARM® DS-5™ 5.20 GNU tools for ARM® 4.8-2014-q3-update Host OS Support Installers for Windows 7/8 & Linux (Ubuntu 13.10 and later) How to Get Started 1. Visit http://www.freescale.com/mqxrtos 2. Click Download 3. Log-in to Freescale.com if you have not done so already. 4. Click MQX RTOS v4.2 releases and patches 5. Review and accept or decline the license agreement terms 6. Click to download the file for your host OS (Windows .exe or Linux .gz) 7. Run the installer or extract the files On Windows, the default source directory is C:\Freescale\Freescale_MQX_4_2\ 8. Check out the release notes and getting started guides in the /doc directory  Enjoy!  Best of luck with your embedded projects! This document was generated from the following discussion: 
View full article
See thread Re: How To: Build and run the MQX HTTPS Server example with CyaSSL
View full article
The rev 0 version of the MQX RTOS Errata document is now available on the www.freescale.com in the documentation section of the following products: Freescale MQX RTOS Freescale MQX Lite RTOS Freescale MQX RTOS for Kinetis SDK The errata describe the following issues and their workaround: MQX-4887: MFS usbdisk example has the incorrect J-Link probe setting for KDS 2.0.0 and Atollic 5.2.0 MQX-4847: Possible directory corruption when files are added to the directory and directory spans more than one cluster
View full article
We are pleased to announce the release of MQX RTOS for Kinetis SDK v1.1. Boards Supported FRDM-KL46Z FRDM-K22F FRDM-K64F FRDM-KL25Z NEW FRDM-KL26Z NEW FRDM-KL27Z NEW FRDM-KL43Z NEW FRDM-KL46Z FRDM-KW24 NEW MRB-KW01 NEW TWR-K21D50M NEW TWR-K21F120M NEW TWR-K22F120M TWR-K24F120M TWR-K60D100M TWR-K64F120M TWR-K65F180M NEW TWR-KL43Z48M NEW TWR-KV10Z32 NEW TWR-KV31F120M TWR-KV46F150M TWR-KW24D512 NEW USB-KW24D512 NEW New Features and Updates General Updates RAM footprint optimizations New MQX Lite application examples MFS Updates – Multiple read/write support, improvements in directory & file search/seek, and general speed and code-size optimizations RTCS Updates New Features – Websockets, Link-Local Multicast Name Resolution (LLMNR), Secure webserver (HTTPs) example Sockets API updated for improved Berkeley Sockets compatibility New IPv6 protocols – DHCPv6 Client, Telnet Client, TFTP Client/Server, FTP Client [add-on for purchase] CyaSSL TLS/SSL [free add-on for evaluation] How to Get Started Note: As of Kinetis SDK v1.1, MQX RTOS components are available in the Kinetis SDK itself. 1. Visit http://www.freescale.com/ksdk 2. Click Download 3. Click KSDK v1.2.0 Mainline Release 4. Review and click to agree to the license terms if they are acceptable. 5. Click and installer for your Host OS. 6. Download and Install. On Windows, the default source installation directory is C:\Freescale\KSDK_1.2.0 7. Check out the getting started guides in the /docs directory. Enjoy!  Best of luck with your embedded projects! This document was generated from the following discussion: 
View full article
Here is a hands-on training session for MQX with KSDK.  The agenda for the content is: Overview of MQX RTOS and KinetisSDK MQX Integration with KinetisSDK HAL, Drivers, and OSA Overview Getting Started with MQX libraries and example apps HANDS ON -Building libraries, running hello world example Startup, initialization, and interrupt handling How to use the KSDK drivers with MQX HANDS ON –Using KSDK drivers in an MQX application Porting applications to custom hardware Using Processor Expert with MQX RTOS for KinetisSDK HANDS ON -Porting an app, modifying clock configuration USB Stacks and File System HANDS ON - Writing to USB flash drive Real-Time Communication Suite (RTCS) TCP/IP Stack MQX Support options Session summary The labs and lab guides are written for IAR toolchain using the FRDM-K64F board using KSDK v1.1.0.  Lab guides and instructions are included.
View full article
Hi MQX users, Attached you can find 6 simple Labs to introduce yourself to MQX Real Time Operating System. These Labs will walk you through all the steps you need to create simple projects using a Kinetis Device and some OS services. Content: - Building MQX Libraries - Creating and debugging new MQX project - Using Tasks - Using LW GPIOs - Using Events and Mutex - Using LW Semaphores I hope you find them useful. Best regards, Carlos
View full article
New to MQX RTOS?  Get up to speed quickly with the Essentials of MQX RTOS Application Development online video series.
View full article
Hi, Check out this new porting guide.  It includes information on paths and project configurations in MQX RTOS for Kinetis SDK v1.2. Porting an MQX RTOS Application to MQX RTOS for Kinetis SDK http://cache.freescale.com/files/soft_dev_tools/doc/support_info/MQXKSDKPUG.pdf?fpsp=1&WT_TYPE=Users%20Guides&WT_VENDOR=… Contents 1 Introduction ....................................................................... 1 2 Why port?..........................................................................  2 3 What is different in the new Kinetis SDK-based    architecture? ......................................................................2 4 Overview of porting application.......................................... 5 5 Porting the Application....................................................... 6 6 Conclusion ...................................................................... 28
View full article
In the future all official communications from Freescale related to MQX RTOS will be posted here. So be sure to follow this space! How to automatically get an email when anything is posted here 1. Log in 2. Click the down arrow next to your name in the top right corner. Then click Preferences. 3.  In Email Preferences, set Inbox to On. With this setting, anything that arrives in your community inbox will generate an email to you. Click Save. 4. On the top left of the space, click the Following in button. Choose to follow this space in your community inbox. Click Done. You are done! Now, you will be notified via email if anything is posted to the space.
View full article
Are you ready for IPv6? The worldwide transition to IPv6 networking is in progress.  Many governments and organizations have already mandated IPv6.  Are your connected products going to be ready? If you need a full-featured traditional host stack with Ipv6 support, Freescale MQX software has a solution for you.  You can even run Ipv4 and Ipv6 at the same time to ease the transition. Check out www.freescale.com/mqx/ipv6 for details and documentation. How to get IPv6? Purchase the add-on at the link above (evaluation available – see below).  The MQX TCP/IP stack (RTCS) supports IPv6 with this optional add-on patch.  Purchasing the add-on gets you all the source code and a year of basic support. How to Evaluate MQX IPv6? Freescale offers a 90-day evaluation of a pre-compiled library for a single low-cost Freescale development platform and toolchain.  In the future, evaluation versions are planned for a broader list of development platforms and toolchains. To evaluate MQX IPv6 today, you will need: MQX RTOS v4.1.1 FRDM-K64F, Freescale Freedom Development Platform for Kinetis K64 IAR Embedded Workbench® for ARM® v7.10.3 Note: Although the evaluation only covers a single board and toolchain, MQX RTCS with IPv6 source code can be purchased for ALL Freescale MCUs and tool-chains supported by MQX RTCS. If you need an evaluation library to support a different board or tool-chain, let me know! Step-By-Step Instructions 1. Obtain a FRDM-K64F Freedom development module from Freescale or a Freescale-authorized distributor (Details at www.freescale.com/frdm-k64f). 2. Plug in the USB cable for the debug connection and the Ethernet cable for the network connection between the board and your computer. 3. Download IAR for ARM® v7.10.3 or later (30-day evaluation available at www.iar.com). 4. Install MQX RTOS 4.1.1 (Available at www.freescale.com/mqxrtos). 5. Now get the evaluation package.  Go to www.freescale.com/mqx/ipv6. 6. Click the Download button, or download tab 7. Click IPv6 for MQX RTOS TCP/IP Stack (90-Day Binary Evaluation) 8. Read the software license agreement.  If it works for you, click I Accept. 9. After you accept, the zip file (e.g. Freescale_MQX_4_1_1_IP6_EVAL.zip) will download. After it downloads, extract the files to the root directory of the MQX 4.1.1 installation (a.k.a. <Freescale_MQX_4_1> directory).  The default for Windows is C:\Freescale\Freescale_MQX_4_1\. Note: The package does not overwrite or corrupt any MQX files.  It just adds new ones. 10. Open the readme file readme_ip6_eval.txt. The steps in this guide are listed there also. 11. Build the BSP, PSP, RTCS, MFS, and SHELL libraries for FRDM-K64F   a. Open IAR Embedded Workbench   b. Go to File…Open…Workspace.  Browse to <Freescale_MQX_4_1>\build\frdmk64f\iar   c. Open build_libs.eww 12. Got to Project…Batch Build…  (or press F8) Choose Debug Note, if you are trying to achieve the smallest code size, choose Release instead. Click Make Note: Even though this evaluation provides separate pre-compiled RTCS and SHELL libraries enabled with IPv6. Building RTCS and SHELL is needed to copy over RTCS header files into the appropriate \lib\ folder, which is referenced by application projects.     Wait for the libraries to finish building. 13.  Now, open an example project that has already been configured to use the special Ipv6-enabled rtcs and shell libraries that come with the evaluation.            Available example projects: HTTP Server example RTCS Shell example For this tutorial, I will show the HTTP Server example.      Select Project...Add Existing Project... and browse to <Freescale_MQX_4_1>\rtcs\examples\httpsrv\build\iar\httpsrv_ip6_frdmk64f 14. Double click on the project name httpsrv_frdmk64f Note: If you chose the Release option in the library builds: Right click on the dropdown box above the project explorer and select the Int Flash Release.  Otherwise chose Int Flash Debug, which is the default. 15. Choose Project… Make (or press F7) to build the project 16. Open the terminal program of your choice. Choose the COM port for the virtual serial connection provided by the board.  Choose 115200 baud. 17. Now, back in IAR. Choose Project…Download and Debug. Wait for it to download to the target and bring up the debug session.  Then click Go. You should see this in the terminal: Starting http server No.0 on IP 192.168.1.202 and fe80::200:5eff:fea8:1ca...[OK] Shell (build: Oct 13 2014) Copyright (c) 2013 Freescale Semiconductor; shell> shell> 18. Type help to see a list of other commands like ipconfig and ping. Windows includes IPv6 support already.  No configuration necessary.  Your computer will already have an auto-configured link-local Ipv6 address. 19. Now open a web browser 20. Type in the Ipv6 address of the board surrounded by brackets [fe80::200:5eff:fea8:1ca].  The webpage served by the board should appear. 21. You’re done.  You can now try out the shell example or use the Ipv6 evaluation library to evaluate it in your own application.  See below. Want to evaluate IPv6 in other applications? It’s easy. 1. In linker options of a user application project, replace the rtcs.a library by rtcs_ip6.a, and the shell.a library by shell_ip6.a 2. In C/C++ compiler preprocessor of a user application project, add defined symbol "RTCSCFG_ENABLE_IP6=1". 3. After that, the application is able to communicate over RTCS IPv6 communication. Best of Luck! Post any comments or feedback you have. Mac
View full article
We are pleased to announce the release of MQX RTOS for Kinetis SDK v1.3. Boards Supported FRDM-K22F FRDM-K64F FRDM-KL46Z FRDM-KW24 FRDM-KL43Z FRDM-KL27Z FRDM-KL25Z FRDM-KL26Z USB-KW24D512 MRB-KW01 TWR-K22F120M TWR-KV31F120M TWR-K24F120M TWR-K64F120M TWR-KV10Z32 TWR-K60D100M TWR-KL46Z TWR-K21D50M TWR-K21F120M TWR-KW24D512 TWR-KL43Z48M TWR-K65F180M New Features and Updates MQX RTOS - version 5.0.3 Updates MQX RTOS Kernel has been updated to address several issues related to the task restart and the timer component RTCS - version 4.2.0 Updates The CyaSSL 3.3.0 was upgraded to the WolfSSL version 3.4.6. The location of the library was changed from the middleware/tcpip/rtcs/source/ssl to the middleware/security/wolfssl. The library usage is demonstrated in the middleware/tcpip/rtcs/examples/httpsrv example application. Other Updates Added two example applications demonstrating the Kinetis cryptography capabilities - WolfSSL crypto library benchmark : \examples\<board>\demo_apps\security\benchmark_wolfssl How to Get Started Note: As of Kinetis SDK v1.2, MQX RTOS components are available in the Kinetis SDK itself. 1. Visit http://www.freescale.com/ksdk​ 2. Click Download 3. Click KSDK v1.3.0 Mainline Release 4. Review and click to agree to the license terms if they are acceptable. 5. Click and installer for your Host OS. 6. Download and Install. On Windows, the default source installation directory is C:\Freescale\KSDK_1.3.0 7. Check out the getting started guides in the /docs directory. Enjoy!  Best of luck with your embedded projects!
View full article
How To: Create an MQX RTOS project with Processor Expert in Kinetis Design Studio IDE (This is an update and extension of Derek Snell's post:MQX with KSDK and Processor Expert.  Thanks Derek!) There are a few different methods to get started with MQX RTOS for Kinetis SDK.  One of which is using Kinetis Design Studio with Processor Expert.  Processor Expert provides a graphical interface for configuring your project and adding useful software components. Important Note #1:  In the past, Processor Expert included MQX Lite and MQX components.  With the release of the Kinetis SDK, there is a new MQX_KSDK component that is suitable for configuring the version of MQX RTOS that comes with the Kinetis SDK.    Be sure to use the new component!  Important Note #2: New Kinetis Design Studio projects enabled with Kinetis SDK and Processor Expert use an Operating System Abstraction (OSA) component which is used to select which RTOS (or no RTOS – baremetal) option you are using.  The OSA component will inherit in the selected RTOS component for you. So, don’t add in MQX_KSDK yourself. Let the OSA do it.           The following instructions are based on Kinetis SDK v1.1 and Kinetis Design Studio IDE v2.0 Steps Install Updates See section 5.2 in the Getting Started with Kinetis SDK guide. Create a New Kinetis Design Studio Project Name it. Click Next. Select a Board (or Processor if you prefer - this changes the steps slightly.) Click Next. Choose Kinetis SDK and Processor Expert Click Finish. Now you have a new Kinetis SDK project that is ready to be configured with Processor Expert. In the Components window, under Components, open the OSA component The Component Inspector window will now show you the Properties and Methods for that component. From the OS dropdown list, choose MQX_KSDK as your OS Now you need to set up the MQX_KSDK component for use in your project. Open the MQX_KSDK component (inherited by the OSA component) Select the Configuration parameters tab In the Configuration set, you have the choice of MQX Lite and MQX Standard. For this first example, I will chose MQX Lite. MQX Lite is a light weight configuration of MQX RTOS offering a subset of capabilities.  MQX Lite uses static memory allocation by default.  If you want to use the RTCS TCP/IP stack, MFS file system, dynamic memory allocation, or some of the advanced features of MQX RTOS, use MQX Standard. Now select the Shared components tab.  You can see that it uses the DbgCs1 component for serial communications. Click on the DbgCs1 component You need to tell it which UART should be used for the DbgCs1 component (default serial port). On the FRDM-K64F, UART 0 connects to the on-board debug circuit for virtual com port to the host PC. It is a bit confusing, but the signal names on the schematic, on the debug circuit side, say UART1_RX_TRGMCU and UART1_TX_TRGMCU For Device, choose UART0. Then pick a baud rate – I chose 115200.  Then select the Pins to be used.  This uses the net names for the signals on the schematic. For the selected baud rate 115200, I get an error that says that not all of the clock configurations of the system can support it. Timing setting failed in Clock configuration 3 – it is impossible to set the following items: selected value The CPU component comes pre-configured with 4 clock configurations that can be utilized in your system.  These are very useful for switching between different clock modes in your application for power savings. One of these clock configurations can’t do 115200, so I need to either change the baud rate or change the clock configuration.  For this example, I am just going to delete the clock configuration because I am not going to use it. Click the Cpu component. Click Clock configurations Then select Clock configuration 3.  Click the down arrow v to lower it to the bottom of the list. Then click – to remove. There is one more configuration required in the DbgCs1 component.   It is related to its inherited component, the fsl_uart_hal (hardware abstraction layer for the UART). Click on the DbgCs1 component again. Click on the arrow next to fsl_uart_hal. And choose UART 0 Now you should have no errors. Now, add some tasks.  Processor Expert provides an OS_Task Component that will configure and generate the code framework for tasks. Click Components Library. Under Operating Systems, double click OS_Task to add tasks. Click on the task components to configure them. Click the Generate Processor Expert Code button. The code will generate (update the configuration files for the Kinetis SDK).  Wait until that finishes. The MQX source code is here. The task code is here. Write your tasks!  You can write native MQX RTOS function calls as well as Kinetis SDK driver and HAL calls.  Just make sure to include the appropriate header file for the MQX or KSDK feature you use and add to the paths if necessary. Now click the build button Your new project will compile and link into a file for downloading and debugging on the target. Hope this helps!  Send me your feedback! Mac L
View full article
Hi everybody, Please find attache the UPDATED version of this guide using KDS3.0 and KSDK1.2. As there is not a New Project Wizard for MQX projects it is necessary to create it manually. These guide explains 2 different ways to do it. I am very sorry for the inconvenience and confusion that the previous version caused. For information about creating a new KSDK project without RTOS (bareboard) please see the following document. Writing my first KSDK1.2 Application in KDS3.0 - Hello World and Toggle LED with GPIO Interrupt For information about porting a classic MQX RTOS project to a MQX RTOS for KSDK project please see the document below: http://www.freescale.com/files/soft_dev_tools/doc/support_info/MQXKSDKPUG.pdf?fsrch=1 For information about creating a new C++ project in MQX for KSDK1.2 please see the following document. How to Create a C++ Project Using MQX RTOS for KSDK1.2 For information about getting started with FreeRTOS and KSDK1.2 see the following document. How to: Create a New FreeRTOS for KSDS1.2 Project in KDS3.0 Best regards, Carlos Musich Technical Support Engineer
View full article
Introduction The KSDK provides a high level API for peripheral drivers and OS functions in MQX. A key aspect of the peripheral driver implementation involves the use of interrupts. These interrupt events are handled by specific IRQ handlers in the KSDK peripheral driver. However, the standard CMSIS style IRQ hander naming cannot be used by an application running in MQX because those names are reserved. This document provides a guide to implementing the IRQ handlers provided by the KSDK in MQX. IRQ Naming The device startup assembly code provided in KSDK defines weak instances of the IRQHandlers for each of the interrupt vectors on the device. In bare metal applications, when using KSDK peripheral drivers these IRQHandler names are re-declared in the associated ‘fsl_xxx_irq.c’ file. This then points the NVIC to use those functions over the weak functions with the same name. However, when using MQX this is no longer possible as the MQX kernel requires those IRQHandler names for its own interrupt handling. It is therefore necessary for the application developer to use a different name for the peripheral driver IRQ handler. The convention used in KSDK is pre-append the IRQHandler name with MQX_. For example, /* IRQ Handler prototypes */ void MQX_SPI0_IRQHandler(void); The function prototype above can now be installed in MQX by the application developer to handle peripheral driver interrupts. We will cover interrupt handler installation in the next section. IRQ Handler Installation In MQX it is required for the application to install IRQ handlers. KSDK provides a function to handle this in the OSA (Operating System Abstraction) layer. The following function allows the application developer to install the appropriate IRQ handler to the interrupt that will be triggered. //Install IRQ handlers OSA_InstallIntHandler(SPI0_IRQn, MQX_SPI0_IRQHandler); The ‘OSA_InstallIntHandler’ function requires the vector table number for the interrupt in question, as well as the name of the IRQ handler that will be used in the application. Once installed, MQX will execute this handler when the related interrupt is triggered. IRQ Priorities Setting appropriate interrupt priorities is important in MQX applications. MQX uses 8 priority levels that are mapped to the interrupt priority levels in the Cortex-M4 core. Table 1 illustrates the mapping between MQX and hardware. Table 1: MQX to Hardware priority mapping. MQX Priority BASEPRI 0 Not Allowed 1 0x20 (Priority 2 in NVIC_SetPriority) 2 0x40 (Priority 4 in NVIC_SetPriority) 3 0x60 (Priority 6 in NVIC_SetPriority) 4 0x80 (Priority 8 in NVIC_SetPriority) 5 0xA0 (Priority 10 in NVIC_SetPriority) 6 0xC0 (Priority 12 in NVIC_SetPriority) 7 0xE0 (Priority 14 in NVIC_SetPriority) >7 0x00 (Lowest priority) To ensure proper MQX application behavior it is recommended to adhere to the following when using NVIC_SetPriority to set interrupt priorities: Priority should be an even number Priority level should be greater or equal to 2 times the value of MQX_HARDWARE_INTERUPT_LEVEL_MAX MQX_HARDWARE_INTERRUPT_LEVEL_MAX is located in the MQX_init_struct structure. In the MQX examples provided by the KSDK installation the MQX_init_struct structure is defined in ‘mqx_main.c’ as follows: const _WEAK_SYMBOL(MQX_INITIALIZATION_STRUCT MQX_init_struct) = /*! \endcond */ { /* PROCESSOR_NUMBER                */  BSP_DEFAULT_PROCESSOR_NUMBER, /* [KPSDK-2559] Workaround to make TAD happy. With new version of TAD START_OF_KERNEL_MEMORY and END_OF_KERNEL_MEMORY can be removed */ /* START_OF_KERNEL_MEMORY          */ &kernel_data_prv, /* END_OF_KERNEL_MEMORY            */ BSP_DEFAULT_END_OF_HEAP, /* INTERRUPT_STACK_SIZE            */ BSP_DEFAULT_INTERRUPT_STACK_SIZE, #if MQX_CUSTOM_MAIN /* TASK_TEMPLATE_LIST              */  NULL, #else /* TASK_TEMPLATE_LIST              */ MQX_template_list, #endif /* MQX_CUSTOM_MAIN */ /* MQX_HARDWARE_INTERRUPT_LEVEL_MAX*/  BSP_DEFAULT_MQX_HARDWARE_INTERRUPT_LEVEL_MAX, /* MAX_MSGPOOLS                    */  BSP_DEFAULT_MAX_MSGPOOLS, /* MAX_MSGQS                       */  BSP_DEFAULT_MAX_MSGQS, /* IO_CHANNEL                      */  BSP_DEFAULT_IO_CHANNEL, /* IO_OPEN_MODE                    */  BSP_DEFAULT_IO_OPEN_MODE, #if MQXCFG_PREALLOCATED_SYSTEM_STACKS /* INTERRUPT_STACK_LOCATION        */ mqx_interrupt_stack, #else 0, #endif /* START_OF_HEAP                   */  BSP_DEFAULT_START_OF_HEAP, /* END_OF_HEAP                     */  BSP_DEFAULT_END_OF_HEAP, }; The MQX_HARDWARE_INTERUPT_LEVEL_MAX constant is defined as BSP_DEFAULT_ MQX_HARDWARE_INTERUPT_LEVEL_MAX in this MQX_init_struct structure. Where BSP_DEFAULT_ MQX_HARDWARE_INTERUPT_LEVEL_MAX is defined in ‘bsp_config.h’ as: #ifndef BSP_DEFAULT_MQX_HARDWARE_INTERRUPT_LEVEL_MAX     #define BSP_DEFAULT_MQX_HARDWARE_INTERRUPT_LEVEL_MAX        (2L) #endif For the interrupt we have shown examples for above, the interrupt priority would be set as such: //Set IRQ priorities NVIC_SetPriority(SPI0_IRQn, 6U); Priority 6 is greater than 2 times the value set in the MQX_init_struct by BSP_DEFAULT_ MQX_HARDWARE_INTERUPT_LEVEL_MAX. Example Included with this document is a source file called ‘hello.c’. This file is a direct replacement for the ‘hello.c’ source file in the ‘hello’ example provided by the KSDK installation of MQX. The project can be located in the following directories (based on default installation settings): Windows C:\Freescale\KSDK_1.1.0\rtos\mqx\mqx\examples\hello Linux ~/Freescale/KSDK_1.1.0/rtos/mqx/mqx/examples/hello All that is required to run the new demo is to replace the ‘hello.c’ located in the directory above with the ‘hello.c’ included with document and a rebuild of the project. The concepts we have touched in this document are implemented in the new ‘hello.c’. Interrupt handler prototypes are declared near the top of the file, and the functions are defined at the end of the file. The OSA layer of KSDK is used to install interrupt handlers in the ‘dspi_task’ function. In addition, the ‘NVIC_SetPriority’ function is also used in ‘dspi_task’ to properly configure the interrupt priorities. The new ‘hello.c’ will work in IAR EWARM, Keil MDK-ARM, Kinetis Design Studio, Atollic TrueSTUDIO, and with command line ARM GCC tools. No changes are made to the serial connection configuration. Successful completion of the example should show the following in the terminal window. Figure 1: Example of successful execution. NOTE: The demo uses the DSPI_DRV_EdmaMaster driver. Therefore, it is necessary to have a Kinetis device that supports this driver. The new source code was tested on FRDM-K64F. To successfully complete the DSPI eDMA loopback pins J2-8 and J2-10 need to be connected together on the FRDM-K64F. Conclusion This document should serve to help MQX application developers configure their code to make effective use of the interrupt driven KSDK peripheral drivers.
View full article
The Freescale MQX™ RTOS 4.2.0.1 patch release is now available on the www.freescale.com . This patch release is based on MQX™ RTOS 4.2.0. See list of fixed issues below.  For more details, and instructions on how to apply the patch, please consult the release notes. To get the patch: 1. Visit http://www.freescale.com/mqxrtos 2. Click Download 3. Log-in to Freescale.com if you have not done so already. 4. Click MQX RTOS v4.2 releases and patches 5. Click to download the 4.2.0.1 patch zip file. 6. Extract the files For instructions on how to apply the patch, please consult the release notes. High level overview of the issues fixed For details see the release notes. MQX-5540  Added checking of the heap low address and the heap high address against the memory address 0x20000000 to see whether the global variables reside on that address and issue warning to the user.  Affects all BSPs. MQX-4919  When the FFS file system is used and the buffer is destroyed while another task tries to acquire a new buffer, the deadlock occurs.  Affects all BSPs. MQX-5515  When two or more ENET devices try to access the PHY at the same time to get the connection status, the PHY returns an incorrect result.  Affected BSPs: TWR-VF65GS10, SVF522REVB, and TWR-MCF54418 MQX-5517  The serial driver using DMA does not receive data properly.  Affects all BSPs. MQX-5598  An error occurs when closing a file handler twice.  Affects all BSPs. MQX-5537  MFS dir read does not display correct data.  Affects all BSPs and MFS. MQX-5612  Missing tftfp.h header file in the installer package.  Affects all BSPs and RTCS (NAT enabled). MQX-5495  Missing protocol in the _mutatr_set_sched_protocol() function.  Affects PSP. MQX-5591  RTCS TCP has an issue with the TCP_Process_open function. If more than one are open at the same time, it locks up.  Affects all BSPs and RTCS. MQX-5496  MQX RTOS kernel clean up is performed incorrectly.  Affects PSPs. MQX-5575  The Ethernet hardware checksum is disabled in the default configuration for the TWR-K65F180M Freescale Tower System module.  Affects the TWR-K65F180M Tower System module. This document was generated from the following discussion: 
View full article
Here is a hands-on training session for MQX RTOS with KSDK Based on Kinetis Design Studio (KDS) v2.0.0 Kinetis SDK v1.1.0 FRDM-K64F The agenda for the content is: •RTOS Theory −Scheduling −Tasks Communication •MQX RTOS Basics −Tasks −LAB 1 – Get the Tools Working −LAB 2 – Using Tasks •MQX RTOS Services −Mutex −Semaphores −Events −Messages −Interrupt Handling −LAB 3 – Using MQX RTOS Services •MQX RTOS for Kinetis SDK −KSDK Architecture −MQX Integration with KSDK −Startup −BSP Configuration −Using KSDK Drivers with MQX −Other New Features •Ethernet Connectivity with MQX −Initialization −Sockets (Client-Server Model) −LAB 4 – Client-Server −Web Server −LAB 5 – HTTP Server −Ethernet Hardware •Memory File System •USB Stack −Overview, Diagram, Documentation •Using Processor Expert with MQX RTOS for KSDK −LAB 6 – Using PEx with MQX for KSDK •Hardware Support −Freedom Platform •IDE Options −KDS •Porting a MQX for KSDK Application •Installation •Evolution and Roadmap •Support and Resources
View full article