Datasheet
Building and debugging the application
PMSM Field-Oriented Control on MIMXRT1050 EVK, User's Guide, Rev. 0, 05/2018
10 NXP Semiconductors
• board/mcdrv.h—this file ensures the abstraction of the mcdrv_evkbimxrt1050.h file inclusion.
• board/mcdrv_evkbimxrt1050.c—contains the motor-control driver peripherals initialization
functions that are specific for the board and MCU used.
• board/mcdrv_evkbimxrt1050.h—header file for board/mcdrv_evkbimxrt1050.c. This file
contains the macros for changing the PWM period and the ADC channels assigned to the phase
currents and board voltage.
• board/pin_mux—port configuration files. It is recommended to generate these files in the pin
tool.
4.2. IDE workspaces structure
The structure of workspaces is different to the structure described in these sections, but it uses the same
files. The different organization is chosen due to a better manipulation with folders and files in
workplaces, and due to the possibility of adding or removing files and directories.
The “build_ref_solutions“ project includes all the available functions and routines, MID functions,
scalar and vector control of the motor, FOC control, and FreeMASTER MCAT project. This project
serves for development and testing purposes.
5. Tools
Install the FreeMASTER Run-Time Debugging Tool 2.0 and one of the following IDEs on your PC to
run and control the PMSM application properly:
• IAR Embedded Workbench IDE v8.20.2 or higher
• MCUXpresso v10.1
• ARM-MDK - Keil μVision version 5.24
• FreeMASTER Run-Time Debugging Tool 2.0
6. Building and debugging the application
The package contains the PMSM reference project for the IAR Embedded Workbench, MCUXpresso,
and µVision Keil IDEs. The following sections describe how to open, run (Debug and Release
configuration), and debug the project in a particular IDE.
The Debug and Release configurations differ in the level of optimizations and the memory location,
from which the application is executed (RAM or FLASH). That is the reason why both configurations
are described separately in each IDE’s subsection.
There is a simple tutorial at the end of this chapter, which describes how to load the binary output file to
the Hyper Flash memory on the MIMXRT1050-EVK board.
NOTE
The CMSIS-DAP is used as a debugger in the PMSM project. To install
the required drivers, go to www.nxp.com/opensda, choose the
“MIMXRT1050-EVK” board and follow the instructions.