MCUXpresso General Knowledge Base

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

MCUXpresso General Knowledge Base

Labels

Discussions

Sort by:
MCUXpresso Supported Devices Table Supported devices and boards can also be viewed by searching within the MCUXpresso SDK Builder, please visit https://mcuxpresso.nxp.com/en/select. 
View full article
Introduction Graphical user interfaces (GUIs) have become increasingly popular and have richer graphics than ever before, but creating these displays can be time consuming without help. With time to market being such an important factor in product development, it is important to have a tool to speed up the development of GUIs for your products. SEGGER's AppWizard is a GUI development tool that does just that, by helping you create ready to run GUI applications (built on top of SEGGER's emWin graphics library of course). This document will show you how to create a new AppWizard project and add a background image to get you started on GUI project. We will be using the i.MX RT1050 but the directions should apply to any device that is supported by emWin in the MCUXpresso SDK. Environment SEGGER AppWizard v1.0 or later NXP MCUXpresso IDE v11.0.1 or later MIMXRT1050-EVKB MCUXpresso SDK for the MIMXRT1050-EVKB (including emWin) Downloading and installing the MCUXpresso SDK The first step is to download and install the MCUXpresso SDK for the device you are working with. Make sure that emWin is included as an optional software component. Refer to the video Getting Started with emWin and MCUXpresso if you need instructions on how to do this.  Downloading and installing AppWizard AppWizard can be downloaded from the NXP emWin Libraries Download tab. Navigate to www.nxp.com/emwin-graphics-libraries, click on the download tab, and then click on Download next to the AppWizard Application Development Tool.    Clicking this link will download an installer to your PC. Just run the installer and follow the prompts to install AppWizard to your PC. Remember that NXP recommends selecting defaults for any install options present.   Importing an SDK example Before creating your new AppWizard project, a space to save and export the generated files to is needed. NXP recommends importing the simplest example to use as a template: the emwin_serial_terminal demo. To import this example, follow these directions. Open MCUXpresso IDE and select any workspace desired. In the Quickstart Panel, select Import SDK examples.                                                             Select your Board or Device. Make sure your board or device is supported by emWin in the SDK. For this example, we will select the evkbmimxrt1050.  In the next dialog box, locate the emwin_examples group in the Examples category and expand it.  Select the emwin_serial_terminal example.  Note that here you can also give your project a descriptive prefix or suffix.    Creating a new AppWizard project After the example project has been created, the AppWizard project can now be created, as there is a location to save the project and keep the generated files. Perform the following directions to create a new AppWizard project.  First open AppWizard.  If this is the first time you have opened AppWizard, it will prompt you to create a new project, open a project, or cancel (which would simply close the application).  If so, select "Create new project".  If not, you can select File->New project.   A dialog box with extra options will pop-up.              Select Browse to choose a destination folder for the AppWizard generated files.  It is recommended to choose a location local to the project you just imported. This will be located in the workspace location you chose when starting MCUXpresso.  The next step is to give your AppWizard project a name.  It is recommended to choose the same name as the MCUXpresso project appended with "_AppWizard" as shown below.                                                              Now, you can either select a BSP                      If you select a BSP, make sure you select the BSP for your board.   Or manually select the display size and color format if the device and display you are using is not available in a predetermined BSP.   (NOTE:  If you don't select a BSP, you will need to create the Target/GUI_Lib folder manually to get this tutorial to work. The directions for this are presented later in the document.)                                                                     The last three check-boxes are optional selections that enable SD-card support, bi-directional text support and Thai language support.   Finally, click Ok to create your new project.   In the newly created AppWizard project, a blank canvas will be displayed.   In the project folder, a new folder will be created named with the project named established in the creation of the project.  In this folder, there will be the AppWizard project you created, a Simulation folder (for holding the simulation files), Source folder (for holding the source files AppWizard will create) and a Target folder (that holds BSP files and library files).  (NOTE:  The target folder will not exist if you did not select a BSP.) If you did not select a BSP, manually create a Target folder in the evkbimxrt1050_emwin_serial_terminal_AppWizard folder.  Within the Target folder, create a GUI_Lib folder.  Then copy the header files from <root>/ProgramData/Segger/AppWizard_<version>/Lib/Include to the Target/GUI_Lib folder you just created.   Then copy the library from <root>/ProgramData/Segger/AppWizard_<version>/Lib/GCCM4 to the Target/GUI_Lib folder you just created.  (NOTE:  You could use the library in GCCM7FP if desired, but you would need to rename the library to libGUI.a and enable floating point support. ) Adding a background image to your AppWizard project Next, you will want to add a background image to your project and generate the files for use in your MCUXpresso project.  Follow these directions to add a background image to your project. Click Images on the left hand panel to bring up the Image Resource dialog box.                                                                                          In the Image Resource dialog box, select Add.                                                        This will allow you to select an image from anywhere on your PC. The file you will select will automatically be copied and placed in <AppWizard project root>/Resource/Image. Once you have added the images, they need to be added to the canvas. The first step to being able to add any objects (including images) to your blank canvas is to add a screen to the canvas. Drag and drop the screen icon onto the canvas to add a screen. With the screen added and selected, you should see the properties of the screen and can edit the properties if you need.  Now, add an image object to the screen, by clicking and dragging the Image icon to the screen you just added.  With the image selected, you can change the size, position, and name of the image from the window pane on the right side of the screen. Change the height and width to match that of the size of the screen and change to 0, 0.                                                                                                                 Using this control panel, click the arrow to the left of bitmap, and then click the square underneath bitmap to set the bitmap image to use for this image object.   Clicking the square brings up the Select image dialog box. Scroll to find the image you want to use, select it, and then click Select to use it as the image.   The image should now appear in the project as it would appear on your screen.  Finally, click File->Export and Save.  This will generate the AppWizard files necessary to program your development board.  Modifying your MCUXpresso project settings Once the AppWizard project files are generated, the MCUXpresso project needs to be modified to use the AppWizard files.  The MCUXpresso project should still be open from the previous directions in this document.  If not, go back and perform them to make sure the project is open.  The following directions detail how to configure your MCUXpresso project to use the AppWizard files.   In the MCUXpresso project, first find the AppWizard project folder in the MCUXpresso Project Explorer. Right click on the folder and select Properties as shown.   Select Settings in the C/C++ Build Category.  Ensure that "Exclude resource from build" is unchecked, and click Apply and Close.   Next, expand the AppWizard project folder and then expand the Target folder.  Right click on the Config folder and open the Properties dialog box.   In C/C++ Build -> Settings, be sure to check "Exclude resource from build". Then click Apply and Close.   Repeat steps 3 and 4 for the BSP, FS_Lib, OS_Lib, SEGGER, Shared, and Simulation folders.   Right click on the project and select properties to open the project properties dialog box.   In the C/C++ Build -> Settings category, select MCU C Compiler -> Architecture.  Change Floating point to None as shown.  In MCU Assembler -> Architecture and Headers, change Floating point to None as shown.   In MCU Linker-> Architecture, change Floating point to None as shown.      Next, in MCU Linker -> Libraries, change the library to "GUI" and change the search path to the location where the library is located.  (Note that in the file system on your PC, the library will actually be named "libGUI.a".  MCUXpresso should still be set to look for GUI.  MCUXpresso will look for a file that begins with "lib" and will remove this prefix when passing this library to the linker.)     The final step in modifying the project settings is adding the include search paths.  Under MCU C Compiler, select includes and ensure the following paths are included "${workspace_loc:/${ProjName}/evkbimxrt1050_emwin_serial_terminal_AppWizard/Target/GUI_Lib" "${workspace_loc:/${ProjName}/evkbimxrt1050_emwin_serial_terminal_AppWizard/Source/Generated" "${workspace_loc:/${ProjName}/evkbimxrt1050_emwin_serial_terminal_AppWizard/Source/CustomCode" "${workspace_loc:/${ProjName}/evkbimxrt1050_emwin_serial_terminal_AppWizard/Target/BSP/iMXRT1052_MIMXRT1050_EVK/Setup" "${workspace_loc:/${ProjName}/evkbimxrt1050_emwin_serial_terminal_AppWizard/Target/Inc" Also be sure to remove the following paths: "${workspace_loc:/${ProjName}/emwin/emWin_Config "${workspace_loc:/${ProjName}/emwin/emWin_header Modifying the project source After modifying the project properties, there are source file changes that need to be made since the original source was not intended to be used with AppWizard. Here are the source changes that need to be made to get you going.  Add APPW_X_NoFS.c to the project by simply copying this file into the Source folder in the file system on your PC. (Note that the APPW_X_NoFS.c file can be downloaded from the NXP emWin Libraries download tab.)  In the main source file, emwin_serial_terminal.c, comment out or delete everything underneath BOARD_InitLcd() as shown below.   Just underneath BOARD_InitLcd(), insert a call to MainTask() as shown.   Finally, open emwin_support.h (found in the board folder), change the LCD_BITS_PER_PIXEL to 32.  If you keep the default to 8, the background image will be loaded into the frame buffer because of how LCD_X_DisplayDriver was written.   Conclusion That's it for how to create a new project in AppWizard and how to add a background image. At this point, you should be able to compile and download your project to the target board. You should know how to import a simple SDK example to use as a template, create a new AppWizard project, add a screen and image to this project, modify the template project to use the AppWizard project source files and library, and how to modify the source to use the new AppWizard project.  
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-342727 
View full article
The Pins tool included in the MCUXPresso Config Tools can help you configure routing of individual pins. It's also capable of configuring modulation features of certain peripherals. Prerequisites MCUXpresso Config Tools OR MCUXpresso IDE NXP Kinetis processor with LPTMR, UART, or FTM peripherals supporting signal modulation Toolchain project using the MCUXpresso Pins tool Workflow If you want to configure signal modulation for LPTMR, UART, and FTM peripherals, you can do so by using the SIM option. In the Pins tool, select the Peripheral Signals view. From the list of peripheral signals, select SIM by clicking the box. In the Peripheral SIM window, choose the signal you want to route and the modulation signal. Signals available for modulations include the MOD string. In the Routable pins / signal routes, choose the pin / signal route. Update code by clicking Update code and build with your IDE/toolchain.
View full article
SWO is Serial Wire output, it is a debug interface of Cortec-M3 and M4 core. The SWO Trace provide access to the memory of a running target without needing to interrupt target. It just requires one extra pin from MCU in addition to the standard SWD connection. It is easy to send debug information. If want to know more detail about SWO Trace, you can have a look at <MCUXpresso_IDE_SWO_Trace> . The document of <MCUXpresso_IDE_SWO_Trace> has describe  SWO Trace function in detail, so in my article , I just demonstrate the steps using SWO Trace on MCUXpresso IDE, based on LPCXpresso54114 board.      - Requirements: MCUXpresso IDE v10.2.1 or later MCUXpresso SDK v2.4.1 for LPC54114 LPCXpresso54114 development board  micro USB cable  Personal Computer - Mainly      Using SWO Trace Based on NEW SDK Project and SDK Demo    3.1 Using SWO Trace Based on NEW SDK Project       Step1. Enable “Redirect printf/scanf to ITM”/Add “retarget_itm.c”       Step2. Enable SWO Pin       Step3. Enable SWO Trace clock       Step4. Add Code to Send Text       Step5. Download project       Step6. Configure MCUxpresso IDE       3.2 Using SWO Trace Based on SDK Demo BR Alice
View full article
There are three C/C++ libraries supported in MCUXpresso IDE, Newlib, NewlibNano, and Redlib.  Newlib is a standard GNU C/C++ LIB, includes comprehensive  functions. NewlibNano is optimized in size of Newlib. And Redlib provide much smaller applications,  it isn’t a GUN C library. MCUXpresso SDK demos use Redlib by default, some customers want to switch libary for balance code size and function. Especially for small memory embedded chip, recommend use Redlib. This document mainly includes two parts: 一.Different C/C++ libraries used in MCUXpresso IDE 二.Switch C Library in MCUXpresso IDE About detail information , you can also refer to <MCUXpresso_IDE_User_Guide.pdf>.
View full article
Many customer have a problem about that the bookmarks lost when import their projects into another workspace,you can find answer in this document. Bookmark is a simple way to navigate to resources that are used frequently.  Especially when there are many files and code in our project, adding Bookmark helps to enhance working efficiency. We can add bookmarks in individual files, also can create bookmarks for specific lines of text or source code or within a file.   I use MCUXpresso IDE as a demonstration,  Bookmarks is the feature of Eclipse, so KDS and CW are the same.   This DOC mainly includes three parts:      How to add and view Bookmark on MCUXpresso IDE.      How to keep bookmarks when open project in another workspace.      How to create shortcut for Bookmark.  Enjoy! BR Alice Yang
View full article
i.MX RT is NXP new product. Recently we often have customers asking the possible methods of programming code to i.MX RT in both developing stage and manufacturing stage. In this article, I will summarize the programming methods based on MIMXRT1050-EVKB board. 1.    Using MCUXpresso IDE programming 1.1.    Using MCUXpresso IDE debugger programming 1.2.    Program flash action using LinkServer/etc. 1.3.    Program target with GUI Flash Tool 2.    DAP-Link (OpenSDA MSD drag/drop) 2.1.    Boot Settings 2.2.    Check versions of SDK and DAP-Link 2.3.    Generate Binary file 2.4.    OpenSDA MSD drag/drop steps 3.    Using  MFGTool program with Boot 3.1.    Boot Settings 3.2.    Check versions of SDK and DAP-Link 3.3.    Generate Binary file 3.4.    Using MFGTool burning HyperFlash with BOOT
View full article
This document introduce how to flash two or more binary files using MCUXpresso IDE. Also can find some debug configuration methods in it. The DOC mainly includes two parts: -When using P&E Micro probe, how to flash two binary files. -When using LinkServer(CMSIS-DAP) probe, how to flash two binary files. Software: MCUXpresso IDE v10.0.2_411 Hardware: FRDM-K64 (Note:maybe there are other methods, here only introduce one of them that I used.)
View full article
Using CMSIS-DSP with MCUXpresso SDK and IDE Follow these steps to link the CMSIS-DSP library to a MCUXpresso SDK 2.x project using the MCUXpresso IDE. The steps described in the document were done using the MKL25Z MCU like the one in the FRDM-KL25Z board, but the same principles are applicable to any Kinetis MCU. Please make sure you have already created and installed the corresponding MCUXpresso SDK package to the MCUXpresso IDE, you can use following links as reference: Getting Started with MCUXpresso and FRDM-K64F  Generating a downloadable MCUXpresso SDK v.2 package  Creating a MCUXpresso SDK 2.x Project:   1) Click on the Import SDK example option from the Quickstart menu:   2) For this demonstration the Hello World example is used: 3) The new project should now appear on your workspace: Linking CMSIS-DSP Library:   1) The first step is to create a build variable that will be used to specify the path of the DSP library. Go to Project > Properties and under C/C++ Build select Build Variables and click on Add:   2) A new window will open, specify the name of the build variable, its type and value, the Value is the location of your CMSIS folder: Variable name: SDK_2.2_KL25Z_CMSIS_PATH Value: C:\nxp\SDK_2.2_FRDM-KL25Z_MCUX\CMSIS NOTE: The SDK_2.2_FRDM-KL25Z package was previously unzipped to the C:\nxp folder 3) The new variable should be listed as in the image below, click on Apply: 4) Go to C/C++ Build > Settings > MCU Linker > Libraries and specify the precompiled library to be used and its path: Library name: arm_cortexM0l_math.The M denotes the ARM core, while the ‘l’ means ‘little endian’. Path: ${SDK_2.2_KL25Z_CMSIS_PATH}\Lib\GCC 5) Now go to C/C++ Build > Settings > MCU C Compiler > Preprocessor and specify the following macro: ARM_MATH_CM0PLUS: Tells the CMSIS library which ARM Cortex core I’m using. Importing DSP example source files:   1) For this project the “FIR Lowpass Filter” example will be used, it can be found on the following path: ${SDK_2.2_KL25Z_CMSIS_PATH}\DSP_Lib\Examples\arm_fir_example\ARM   2) The first step is to copy the source files of the example to the project, the files that need to be copied are: arm_fir_example_f32.c arm_fir_data.c math_helper.c math_helper.h   3) The next step is to copy the SDK include files and initialization functions from the hello_world.c file to the FIR example file: #include "fsl_device_registers.h" #include "fsl_debug_console.h" #include "board.h" #include "pin_mux.h" BOARD_InitPins(); BOARD_BootClockRUN(); BOARD_InitDebugConsole();     4) Finally the hello_world.c file can be deleted from the project: 5) Now you should be able to compile and debug the project.   Related links: Generating a downloadable MCUXpresso SDK v.2 package  Getting Started with MCUXpresso and FRDM-K64F   Adding CMSIS-DSP Library to a KSDK 2.x project in Kinetis Design Studio 
View full article
Last month I had two local customers asked me how to use pin config and clock config tool with MCUXpresso SDK from start. They hoped to have an easy quick start guide to initialize their LPC54608 project developing. Therefore I wrote this article. Just for sharing. This article takes a hands-on example based on LPCXpresso54608 board, illustrating how to use online Pins Config and Clocks Config tool with MCUXpresso SDK from start, step by step. Although the article is based on LPC54608, it should also be helpful to the starter who uses MCUXpresso Config Tools for developing other Kinetis and LPC board as quick reference. With this article, you will learn:        How to use the Pins Config and Clocks Config tools to generate the initialization codes automatically.        How to start a new SDK project with support of Pins Config and Clocks Config tools generated files.   This article is a quick start guide only. For more information, please visit https://mcuxpresso.nxp.com/en/welcome https://community.nxp.com/community/mcuxpresso  and also the help manual inside the tool package.
View full article
The following labs have been created for showing how to use the MCUXpresso Software and Tools with the FRDM-K64F. Most of this material is already part of the FRDM-K64F Getting Started webpage (and LPC54608 OM13092 Getting Started webpage), but there's also a lab on how use the online SDK Builder tool.    Special thanks to Bryan Cole for putting most of this lab material together. 
View full article
What is MCUXpresso software and tools? The MCUXpresso toolkit include three components: MCUXpresso IDE – an integrated development environment (IDE) MCUXpresso SDK  –  embedded runtime software (drivers, stacks, middleware, RTOS), and MCUXpresso Config Tools - configuration tools in online and desktop editions that provide graphical user interfaces for creating system initialization software that is compatible with the MCUXpresso SDK.    Which devices are supported? MCUXpresso SDK A comprehensive list of supported devices is available in the Community document here. MCUXpresso SDK:   I'm using Kinetis SDK today. Should I move to MCUXpresso SDK? Yes, it is simple and seamless to move to MCUXpresso SDK. Moving to MCUXpresso SDK should have no impact on your current designs, as the new MCUXpresso SDK is based entirely on the Kinetis SDK v2.    I'm using LPCOpen today. Should I move to MCUXpresso SDK? LPCOpen packages that are already available continue to be maintained, and can be used with MCUXpresso IDE. Some LPC devices have both LPCOpen and MCUXpresso SDK support, but it is recommended that MCUXpresso SDK be used in order to take advantage of future updates and improvements.    Does the MCUXpresso SDK require use of the MCUXpresso IDE? No.  The MCUXpresso SDK will include many demo applications and usage examples with pre-configured MCUXpresso IDE projects, but will also include pre-configured projects for IAR Embedded Workbench, ARM Keil MDK, and GNU tools with Cmake build scripts.   Does the MCUXpresso SDK require use of the MCUXpresso Config Tools? No. The MCUXpresso SDK contains all the software needed to get started with embedded development on Kinetis and LPC devices.  However, the Config Tools can greatly accelerate development through the graphical interface that guides you through system configuration (including pins and clocks tools) If I want to continue using previous versions of Kinetis SDK or LPCOpen SDK, where can I download those? Kinetis SDK can be downloaded from www.nxp.com/ksdk LPCOpen can be downloaded from www.nxp.com/lpcopen MCUXpresso IDE:   I'm using Kinetis Design Studio IDE today. Should I move to MCUXpresso IDE? You can continue to use Kinetis Design Studio (KDS) IDE on your current project, as it will continue to be supported by the MCUXpresso SDK through the end of 2017. But, for any new projects you begin, you should migrate to MCUXpresso IDE (or other preferred IDE). MCUXpresso IDE is available now and has broad device support (see a list of supported devices in the Community document here). If you are starting a new desig, we encourage you to move to MCUXpresso IDE.     I'm using LPCXpresso IDE today. Should I move to MCUXpresso IDE? You can continue to use LPCXpresso IDE on your current project. However, MCUXpresso IDE includes full support for legacy and new LPC devices. The MCUXpresso IDE is very similar to the LPCXpresso IDE, and therefore, should be very familiar to you. We recommend moving to MCUXpresso IDE to take advantage of the latest improvements and to star up to date with GNU toolchain releases. 
View full article