Visualize and control variables in FreeMASTER

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Visualize and control variables in FreeMASTER

Visualize and control variables in FreeMASTER

 

2

Overview


This article explains how to use the FreeMASTER desktop application to connect to a running embedded target, browse and add application variables, monitor their values in real time, and visualize signals using the Oscilloscope and Recorder features.

Why Is This Important?

FreeMASTER provides a non-intrusive way to interact with a running embedded application. Variables can be read and modified while the application continues to run, making the tool useful for parameter tuning, system validation, debugging, and building interactive dashboards.

Who Is This Article For?

This article is intended for:

  • Embedded developers who need to monitor and tune application variables while their application is running.
  • Users who have an embedded application running on a target board and want to interact with it using FreeMASTER.
Note: It is assumed that the application includes the FreeMASTER Driver — this part was covered in Using FreeMASTER block in Simulink.

After reading this article, you will be able to:

  • Connect the FreeMASTER desktop application to a target board.
  • Add and manage application variables.
  • Monitor variable values in real time.
  • Use the Oscilloscope and Recorder features to visualize and analyze signal data.
3

Context


FreeMASTER is a Windows-based desktop application that communicates with an embedded target through a serial interface. It uses a proprietary master-slave communication protocol, where the PC application issues requests and the target returns responses without disrupting the execution of the embedded firmware.

FreeMASTER identifies application variables using the ELF file generated during the build process. When DWARF debug information is included, the ELF file contains symbolic information, including variable names, data types, and memory addresses. FreeMASTER uses this information to automatically locate and access application variables on the target system.

4

Connecting to the Board


When FreeMASTER is launched, a new project is created automatically.
Soft_Big_Screen.png

To configure the communication interface, navigate to Tools → Connection Wizard.

3.1 Selecting the Communication Port Type

The first page of the wizard asks you to select the communication port type. Choose the option that matches the interface configured in your embedded application.

FM_Article_Img1.png

For applications built with NXP's Model-Based Design Toolbox, such as the one described in the previous article, the FreeMASTER Driver is typically configured to use LPUART over USB-CDC. In this case, select "Use direct connection to on-board USB port", which is the most common connection method for NXP evaluation boards.

3.2 Selecting the COM Port and Baud Rate

On the next page, select the COM port assigned to the board and the baud rate configured in the embedded application. Click Next to complete the wizard. Communication starts automatically once the wizard is finished.

FM_Article_Img2.png

Note: The baud rate must match the value configured on the target. If the values do not match, communication cannot be established.

3.3 Loading the ELF File

After the connection is established, FreeMASTER prompts you to load an ELF or MAP file to resolve application symbols. Click Yes and browse to the .elf file generated during the build process.

FM_Article_Img3.png

If you dismiss the prompt or need to update the file later, navigate to Project → Options → MAP Files, click New, and select the appropriate ELF file.

FM_Article_Img4.png

Note: The ELF file must be built with DWARF debug information enabled. Without DWARF information, FreeMASTER cannot resolve variable names, addresses, nor data sizes.
5

Handling Project Variables


4.1 Adding Variables

Variables are added through Project → Variables. In the Variables List dialog, click New to open the Variable Definition dialog. Enter the variable name in the Address field. FreeMASTER searches the symbols loaded from the ELF file and displays matching variable names in a dropdown list. Select the desired variable, configure the sampling period, and click OK.

FM_Article_Img5.png

Variables are read-only by default. To enable write access, open the Variable Definition dialog, switch to the Modifying tab, and enable the write option.

Once write access is enabled, the variable value can be edited directly from the Variable Watch panel while the application is running.

4.2 Variable Watch

The Variable Watch panel displays the current values of selected variables in real time.

To choose which variables are displayed, right-click the Variable Watch panel and select Watch Properties. In the Project Block Properties dialog, open the Variable Watch tab. All variables defined in the project are listed under Available variables. Select the variables you want to monitor and click Add to move them to the Watched variables list.

FM_Article_Img6.png

Once configured, the Variable Watch panel continuously reads the selected variables from the target and updates their values in real time.

For variables with write access enabled, you can modify their values directly from the panel by clicking the value field and entering a new value.

6

Setting Up the Oscilloscope


The Oscilloscope displays application variables as live waveforms. As new data is received from the target, the display updates continuously, making it useful for monitoring signal changes and system behavior over time.

To create an Oscilloscope view, right-click the project node in the Project Tree and select Create Oscilloscope.

FM_Article_Img7.png

In the Variables tab, click Add Variable and select the variables you want to display. Each variable is assigned a color and can be configured with its own Y-axis range and trigger settings.

FM_Article_Img8.png

Once configured, the Oscilloscope displays a live waveform for each selected variable, allowing you to monitor signal behavior in real time.

FM_Article_Img9.png

7

Setting Up the Recorder


The Recorder captures variable data directly on the MCU using a dedicated RAM buffer. Unlike the Oscilloscope, which receives data through periodic polling from the PC, the Recorder samples variables at the application's execution rate.

Because sampling is controlled by the MCU, all samples are evenly spaced and deterministic. This makes the Recorder particularly useful for capturing fast-changing signals and time-critical events where sample accuracy is important.

To create a Recorder, right-click the project node in the Project Tree and select Create Recorder.

FM_Article_Img7.png

In the Variables tab, click Add Variable to select the variables you want to record and configure their Y-axis ranges. The Variable Trigger Properties section allows you to configure a trigger condition to start a capture when a specific event occurs. You can select the trigger threshold value, and edge type (rising or falling). More advanced triggering settings can be set in the Recorder Trigger tab. 

FM_Article_Img10.png

After configuration, the Recorder monitors the selected trigger condition. Until the trigger event occurs, no data is displayed. Once triggered, the complete dataset is retrieved from the board and plotted as a line chart.

FM_Article_Img11.png

Note: Auto run is enabled by default and re-arms the recorder automatically after each download for continuous captures.
9

Conclusion


In this article, you learned how to connect FreeMASTER to an embedded target, load application symbols from an ELF file, monitor variables using the Variable Watch panel, and visualize signal data with the Oscilloscope and Recorder.

These features provide a powerful and non-intrusive way to observe and tune a running application without stopping firmware execution.

In the next article, we will explore FreeMASTER Lite and the JSON-RPC API, showing how to build custom web-based dashboards that communicate directly with an embedded application from a browser.

添付
%3CLINGO-SUB%20id%3D%22lingo-sub-2335238%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EFreeMASTER%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6Web%E3%83%96%E3%83%A9%E3%82%A6%E3%82%B6%E3%81%A7%E5%9F%8B%E3%82%81%E8%BE%BC%E3%81%BF%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E8%A6%96%E8%A6%9A%E5%8C%96%E3%81%99%E3%82%8B%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2335238%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%0A%3CBR%20%2F%3E%0A%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2335238%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E3%82%A6%E3%82%A7%E3%83%96%E3%83%96%E3%83%A9%E3%82%A6%E3%82%B6%E3%81%AE%E3%83%81%E3%83%A3%E3%83%BC%E3%83%88%E3%81%BE%E3%81%9F%E3%81%AF%E3%82%B2%E3%83%BC%E3%82%B8%E3%81%AB%E5%9F%8B%E3%82%81%E8%BE%BC%E3%81%BF%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%E3%81%99%E3%82%8B%3C%2FP%3E%3C%2FLINGO-TEASER%3E
評価なし
バージョン履歴
最終更新日:
2 時間前
更新者: