S32 Design Studio: Add FreeMASTER Lite Configuration to Existing UART Project using AI

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

S32 Design Studio: Add FreeMASTER Lite Configuration to Existing UART Project using AI

S32 Design Studio: Add FreeMASTER Lite Configuration to Existing UART Project using AI

 

Introduction

 

In Tutorial 2, the application was extended to cycle the FRDM-A-S32K312 board's RGB LED through red, green, and blue, while sending corresponding status messages to a serial terminal.

This third article shows how to add a FreeMASTER Lite server configuration using S32 Design Studio AI Support to an existing UART project on the FRDM-A-S32K312 board and create a browser dashboard that displays the current LED color – replacing the plain UART color echo.

 

Estimated time: ~20 minutes.

System Architecture

Tutorial3.png

Add FreeMASTER to existing UART project – system architecture overview

 

The components involved are:
 
FRDM-A-S32K312 – Target evaluation board. Runs the existing UART project extended with FreeMASTER TSA, streaming the LED colour variable to the host over USB at 115200 baud.
Host PC – Runs FreeMASTER Lite (fmlite.exe) on the board's COM port, 115200 baud, port 8090. Serves the LED colour dashboard to the browser.

Prerequisites

 

What you need before starting

 

  • Tutorial 2 completed — the GPIO Blinking LED Demo with UART must already be imported and building in S32 Design Studio
  • S32 Design Studio installed at C:\NXP\2026\K3_kit\S32DS_3.6.8 with workspace at C:\NXP\2026\K3_kit\workspace_S32DS_3.6.8_K3_kit
  • One FRDM-A-S32K312 evaluation board + USB cable
  • Download FreeMASTER Lite (fmlite.exe) from LINK and install it to C:\NXP\2026\K3_kit\FM_32
  • Any modern browser (Chrome / Edge / Firefox)
  • S32 Design Studio AI Support configured in your agent (download, install and configure it following the instruction from Installation & Usage Guide)

 

Connect the FRDM-A-S32K312 board to the PC via USB, open Device Manager → Ports (COM & LPT) and note the virtual COM port number. You must know this port before sending the prompt below — replace every COM# in the prompt with your own port (for example COM7), otherwise FreeMASTER Lite cannot open the serial connection to the board.

Steps

 

Send the following prompt to your AI assistant. It is a complete, self-contained instruction. Replace COM# with the COM port of your board before sending.

 

Step 1 – Create FreeMaster Lite dashboard and server configuration

Using FreeMaster Lite create a self contained web dashboard and the server configuration file in the project folder called dashboard.
FreeMaster Lite is installed at c:\NXP\2026\K3_kit\FM_32\FreeMASTER Lite\fmlite.exe
The dashboard should have a volatile variable that will be used to reflect the color of the RGB LED
At the top should have the controls for the board serial connection, default: connection name "S32K312 RGB Board", COM#, 115200 baud, 8 data bits, no parity, 1 stop bit
The board is connected on COM# - use this serial port for the FreeMaster Lite connection

The project is a plain GPIO demo with no FreeMASTER driver - add whatever is needed on the target side so it can talk to FreeMaster Lite, then build and flash it in S32DS and confirm the color actually changes from the dashboard.

Start FreeMaster server and run the dashboard at the end
Use the s32ds-agentic-ai MCP server; if the MCP server disconnects at any point, stop immediately and notify user. 
AI will:
 
  • Create a self-contained web dashboard in the dashboard project folder
  • Create a FreeMASTER Lite server configuration file in the same folder
  • Add a volatile variable to reflect the RGB LED colour in the dashboard
  • Add serial connection controls at the top (name: S32K312 RGB Board, COM#, 115200 baud, 8N1)
  • Start the FreeMASTER Lite server and open the dashboard in the browser
  • Stop and notify the user immediately if the s32ds-agentic-ai server disconnects

Verifying the Result

 

Work through this final check to confirm that the prompt completed successfully.

 

Final check
  1. FreeMASTER Lite server is running with no errors.
  2. Open http://localhost:8090 in your browser.
  3. The LED colour dashboard loads and shows the current LED colour within ~5 seconds.
  4. The displayed colour changes in sync with the physical LED on the board.

Troubleshooting

 

Symptom Fix
ReadTSA returns count=0 TSA not enabled (FMSTR_USE_TSA 1) or FMSTR_Poll() missing.
StartComm times out Wrong COM port in .fmcfg, baud mismatch, or board not powered.
fmlite.exe exits immediately Activation code not entered, or path has spaces — wrap in quotes.
LPUART0 baud rate wrong or peripheral not running Open Peripherals Tool. Verify LPUART0 is enabled and its clock source is set to AIPS_PLAT_CLK. Regenerate code if you change anything.
LPUART0 absent at runtime Open Peripherals Tool › McuPartition. Enable LPUART0 in the partition configuration, then regenerate.
FreeMASTER host times out or drops connection FMSTR_Poll() must be called frequently — place it in the main loop or a fast periodic task. The host requires low-latency responses.
LPUART6 interrupts conflict with FreeMASTER Open Peripherals Tool (Platform). Disable LPUART6 interrupts — FreeMASTER operates in polling mode and does not use interrupt-driven UART.

File Reference

 

 

File Step Description
dashboard/led_color.html 1 LED colour dashboard
dashboard/board_115200.fmcfg 1 FreeMASTER Lite server configuration
src/main.c 1 Firmware with FreeMASTER TSA and LED colour variable

 

Add the FreeMASTER Lite configuration and dashboard – watch your board's LED colour live in the browser in about 20 minutes.

ラベル(1)
評価なし
バージョン履歴
最終更新日:
5 時間前
更新者: