MQX Software Solutions Knowledge Base

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

MQX Software Solutions Knowledge Base

Discussions

Sort by:
A new patch, MQX v4.2.0.2, is now available at www.nxp.com/mqxclassic​.This release comes in one download that contains both .zip packages and patch files. See the Release Notes (attached) for a full list of issues that are fixed in this release. The Release Notes also contain instructions for how to install via the .zip or patch files. To Download the patch: 1. go to www.nxp.com/mqxclassic 2. Click the "Download" button (below the Overview paragraph) -- you may be prompted to Sign In 3. Click on "MQX RTOS v4.2 releases and patches" 4. Review and click through the license agreement 5. Click on "MQX 4.2.0.2 Patch.zip"
View full article
The new Freescale MQX™ 4.1.1 Cloning Wizard patch is now available on the www.freescale.com/mqxrtos ·         Patch Description o   BSP Cloning Wizard is now based on Eclipse 4.4 o   Kinetis Design Studio support for generating projects (libraries, examples) and working sets (.wsd files for Project of Projects plug-in) o   Remembering opened boards (cloned or opened by user) from previous application run o   BSP Cloning Wizard saves users selection of IDEs, Libraries and Examples in project generator section for all currently opened boards o   Fix the issue of the BSP Cloning Wizard not working in MQX 4.1.1 To get the patch follow the next instructions: Go to www.freescale.com/mqxrtos Click on the big Download Button.  - You will have to log in if you aren’t already.  Click on MQX RTOS for Kinetis, Vybrid, Coldfire v4.1.1….. The patch for the cloning wizard is on the list of files.
View full article
The attached document shows how to get the MQX4.1 Virtual Com Port Example. This document is located in the following path: C:\Freescale\Freescale_MQX_4_1\usb\device\examples\cdc\virtual_com Regards, Carlos
View full article
Rev0.2 - 8/28/2012 NOTE: for an update to this patch for MQX v4.0.2, see TWR-K21D50M lowpower MQX Patch for v4.0.2 This patch addresses several issues with using the lowpower example in MQX on the twrk21d50m BSP. The lowpower example is provided to demonstrate the MQX Low-Power Manager (LPM) driver, and change low-power modes on the K21 board.  The BSP provided in MQX v4.0 has several issues interfering with these low-power modes, and the lowpower example. To use this patch, copy the patch directory into the MQX v4.0 root directory.  The patch will over-write some existing files in the MQX installation.  The changes addressed by this patch include the following: User_config.h MQX_ENABLE_LOW_POWER macro enabled.  Required for LPM driver and lowpower example. VLPR Clock configuration dividers Updated the clock dividers in the SIM_CLKDIV1 register to set the core/system/bus clock frequencies at 2MHz as expected, instead of 1MHz.  Modified Cpu_SetClockConfiguration() in bsp_cm.c.  Fixes issue in lowpower example where characters printed to terminal are incorrect baud rate in VLPR mode. UART settings for LPM Operation modes BSP has incorrect settings for UART2 (TTYC) for the LPM operation modes.  Causes UART2 to be disabled in Run mode when MQX_ENABLE_LOW_POWER is enabled, which causes a bus error exception, stopping the BSP startup before main() is entered.  Modified init_sci.c Over-writing internal oscillator trim value The BSP was not using the factory trimmed settings for the internal oscillators.  The BSP is configured for a user-trim value to be stored at 0x3FE and 0x3FF.  The BSP checks these flash locations, and if not erased having 0xFF, it writes these locations to the MCG trim registers.  The issue is the vector table filled the vector location at 0x3FC, fooling the BSP into thinking user-trim value was present.  Modified vector.c to replace final vector with 0xFFFFFFFF, forcing BSP to keep the factory trim settings.  Fixes issue in lowpower example where characters printed to terminal are incorrect baud rate in VLPR mode. Disabled clock monitor when entering a stop mode BSP had clock monitor enabled in BSP, and did not disable before entering a stop mode.  This prevents the lowpower example from recovering properly from LLS mode. Modified _lpm_set_cpu_operation_mode() in lpm_smc.c to clear the CME bit before entering a stop mode, and then restore CME setting after waking up. Disabled SPI0 peripheral before entering a stop mode lowpower example was aborting the stop mode entry, and never entered stop mode.  The issue was caused by the SPI0 peripheral preventing the entry to LLS mode.  Modified _lpm_set_cpu_operation_mode() in lpm_smc.c to disable SPI0 clock gate before entering a stop mode, and re-enabled after waking up.  If SPI0 peripheral is required in a stop mode, register the SPI driver with the LPM driver to properly configure when LPM changes operation mode to a stop mode.  Refer to LPM documentation for details.
View full article
The new Freescale MQX™ 4.1 for TWR-K64F120M release is now available on the www.freescale.com ·         Files available # Name Description 1 FSL_MQX_TWRK64F120M_RELEASE_NOTES Freescale   MQX™ RTOS 4.1.0 TWR-K64F120M Release Notes 2 Freescale   MQX RTOS 4.1.0 for the TWRK64F120M Includes   an RTOS, File System, TCP/IP and USB host/device software stacks. Does not   require MQX™ 4.1 installation. ·         Target HW board o   TWR-K64F120M ·         New features o   PSP support for the K64F120M Microcontroller o   BSP for the TWR-K64F120M tower system module o   Standard set of I/O drivers supporting the K64F120M peripherals including: §  LWGPI/O driver §  Serial interrupt and polled driver §  DMI SPI driver §  I2C interrupt and polled driver §  ADC §  LWADC §  Flash Driver §  RTC Driver §  PIT Timer §  LPT Timer §  SD card driver §  SDHC §  FlexCAN §  SAI §  ENET o   USB Host and Device drivers and stacks o   Example and demo applications demonstrating MQX, USB, RTCS, and MFS usage o   RTCS TCP/IP stack o   MFS file system o   Shell command line interface ·         Known issues o   For known issues and limitations please consult the release notes.
View full article
Introduction Official support for MQX in KDS is slated for August of this year (2014), but what if you want to start building up your libraries now? Through Mingw and the files included in MQX 4.1, we can compile libraries and programs using KDS’ gcc_arm compiler. This is essentially a modification of the process used to compile MQX on a generic gcc_arm compiler. Original documentation can be found in: <MQX_ROOT_DIR> \doc\tools\gnu\MQX_GNU_Getting_Started.pdf I will try to explain a bit more of the setup process and the file changes that must be made to correctly compile, along with debugging your executable in processor expert. This guide is written for Windows and a version of the guide including a few screenshots of important screens is attached. Setup You will need: Mingw installed, along with mingsys-SED. This can be found at http://sourceforge.net/projects/mingw/ Make sure ‘c:\MinGW\bin’ has been added to system ‘PATH’ variable SED is part of a cmd improvement suite called mingsys. You can install the whole suite, but we only need SED KDS installed A suitable text editor that allows find and replace of text in all files of a selected directory. I recommend Notepad++ and it is what I will use in the tutorial. MQX file changes The original makefiles and batch scripts were created for gcc_arm v4.7.4, but KDS 1.0.1 is using 4.8.0. This means some directory paths have changed and these changes must be updated within MQX’s files. First, let us define the toolchain for the builder to use, in <MQX_ROOT_DIR> \build\common\make\global.mak, modify the following definition: ifeq ($(TOOL),gcc_arm)      TOOLCHAIN_ROOTDIR = <KDS_INSTALLION_DIR>\toolchain Endif Next we need to update the directory listings for gcc_arm components within its root directory. This comes down to replacing all instances of “/4.7.4/” with “/4.8.0/” in all ‘gcc_arm.mak’ files (you could choose to only edit the .mak files of boards you intend to use,  but it’s just as easy to replace all instances). In notepad++, this is simple process of running a “Find in Files”. The files themselves will be located in directories associated with building mqx for each platform: <MQX_ROOT_DIR> \mqx\build\make\<SPECIFIC_PLATFORM>\tools\gcc_arm.mak Along with some entries within application builds: <MQX_ROOT_DIR> \mqx\examples\<project>\build\make\<project>_<platform>\tools\gcc_arm.mak Lastly, specifically for demo application builds, there is one more directory change and one exclusion to make: remove ‘armv7e-m/’ from directory paths and comment out ‘libnosys.a’ (I must clarify I don’t understand the importance of libnosys and couldn’t find a suitable replacement with KDS’ gcc_arm toolchain. I have build hello2 successfully without it, but maybe other projects will require it) Again, this is a simple ‘Find in Files’, replacing “armv7e-m/” with no characters, then replacing the line: RT_LIBRARIES += $(TOOLCHAIN_ROOTDIR)/arm-none-eabi/lib/armv7e-m/softfp/libnosys.a With #RT_LIBRARIES += $(TOOLCHAIN_ROOTDIR)/arm-none-eabi/lib/armv7e-m/softfp/libnosys.a to comment it out. Building Libraries The build process is now incredible easy, as we can use the batch scripts provided in MQX to build our libraries. Either use “<MQX_ROOT_DIR> \build\<BOARD>\make\ build_gcc_arm.bat” to create the full set of libraries for the chosen board (bsp, psp, usb, shell, mfs,rtcs), or use any “build_gcc_arm.bat” found in the component and board area of your choice. These will automatically build the libraries and move the created libraries and code to ““<MQX_ROOT_DIR> \lib\<BOARD>.gcc_arm\” Note: when building full libraries the system will sometimes throw up errors when calling ‘mkdir’, saying that the folder structure already exists.  I have found if you re-run the script again it will not complain the second time and behaves fine. Building Examples So far only tested ‘hello2’on twrk60n512, but principles should apply to all boards and projects Again, we use the batch scripts provided in MQX, found in locations such as: <MQX_ROOT_DIR>\mqx\examples\<PROJECT>\build\make\<BOARD>\build_gcc_arm.bat Running these batch scripts will create another folder within the directory, called “gcc_arm”, in which you can find “initflash_debug” and “initflash_release”.  Inside each of these folders is your compiled application. Debugging your examples Now let’s actually do something in KDS: debugging the examples and showing that they work. For this you need to have a workspace (otherwise KDS won’t run), but you can close any open projects if you wish.  Then Click on the debug menu and select “Debug Configurations...” Double click on your chosen debug interface and under the option for “C/C++ Application”, choose browse and select the ‘.elf’ file from the ‘initFlashdebug’ folder of your application. I hope this helps some people who need to get MQX running through KDS before the official support becomes available. For information on when MQX will be supported on KDS, see https://community.freescale.com/docs/DOC-95477
View full article
Video Tutorial 1 of 6 for the iDigi Connector for MQX: Installing and Configuring the iDigi Connector for MQX (1 of 6) - iDigi Device Cloud More information and free download at http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=KINETIS_IDIGI_M2M
View full article
MQX RTOS Task Aware Debugging plug-in (TAD) is an optional extension to a debugger tool which enables easy debugging of multi-tasking applications. With TAD, we can inspect task contexts and kernel objects. Typical use cases include --view task error codes --Examine stack usage for each task --Examine memory usage -- Debug TCP reception problems --Examine socket and PCB data --Observe memory pool / message pool utilization levels -- Observe synchronization objects The following is a description of MQX task aware debugger and an example to debug a stack overflow. It is based on web_hvac demo in the MQX installation folder, it also applies to other applications. The MQX pull down menu is as below picture shows. The task summary window shows all the tasks in the system, the task name , task id , task state, priority and Task error code. The idle task is also listed since this is still treated by MQX  as a task, and can be helpful to know what’s happening with it. The stack usage window shows what percentage that allocated for a task interrupt have been used so far. This is a high watermark not the amount of the stack currently been used. If more than allocated stack is being used as some point, then you will see an over flow has been indicated at last column. Also for reference, the address for both the base for up and down are  shown. The kernel data window can be useful for confirming the environment you are running is actually what was loaded. You give them some key data such as the version of MQX running, the CPU, the PSP.  The settings of the time component and a number of the compile time configuration settings to confirm if you have things like the kernel logging or stack monitor turned on. The memory blocks window shows all of the blocks of memory that memory manager has currently reserved for kernel objects or application tasks.  Listed is starting address for each block , the size of each block in hexadecimal , who is the owner of each block.  Which can be either the system or specific tasks, and shows the type of block. We see different types such as the block for interrupts stack, system stack, task ready queue, block associated with interrupts.  The logging feature, message pools etc. Down to the bottom, we see the stacks specific memory blocks including the task descriptor and task space.  TAD knows what the task descriptor is so it gives all the information related to the task. The next group of windows  are related to various synchronizations  that MQX supports.  Such as semaphores and events ,mutexes. If some are greyed out and that because application doesn’t use it.  Example of Debugging with TAD In order to gain experience using the Task Aware Debugging (TAD) feature and to learn how it can be used to debug an application, I created a stack overflow in the shell task in web_hvac demo by reducing the task stack size from 2400 to 500. If I now run the application, we can see the application run into idle task quickly. Opening up the stack usage window, we see that indeed an overflow was detected. And that the stack information for the Shell task has been corrupted as a result.  The task summary window also has the corrupted information for the shell task. If you look closely, the listed tasks are short than before, and if you compare the list of tasks what you expected to be there. You noticed to shell task has completed disappear. But when we look at the console, we see that it clearly started. So where did it go? The stack overrun is a good clue. But also recommend scanning check for errors window. By reviewing the task summary, stack usage and errors windows, and doing a sanity check again the states values that expecting   can be very helpful ,make sure all the tasks are there. Check for error codes, and look for stack issues. To debug an application, the following steps should be follow: Review key TAD windows:                  Task Summary Window Stack Usage Window MQX Errors Window Audit various system parameters: -     Which tasks are running. -     Task states -     Check for identified errors -     Look for stack overflows
View full article
Freescale MQX incluye un BSP que soporta funciones y periféricos comúnmente usados. Sin embargo en aplicaciones muy específicas puede ser necesario el desarrollo o modificación de uno o varios “Drivers”. El siguiente documento explica cómo crear y agregar un nuevo driver al BSP en MQX. El documento está escrito en español. Espero que les sea útil. Saludos Sol
View full article
The new Freescale MQX™ 4.1.2 GA for Vybrid release is now available on www.freescale.com/mqxrtos ·      Files available                   # Name Description 1 Freescale MQX RTOS 4.1.2 for Vybrid Linux Base This   release has the same basic code as the 4.1.2 version, with just the changes   needed to build and debug on Linux systems. 2 Freescale MQX RTOS 4.1.2 for Vybrid MQX™ Source   code. Includes an RTOS, File System, TCP/IP and USB host/device software   stacks. Does not require MQX™ 4.1.1 installation. ·         What is New? ·         New Board Support Package ·         X-SVF522R-EVB Vybrid Evaluation Board Rev. B with the SVF522R3MK4 processor. ·         TWR-VF65GS10 Development Kit Rev. H with the MVF61NS10MK50 processor. ·         New Features and Updates ·         BSP package for TWR-VF600 was replaced by new TWR-VF65GS10 ·         Vybrid Auto EVB board was replaced by new X-SVF522R-EVB board ·         MFS library was updated ·         New USB stack was added ·         Exception support for cortex A kernel ·         Video ADC + VIU example application ·         RTCS package was updated ·         Known issues ·         For known issues and limitations please consult the release notes
View full article