MCUXpresso Training Hub

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

MCUXpresso Training Hub

Discussions

Sort by:
The Application Code Hub (ACH) is a repository that contains software examples, code snippets, application software packs and demos developed by NXP experts. ACH provides filter and search options to quickly find specific applications. With the support of Git capabilities, there is an easy way to import and use applications within IDE and tool environments. The Application Code Hub is accessible directly from MCUXpresso for Visual Studio Code and MCUXpresso IDE.    MCUXpresso for Visual Studio Code To access the Application Code Hub, navigate to the QUICKSTART PANEL.     You can use the search bar and the filters to help you find a specific example for your application or hardware.     Once an example is selected the attached README file will open. This file will contain a description of the project as well as technical details.  To import the project, the name field will automatically populate with the example project's name. Designate a location to save the project and click the Import Project(s) button. After, confirm the project and the toolchain at the top of the window as prompted.     If you are prompted to associate a repository, navigate to the PROJECTS section and add the device's SDK to the project. To do this: right click on the project and select Configure > Associate Repository. A dropdown menu will appear on the screen. Select the device's SDK from there. See the Getting Started guide if you have not yet imported the SDK.     You can now build the project. Navigate to the PROJECTS section and click the build button. The project should build successfully.      MCUXpresso IDE To access the Application Code Hub, navigate to the QUICKSTART PANEL.     You'll notice that the UI is slightly different from MCUXpresso for VS Code. However, the search and filtering mechanisms are relatively similar.     To import an example project, simply click on GitHub Link and then the Next button. In the following window click Next to keep the default settings. After, select a destination to store the project and click Next. On the following window, select to import as an existing Eclipse project and click Next. Last verify the project and click Finish.     The project will be added to the Project Explorer view. To build simply select the project in the Project Explorer view and click build.  **Note** The build button can be found in the toolbar at the top, in the Quickstart Panel, or by right-clicking on the project.  
View full article
Documentation MCUXpresso for VS Code Documentation    This training currently covers the following areas: Getting Started - Installation and importing SDKs Importing Projects from the MCUXpresso SDK  Working with SDK examples Zephyr: Getting Started in VS Code Zephyr: Hello World Zephyr: Kconfig Zephyr: Debug Zephyr: Devicetree  Zephyr: Revert Workspace Zephyr: Custom Board 
View full article
This getting started guide covers: Installation of the MCUXpresso for VS Code extension Dependency installations using the MCUXpresso Installler How to import SDKs
View full article
Overview The MCUXpresso SDK 24.12.00 is fully hosted on GitHub. Users are able to clone the SDK and easily keep up to date with changes. Version control transparency allows users to review commits, tags, diffs, etc.   Source Control The MCUXpresso SDK on GitHub is composed of multiple groups of software distributed among different repositories. The MCUXpresso SDK uses the popular west manifest to specify what software is included. This method of delivering software was inspired by Zephyr. The manifests folder contains the manifest file to initialize and update the west workspace. In the mcuxsdk folder you'll find the MCUXpresso SDK source code, examples, middleware integration and script files. Both of these folders contain a .git directory that contains information to track changes, branches, and history of the project.   Visual Studio Code: CLI To interact with the repo within VS Code through a CLI, open a Terminal. The Terminal can be opened from the menu in the top left of the screen. Alternatively, the Terminal and other monitors are hidden in a bar at the bottom of the screen. Navigate to the bottom of the screen, use the cursor to drag the bar and reveal the Terminal.   Once in the CLI, git commands can be run to track the status of the MCUXpresso SDK repositories.   Visual Studio Code: GUI The command line is useful for many things, however, sometimes a gui might be productive. The source control gui that VS Code provides can be accessed through the menu on the top left of the screen or in the extensions sidebar.   The source control gui in Visual Studio Code contains three sections: Source Control Repositories - These are the repositories that are currently visible to the workspace. Each repository contains a menu that allows the user to pull, push, navigate across branches, etc.     Source Control - This tracks changes made by the user. Here, you will see staged changes, commits, etc. *Note: Contribution to the MCUXpresso SDK is currently not open.     Source Control Graph - This provides a comprehensive overview of the project. The graph shows a representation of commits and their related data. The image below shows the source control graph for the MCUXpresso SDK. Hovering over a commit will show the author, commit date, documentation messages, and the commit ID.       Viewing Changes to source One of the main benefits of hosting the MCUXpresso SDK on GitHub is that enables better project management. Users now have access to the entire MCUXpresso SDK project history. Navigate to the Source Control Graph view and select any entry. Doing so will open the diff view highlighting the changes across the modified files in the commit.          
View full article
Visual Studio Code Documentation  This link leads to the documentation for Visual Studio Code. An overview of VS Code is provided as well as in-depth instructions for all its features.   MCUXpresso for VS Code Wiki  This is a link to the complete MCUXpresso for VS Code documentation. Installation as well as extension settings are covered. An overview of features is also provided.    
View full article
This guide covers: How to create a basic gui for your FreeMASTER project using Gui Guider Connection to FreeMASTER How to import FreeMASTER project file How sync the FreeMASTER project variables into a gui
View full article
Documentation FreeMASTER Documentation    This training currently covers the following areas: Getting started - Variables, communication with target, and project configuration Gui Guider integration   Other resources NXP Community - FreeMASTER 
View full article
Documentation Open-CMSIS-Packs Documentation    This training currently covers the following areas: Getting started - Installation and environment setup Build, Flash, and Debug Using partner packs - EmSA walkthrough Using partner packs - Crank Software walkthrough 
View full article
Brief Look at MCUXpresso SDK CMake projects   The CMakelists.txt file (as shown above) is used by CMake to configure the project build. This is a text file that contains both standard CMake functions such as include, project, etc. However, for projects found in the MCUXpresso SDK, you will also find MCUXpresso CMake extension functions.  The file shown above displays two MCUXpresso CMake extension functions. mcux_add_source - specifies the path to the project's source files. mcux_convert_binary - specifies the output binary format. For more information regarding this MCUXpresso CMake extension functions, reference the online SDK Documentation.   Building a Project using the CLI Once you have set up your environment and have obtained the MCUXpresso SDK, you can build projects from the command line. To do this, we will be using West commands. To begin, simply launch your preferred CLI and navigate to the directory where you have stored the MCUXpresso SDK. For the complete list of West commands available run: west -h     For this exercise, we will simply build the Hello World example project for the FRDM MCXA153. To do this, the command to run is as follows: west build -b frdmmcxa153 examples/demo_apps/hello_world   Breaking it down The build command that is shown above builds from the root directory of the SDK. In this particular version, the root is the mcuxsdk directory. There are many examples in the MCUXpresso SDK that are supported for many different devices. Hence, there is a need to specify the frdmmcxa153 with the -b flag. Since the build was performed from the root directory, the path to the project was also specified.  
View full article
GOAL Learn how to import CMSIS packs into existing projects. In this particular project, CMSIS packs from EmSA will be used alongside the lpcxpresso55s16_mcan_interrupt_transfer example obtained from the LPCXpresso55s16 SDK.   ENVIRONMENT This guide requires MCUXpresso IDE v11.9.1 or latest.   PROCEDURE 1. Import the lpcxpresso55s16_mcan_interrupt_transfer example into the workspace. In this example, SDK drivers, startup and board interface files are readily available. CAN pins are already routed and enabled.     2. Launch Config Tools to configure the clock for the CAN peripheral     3. Configure the clock for the CAN peripheral. I. Set up the main clock so that it is generated from crystal or oscillator, and it is evenly dividable by 40 MHz.   II. Change the PLL configuration an even multiple of 40 MHz   III. Set the CAN divider to get a 40 MHz clock.   4. Update the code.   5. Add Open-CMSIS Packs to the project.   6. Project set-up I. Add the watchdog driver.   II. Exclude the fsl_mcan.c module from the build. A dedicated version is included in the EmSA packs.   III. Add the main.c module from CMSIS template   IV. Exclude or remove the original main source code mcan_interrupt_transfer.c file.   7. Save and build the project.          
View full article
This video demonstrates how to quickly get started with Open-CMSIS-Packs  
View full article
Exploring CLI Build Options In a previous article, we demonstrated how to build a simple project using the CLI. However, we can easily build more complex projects using west build options. We can specify a specific toolchain, compiler, core, etc. To view the complete list of build options run the command: west build -h   Dual Core Device Example For single core devices there is no need to specify a core ID. However, this must be done when working with a dual core device. For example, to build Hello_World for the FRDM MCXN947, the following command needs to be run: west build -b frdmmcxn947 example/demo_apps/hello_world -Dcore_id=cm33_core0   Specifying a Toolchain The MCUXpresso SDK supports several toolchains. To take the example above and build for IAR, we simply specify the IAR toolchain with a build option as follows: west build -b frdmmcxn947 example/demo_apps/hello_world -Dcore_id=cm33_core0 --toolchain iar   Specifying a Different Build Directory As you can see the CLI is quick and easy to use for building projects. So far, we have covered some of the major build options to consider. What happens when we want to evaluate with different builds simultaneously? Well, we can specify different build directories within our workspace. To designate a different build directory for the project above, simply run: west build -b frdmmcxn947 examples/demo_apps/hello_world -Dcore_id=cm33_core0 --toolchain iar -d C:\temp-sdk\mcuxsdk\custom_build *Note the path shown has been personalized. The path for your system will vary.
View full article
Documentation MCUXpresso SDK Documentation  This training currently covers the following areas: MCUXpresso SDK - Intro to CMake and Kconfig  MCUXpresso SDK - CMake and Kconfig: Getting Started MCUXpresso SDK: CMake Usage - Part I   MCUXpresso SDK: CMake Usage - Part II MCUXpresso SDK: CMake Usage - Build Options MCUXpresso SDK: Kconfig Usage MCUXpresso SDK: Kconfig - Exercise MCUXpresso SDK: GitHub + VS Code  MCUXpresso for VS Code: Importing Projects from the MCUXpresso SDK  MCUXpresso for VS Code: Using Kconfig GUI with MCUXpresso SDK Projects     
View full article
This getting started guide covers: Preparation of project variables for visualization with FreeMASTER FreeMASTER communication with target Importing symbol files Adding variables to the FreeMASTER Variable Watch Creating visual components to visualize data for variables
View full article
Documentation eIQ Machine Learning (ML) Software Development Environment Fact Sheet eIQ Toolkit User Guide-This link takes you to the eIQ web page on nxp.com. Once there, click on the Documentation tab or scroll down to the Documentation section   This training currently covers the following areas: Getting Started with eIQ Includes in depth guides on how to get started on i.MX Applications Processors and Microcontrollers FAQs
View full article
This guide covers: How to import example projects from standalone SDKs How to build, flash and debug How to use the serial monitor
View full article
Documentation MCUXpresso Secure Provisioning Tool User Guide (Download)  MCUXpresso Secure Provisioning Tool Release Notes    This training currently covers the following areas: Getting Started with MCUXpresso Secure Provisioning Tool  i.MX RT10xx Secure Boot with PEmicro Production Programming  Secure Boot on the i.MX RT10xx Crossover MCUs  
View full article
GOAL Learn how to import CMSIS packs into existing projects. In this particular project, CMSIS packs from Crank will be used alongside the freertos_hello example obtained from the MIMXRT1060-EVKB SDK. Note: This walkthrough was adapted from Crank Software's guide included with their CMSIS Pack.   ENVIRONMENT This guide requires MCUXpresso IDE v11.9.1 or latest. MIMXRT1060-EVK SDK version 2.16 or latest.   PROCEDURE 1. Import the freertos_hello example into the workspace. Be sure to set the library type to Newlib (semihost).     2. Rename the project to freertos_sbengine.     3. Add drivers to the project. Right click on the project and select SDK Management -> Manage SDK Components. NOTE: Select Keep Existing and do not replace the FreeRTOSConfig.h file when prompted after adding the following components: Under Drivers -> Device -> SDK Drivers, select: cache elcdif pxp Under Board Components -> Device -> SDK Drivers, select: ft5406_rt Under Software Components -> Device -> SDK Drivers, select: video-common     4. Add additional components to the project. Add the gt911 driver if required by your display. This driver can be found in the MIMXRT1060-EVKB SDK.   Navigate to components/gt911:   Copy the fsl_gt911.c and fsl_gt911.h into the touchpanel directory in the project:     Change the memory manager configuration from the default used by FreeRTOS.   Remove the heap_4.c from the project folder. This is found in freertos/freertos-kernel/portable/MemMang.   Add the heap_3.c into the project folder freertos/FreeRTOS/portable/MemMang. This file can be found in the MIMXRT1060-EVKB SDK.     5. Download the Crank Software pack from Arm Keil | CMSIS Packs.     6. Import the Crank Software pack into MCUXpresso IDE.       7. The Crank Software pack is a graphics bundle that contains six components: Board Display Memory Runtime Libraries Runtime Source Task For this walkthrough, we will add all the components except the Runtime Source component. This component is intended for custom changes. To add the components, right click on the project and select SDK Management -> Add Open-CMSIS Components: Once the components are selected press Ctrl + s to save the components in the project.   8. Resolve conflicts from the previous freertos_hello project configuration. The Board component from the Crank Software pack includes a rewrite of pin_mux.c. Navigate to the board directory of the project and remove the pin_mux.c and pin_mux.h files.   MCUXPresso will automatically add the libraries from the runtime engine into the linker settings. In the project settings remove all the Storyboard engine libraries and plugins. To do this, right click on the project and select Properties. Remove all of the items found under C/C++ Build -> Settings -> Miscellaneous -> Other Objects.   Switch from a managed linker configuration to using the linker file included in the CMSIS pack. In the project settings, navigate to the MCU Linker -> Managed Linker Script. Uncheck the Manage Linker Script option and change the Linker script and Script path. Linker script = MIMXRT1062xxxxx_flexspi_nor.ld Script path= ${cmsis_pack_root}/CrankSoftware/iMXRT10xx/8.1.0/configuration/rt1060/ Note: The path will vary depending on where the user saved the pack.   Copy sbengine_task_pxp_template.c and sbengine_plugins_template.h from the RTE -> Graphics folder into the source folder of the project. Rename these files to remove template  from the name. The project source folder should now look like this:   Exclude the sbengine_task_pxp_template.c and sbengine_plugins_template.h files in the RTE -> Graphics folder from the build.      9. Configure and export a Model C/C++ Header from Storyboard Designer. Create a new project and name it sbengine_model. For this example, I will use a display size of 480x272, color depth RGB 565, and Freetype font manager.   Once the model has been exported, add the header file to the source directory of the project.   Note: For more information about exporting models from Storyboard Designer visit: Crank Storyboard - Exporting and Running on your Embedded Target.     10. Integrating the Storyboard Engine requires modifications to the following: FreeRTOSConfig.h file Locate this file in the source folder of the project and make the following changes: #define configFRTOS_MEMORY_SCHEME 4 #define configUSE_TIME_SLICING 0 #define configENABLE_BACKWARD_COMPATIBILITY 0 #define configTICK_RATE_HZ ((TickType_t)200) #define configUSE_NEWLIB_REENTRANT 0 To this: #define configFRTOS_MEMORY_SCHEME 3 #define configUSE_TIME_SLICING 1 #define configENABLE_BACKWARD_COMPATIBILITY 1 #define configTICK_RATE_HZ ((TickType_t)1000) #define configUSE_NEWLIB_REENTRANT 1   Preprocessor Defines Right click on the project and select Properties -> C/C++ Build -> Settings -> MCU C Compiler. Add the following defines to the “Defined symbols (-D)” pane: SKIP_SYSCLK_INIT XIP_BOOT_HEADER_DCD_ENABLE=1 GRE_TARGET_OS_freertos GRE_TARGET_CPU_cortexm7 GRE_TARGET_TOOLCHAIN_mcuxpresso GRE_FEATURE_VFS_RESOURCES   Change the SDK_DEBUGCONSOLE define from: SDK_DEBUGCONSOLE=0 to SDK_DEBUGCONSOLE=1   If you are using the gt911 touch driver, you will also need to add the following preprocessor define: SDK_I2C_BASED_COMPONENT_USED=1   Library paths. Right click on the project and select Properties -> C/C++ Build -> Settings -> MCU Linker -> Libraries.   In the Library Search path (-L) pane add: "${cmsis_pack_root}/CrankSoftware/iMXRT10xx/8.1.0/storyboard/runtime/freertos-mcuxpresso-cortexm7-swrender-DFP-obj/lib" "${cmsis_pack_root}/CrankSoftware/iMXRT10xx/8.1.0/storyboard/runtime/freertos-mcuxpresso-cortexm7-swrender-DFP-obj/plugins” Note: The path will vary depending on where the user saved the pack. This guide uses the complete configuration of the engine. Therefore, all of the following libraries need to be added in the Libraries pane (-l).  gre greal sbimage sbvfs gre-plugin-animation gre-plugin-lua gre-plugin-poly gre-plugin-circle gre-plugin-timer gre-plugin-logger gre-plugin-screen-path gre-plugin-greio gre-plugin-sbimage-soil gre-plugin-fio_vfs render-plugin-swrender logging-util greio sblua soil swrmgr swrender font-plugin-freetype sbfreetype sbpng sbz   Note: The library order matters. Add the libraries in the order listed above and click Apply and Close     11. Recall that this project was originally the freertos_hello example from the SDK. Therefore, modifications need to be made to the freertos_hello.c file to support the changes for this application. Ensure that the following headers are included: #include "board.h" #include "peripherals.h"   The define for the hello_task_priority is no longer needed and can be removed.    Place the following definitions outside of the main function: void sbengine_main_task(void *argument); void sbengine_input_task(void *argument);   Add the following two additional functions to the initialization sequence in the main() function: BOARD_InitSemcPins() BOARD_InitBootPeripherals().   Replace the hello_task code: if (xTaskCreate(hello_task, "Hello_task", configMINIMAL_STACK_SIZE + 10, NULL, hello_task_PRIORITY, NULL) != pdPASS) with: if (xTaskCreate(sbengine_main_task, "sbengine", 8192, NULL, configMAX_PRIORITIES / 2, NULL) != pdPASS)   Add the Storyboard Input handling task creation code block before the call to VTaskStartScheduler: if (xTaskCreate(sbengine_input_task, "StoryboardInput", 2048, NULL, configMAX_PRIORITIES / 2, NULL) != pdPASS) { PRINTF("Task creation failed!.\r\n"); while (1); }       The source code should now look like this: /* FreeRTOS kernel includes. */   #include "FreeRTOS.h" #include "task.h" #include "queue.h" #include "timers.h"   /* Freescale includes. */ #include "fsl_device_registers.h" #include "fsl_debug_console.h" #include "pin_mux.h" #include "clock_config.h" #include "board.h" #include "peripherals.h"     /******************************************************************************* * Definitions ******************************************************************************/ void sbengine_main_task(void *argument);   void sbengine_input_task(void *argument);   /******************************************************************************* * Code ******************************************************************************/ /*! * @brief Application entry point. */ int main(void) { /* Init board hardware. */ BOARD_ConfigMPU(); BOARD_InitBootPins(); BOARD_InitSemcPins(); BOARD_InitBootPeripherals(); BOARD_InitBootClocks(); BOARD_InitDebugConsole();   if (xTaskCreate(sbengine_main_task, "sbengine", 8192, NULL, configMAX_PRIORITIES / 2, NULL) != pdPASS) { PRINTF("Task creation failed!.\r\n"); while (1) ; }   if(xTaskCreate(sbengine_input_task, "StoryboardInput", 2048, NULL, configMAX_PRIORITIES / 2, NULL) != pdPASS) { PRINTF("Task creation failed!.\r\n"); while(1); }   vTaskStartScheduler(); for (;;) ; }     NOTE: Check that the line: #include sbengine_model.h in the sbengine_task_pxp.c  file matches the name of the exported header file from Storyboard.   The project should now build:    
View full article
FreeMASTER User Guide  This document provides in-depth information about FreeMASTER'S features and usage.    
View full article
Open-CMSIS-Pack project  This is a link to the Open-CMSIS-Pack project website. This resource provides all the technical details behind CMSIS-Packs.   Working with Open-CMSIS-Packs  This is a link to documentation for MCUXpresso for VS Code that shows the user how to get started with Open-CMSIS-Packs.      
View full article