Real-Time Variable Monitoring in IAR IDE for Cortex-R52 MPU

Overview

Description

The real-time variable monitoring feature refers to the real-time variable tracking capability provided in the IAR Embedded Workbench integrated development environment. It allows developers to track variables in real time during debugging and monitor their values at runtime. This feature is significant as it helps developers gain a more accurate understanding of the program’s execution process and the changes in variables. By monitoring variables in real time, developers can quickly identify issues in the code, such as memory overflows or incorrect variable values, facilitating rapid debugging and code fixes. Additionally, real-time variable monitoring provides a history of variable values, enabling developers to view trends in variable value changes for better analysis of program execution. However, most customers are unaware of how to enable the “Real-Time Monitoring Feature” when debugging Cortex-R52 based RZ/T&N series MPU.

Below is a simple solution:

01

According to the user manual for the RZ/T2 N2 AXI-AP at the port, set the EWARM debugger options. As shown in Figure 1:

Real-Time Variable Monitoring in IAR IDE for Cortex-R52 MPU

Figure 1 Setting AXI-AP port in IAE IDE

02

Since the IDE can directly access the SRAM range via AXI-AP, variables defined in the system RAM can be tested for real-time monitoring. Customers can modify the *.icf file, placing the variables to be observed in the real-time monitoring window in the system RAM area.

Real-Time Variable Monitoring in IAR IDE for Cortex-R52 MPU

Figure 2 Set code to start from RAM area

03

Variables defined in the TCM area cannot be monitored in real time directly. However, an offset of 0x2000_0000 needs to be added to the access address. Real-time monitoring is performed through the address of the variable symbol for real-time reading and updating. When variables are defined in the TCM area, the debugger can read from the TCM via AXI-AP, but AXI-AP requires an address offset to access the TCM, hence the real-time monitoring window cannot be updated directly.

Real-Time Variable Monitoring in IAR IDE for Cortex-R52 MPU

Figure 3 CPU0 TCM address offset via AXIS

First, customers need to manually modify the *.ddf file and make the debugger recognize the TCM via AXIS area as a valid address area, as shown in Figure 4:

Real-Time Variable Monitoring in IAR IDE for Cortex-R52 MPU

Figure 4 Modifying *.ddf file in IAE IDE

Then, indirectly display the variables stored in TCM in real time through an intermediate pointer variable, which obtains the address and offset of the variable. For example: the variable “var” is defined in the TCM area. If the user wants to view “var” in real time, they should add the expression “&var+0x20000000/4” to configure “var” to the mirrored area of AXIS. 0x20000000 is the offset between the AXIS access area and the TCM area. 0x20000000/4 is used because the data type length of “var” is 32 bits.

Real-Time Variable Monitoring in IAR IDE for Cortex-R52 MPU
Figure 5 Viewing variables defined in the TCM area in real time

Benefits to Customers:

Below are some important implications of the variable real-time monitoring feature in the industrial control field:

01

Troubleshooting and Debugging

Industrial control systems may encounter various faults and issues. By monitoring variable values in real time, developers can accurately pinpoint and diagnose the root cause of problems, aiding in fault resolution and speeding up the debugging process.

02

Real-Time Performance Analysis

Industrial control systems often need to meet strict real-time performance requirements. By using the IAR variable real-time monitoring feature, developers can monitor key variable values in real time and analyze metrics such as system response time and execution time, facilitating performance optimization and improvement to ensure efficient system operation.

03

Data Collection and Monitoring

Sensors and actuators in industrial control systems typically generate large amounts of data. By using IAR variable real-time monitoring, variable values can be monitored and recorded in real time, aiding in data collection and analysis for precise control strategies.

For more product information, please visit:

RZ/N Series MPU

https://www.renesas.cn/cn/zh/products/microcontrollers-microprocessors/rz-mpus/rzn

Real-Time Variable Monitoring in IAR IDE for Cortex-R52 MPU

RZ/T Series MPU

https://www.renesas.cn/cn/zh/products/microcontrollers-microprocessors/rz-mpus/rzt-series-mpu

Real-Time Variable Monitoring in IAR IDE for Cortex-R52 MPU

You can scan the QR code below or copy the URL into your browser to access the Renesas Technical Forum:

Real-Time Variable Monitoring in IAR IDE for Cortex-R52 MPU

https://community-ja.renesas.com/zh/forums-groups/mcu-mpu/

1

END

1

Recommended Reading

Real-Time Variable Monitoring in IAR IDE for Cortex-R52 MPU

Product Details | Renesas RZ/T2L MPU

Real-Time Variable Monitoring in IAR IDE for Cortex-R52 MPU

Product Details | Renesas RZ/N2L MPU

Real-Time Variable Monitoring in IAR IDE for Cortex-R52 MPU

Application Insights for RZ/T2M RZ/N2L RZ/T2L Series (6-Down)

For more exciting content, please click

Leave a Comment