Ruffian Heng embedded: the build configuration of SDK project under MCU Xpress IDE is different from IAR and MDK


Hello, I’m ruffian Heng, a serious technical ruffian. What ruffian Heng introduced to you today isThe build configuration of the SDK project under the MCU Xpress IDE is different from that of IAR and MDK

NXP SW team will publish the downloads of SDK and Tool official website every quarter, of which MCUXpresso IDE downloading has been steadily increasing. This NXP own IDE is actually very popular in Europe and America and Taiwan, China, and the popularity rate in mainland China is slightly lower, mainly because the embedded developers on the Chinese mainland are more familiar with IAR/MDK’s two classic IDE. People don’t want to leave their comfort zone easily.

Today, ruffian Heng wants to introduce the build configuration management mechanism of the sample project of mcuxpresso ide combined with the official SDK software package, and its comparison and difference with the IAR and MDK sample projects.

1、 Prepare development environment

First, prepare the environment, including the necessary software. The environment of ruffian Heng is as follows:

2、 Review the project build on IAR / MDK

First of all, let’s popularize the concept of project build. We know that in embedded engineering, the input file includes not only the code source file, but also the project configuration file and link file (you can see what the ruffian Heng wrote)Embedded development document series)。 A set of code source files is a specific application project, but this set of code source files can be matched with multiple different project configuration files and link files. Therefore, each specific project configuration file and link file combination in the IDE is a build.

We use SDK \ boards \ evkmimxrt1170 \ demo_ apps\hello_ Take world \ CM7, the most basic routine, as an example. Let’s start with the IAR project hello_ world_ demo_ Cm7.eww, the workspace contains 6 * 2 builds. If XX_ Debug and XX_ If release is considered as one, it is actually six different builds:

1. The link file mimxrt1176xxxxx corresponding to debug / release build_ cm7_ Ram.icf, RO segment is linked at the starting address of ITCM, and RW segment is linked in dtcm

During actual development, you can easily switch between different builds for debugging, and the project settings corresponding to each build can also be adjusted as needed (precompiled macros, optimization options, etc.). In addition, in the menu barProject / Edit ConfigurationsYou can also add or delete build.

Let’s look at the MDK project hello_ world_ demo_ Cm7.uvprojx, the workspace also contains 6 * 2 builds, which is completely consistent with the experience under IAR. In addition, in the menu barProject / Manage / Project ItemsYou can also add or delete build.

3、 Project build on mcuxpresso IDE

Now we come to our protagonist mcuxpresso ide project. By default, there is no project file in the SDK package. You need to followSDK project import and workspace management mechanism under MCU Xpress IDEOne step import generation.

After the project is successfully imported, it will be displayed in \ mcuxpressoide_ 11.4.0_ 6224\workspace\evkmimxrt1170_ hello_ world_ demo_ You can see the. Project project file in CM7. By default, only two builds (debug / release) are included in this workspace. The experience here is inconsistent with that in IAR / MDK. Although we’re in the menu barProject / Build Configurations / ManageYou can also add or delete build.

By default, there are only two builds in the mcuxpresso ide project, which is mainly related to its link file management mechanism. Under IAR / MDK, the link files of different builds are prepared in advance, while under mcuxpresso IDE, the link files that meet the requirements can be automatically generated in real time (as shown in the figure below)Manage linker scriptThe option is checked by default to generate the linked file \ mcuxpressoide according to the IDE settings_ 11.4.0_ 6224\workspace\evkmimxrt1170_ hello_ world_ demo_ cm7\Debug\evkmimxrt1170_ hello_ world_ demo_ cm7_ Debug.ld)。

Based on this link file management mechanism, we really don’t need to create multiple builds. Switching build is actually changing the link file settings (it is assumed that other settings of the project don’t need to be changed). Of course, if you have some customized link files, you can also remove themManage linker scriptCheck the option and point to the prepared. LD file in the path. About the link design in the IDE, ruffian Heng will write an article to introduce it in depth later.

So far, the differences between the build configuration of the SDK project under the MCU Xpress IDE and IAR and MDK have been introduced. Where are the applause~~~

Welcome to subscribe

The article will be published to me at the same timeBlog Park home pageCSDN home pageZhihu home pageWeChat official accountOn the platform.

Wechat search“Ruffian scale“Or scan the QR code below to see it for the first time on the mobile phone.