A case of how to fully combine the advantages of the original MCU development environment and the industry-leading software tools to accelerate the development of mission critical applications

Author: IAR systems

With the market demand and the continuous promotion of “new four modernizations” such as electrification, networking, intelligence and sharing in the automotive industry, engineers will face more and more software development projects and use high-performance MCU with vehicle specification level and functional safety certification to develop related applications. Combining the MCU development environment provided by MCU suppliers with industry-leading development tools will greatly improve the development efficiency and performance of developers. Taking the s32k series 32-bit arm cortex automobile MCU widely used in the automobile industry as an example, this paper introduces the rapid development of high-performance automobile MCU applications by integrating and utilizing its s32ds development environment and the IAR embedded workbench for arm tool chain which has been widely used in the industry.

Since its launch in 2017, NXP s32k1 MCU has been widely used in the automotive electronics market. On this basis, NXP launched s32k3 MCU in 2020 and further expanded s32k1 MCU series products based on arm cortex-m0+/m4f. The new s32k3 MCU is based on arm cortex-m7, and provides multi-core and lock step options, which can support functional safety ISO 26262 ASIL b/d. S32k3 MCU is mainly used for automotive body electronic system, battery management and emerging domain controller.

Poybagjcdy2asy8laadksttzhcq576 Png

Figure 1:nxp s32k (source: NXP)

In order to solve the problem of increasing software complexity, NXP has launched real-time driver (RTD), which can support real-time software on AUTOSAR and non AUTOSAR applications. It is mainly used in arm Cortex-M kernel, so that all software layers meet the requirements of ISO 26262. Thus, the application meeting the relevant certification requirements can be completed quickly.

Pyybagjcdzeap-oaacgyfboknc779 Png

Figure 2: NXP real time driver (RTD) (source: NXP)

NXP s32k3 MCU has a wide range of partners to help customers develop. As an important partner of NXP, IAR systems provides professional embedded software development tools. The newly launched IAR embedded workbench for arm v9.20.1 has officially supported NXP s32k3 MCU (see reference 1). IAR embedded workbench for arm v8.50.10 functional security version can be used for application development based on s32k3 real time drive (RTD).

Poybagjcdaaahxbwaafgrflj55q567 Png

Figure 3: IAR systems embedded software development tool (source: IAR systems)

IAR embedded workbench for arm is widely used in the development of automotive electronic software. Its highly optimized compiler can generate highly efficient and small executable code, maximize MCU performance and reduce the occupation of flash and ram. At the same time, IAR embedded workbench for arm has powerful debugger and code analysis tools, which can help researchers improve development efficiency, improve code quality and ensure product reliability.

In order to facilitate the application development of customers, IAR embedded workbench for arm has been integrated with NXP s32ds tools to facilitate customers’ rapid project initialization on the IAR embedded workbench for arm tool.

The S32 configuration tools in the S32 design studio of NXP can quickly configure pins, clocks and peripherals, greatly simplifying the configuration of s32k3 MCU and accelerating the preparation in the early stage of development. Project initialization through s32ds and then import into IAR embedded workbench for arm for project development can bring great convenience to s32k3 series chip users. The following will specifically introduce how to use NXP s32ds to establish a project and import it into IAR embedded workbench for arm to speed up the development of Automotive Software Based on NXP s32k3 MCU.

Installing the IAR Eclipse Plug-in in NXP s32ds

NXP s32ds supports the IAR Eclipse Plug-in, but the IAR Eclipse Plug-in is not included in the s32ds installation package and needs to be installed separately. For specific methods, see reference 2. In practical application, this is applicable to S32 design studio for arm and S32 design studio for S32 platform.

Build project in NXP s32ds

Create a project in NXP s32ds and select IAR toolchain for arm as the corresponding tool chain:

Pyybagjcdcmabltsaadbtkyv1w8737 Png

Then configure the corresponding pins, clocks and peripherals through the configuration tools and automatically generate the corresponding codes:

Pyybagjcddkafsu1aak0kqx6vdg646 Png

Export s32ds project to IAR embedded workbench for arm

When creating a project in s32ds, if IAR toolchain for arm is selected as the tool chain, the corresponding project can be exported and imported into IAR embedded workbench for arm. Refer to reference material 3 for specific steps. The operation of exporting projects is applicable to S32 design studio for arm and s32k1, as well as S32 design studio for S32 platform and s32k3.

However, after following the operations in the link, the IAR embedded workbench for arm project folder directory is inconsistent with the original project folder directory in NXP s32ds:

For this reason, IAR provides a plug-in called ewptool, which can import the corresponding source file directory into the project. For details, please refer to reference material 4.

The following are the operations after importing workbench for arm from NXP s32ds:

1. delete the corresponding Freescale processor expert folder (the corresponding project folder directories will be deleted):

Poybagjcdlgapruuaadhuq_ Rmxe435.png

2. add a new source file directory and select the corresponding project directory (point to the directory where NXP s32ds creates the project):

3. the project folder directory corresponding to IAR embedded workbench for arm is consistent with the original project folder directory in NXP s32ds:

4. because the program entry function and interrupt vector table in the startup code in NXP s32ds are different from those used by IAR embedded workbench for arm by default, the following configuration is required (specify the corresponding program entry function in the linker option, and specify the corresponding interrupt vector table address in the debugger option: “–drv_vector\u table\u base=\u entry\u VTable”):

5. then you can compile, download, debug and other related operations in IAR embedded workbench for arm:

Poybagjcds-aojw9aanskty2dai601 Png

summary

Taking the s32k3 MCU and related software development resources newly launched by NXP as an example, this paper shows how to use the s32ds tool originally configured by NXP to establish a project based on s32k3 MCU, and selects the popular IAR toolchain for arm as the tool chain to improve the development efficiency of projects requiring high code quality. Configure the corresponding pins, clocks and peripherals through the configuration tools in the NXP s32ds, and automatically generate the corresponding codes. Then export the NXP s32ds project to the IAR embedded workbench for arm for subsequent development. Use the flexible configuration of NXP s32ds and the efficient compilation efficiency of IAR embedded workbench for arm to accelerate the development of Automotive Software Based on NXP s32k3 MCU.

Of course, as more and more Chinese science and technology enterprises make efforts in industrial applications, medical equipment and other key applications requiring high reliability and high performance, there are also opportunities in these fields to develop applications by combining the advantages of the original MCU development tools and the high-performance tool chain provided by third-party manufacturers such as IAR systems. Engineers can learn more and try more.

Leave a Reply

Your email address will not be published. Required fields are marked *