Build projects for XIAO MG24 using SimplicityStudio

This is the continuation of the other thread about MG24 boards

@grobasoz

What would be the missing steps to add to the list?

1 Like

Can we start with the assumption that Simplicity Studio 5 has been installed along with the relevant SiSDK (currently 2025.6.1)?

Or despite Simplicity Studio 6 being in Beta work with that? It supports VSCode as well… (Same SiSDK).

“We” can then build out the necessary steps to build a Matter device, viz Light, starting with “internal” bootloader and later using the “external” (SPI flash) bootloader for OTA?

Yes. Yes, I have it on my PC

OK

I will be building a Matter Light App (Internal Bootloader) for XIAO MG24 using Simplicity Studio 5 and SiSDK 2025.6.1.

Step 1.
Select the Launcher tab.

Step 2 & 3.
Add the XIAO MG24 chip (EFR32MG24B220F1636IM48) to the “My Products” section of Simplicity Studio.

Step 4.
Select Example Projects and Demos.

Step 5.
Filter on “light”

Step 6.
Select “Matter”

Step 7.
Select Matter - SoC Lighting over Thread with Internal Bootloader and click “Create”.

Final Step.
Select suitable names for Workspace, Bootloader and main Project (eg XIAO_MG24_MatterLight).

Adding some project details.

Step 1.
Once the project has been created, select the “Software Components” tab.

Step 2.
Filter on “Configurable” and “Installed”

Step3.
Select Platform → Driver → Led → Simple LED->inst0.

Step 4.
Click “Configure”.

Step 5.
Select “Active Low” polarity and PA07 as “Selected Module” then click X (Close).

Step 6.
Select the UART EUSART → vcom instance and click “Configure”.

Step 7.
Set the vcom settings as below… and click X.

Step 8.
In the “Project Explorer” select the project and Right Click → Build Project (or Click the “Hammer” button in the menu bar).

The project should build without errors.

Additional Settings for XIAO MG24.

Step 1.
Deselect “Installed” checkbox. (We’re adding new “components”).

Step 2.
Filter on “gpio”.

Step 3.
Select GPIO Init (from Platform->Peripheral->EMLIB->Init).

Step 4.
Click “Install”.

Step 5.
Choose and “Instance Name” - eg RF_PWR.

Step 6.
Click “Configure”.
(If the “No Entry” sign appears over the “Configure” button, wait a little bit…)

Step 7.
RF_PWR

  • Pin Mode - stays the same.
  • DOUT - 1
  • Selected Module is PB05
    X = Close.

Repeat this by clicking “+ Add New Instance” for…

  1. The RF_SW - Pin Mode (Same), DOUT (0), Selected Module (PB04).
  2. Any other GPIO required (or skip for now).

Build the project.

1 Like

Programming and Debugging.

There are two options available for programming and debugging the XIAO MG24 projects.

  1. Via built in SWD via OpenOCD.
  2. Using the SWD pads and a Segger JLink (compatible) debugger.

Option 1.
Quite involved - will tackle this later.

Option 2.
Either solder SWD connections to the XIAO MG24 or use the Expansion Board to connect SWD to the device.
Only GND, SWDIO and SWCLK are required.

Select the “bootloader” project and build the project.
In the “Binaries” folder of the bootloader project, select the “hex” file and Right Click → Flash to Device.
Select your JLink connected to the XIAO MG24 and click OK.

Erase and Program the device.

Select the “light” project and click the “Debug” symbol on the menu bar (or Right Click → Debug As → 1 Silicon Labs ARM Program.

Select the JLink and click OK.
The Debug perspective will be opened and the code set at “sl_main_second_stage_init();” function.

Connect a Serial Terminal (eg PuTTY) to the XIAO MG24 serial port.
Click the run button to start the debugger.

The following messages are sent…

[00:00:00.125][info  ][DL] Starting scheduler
[00:00:00.125][info  ][DL] ==================================================
[00:00:00.126][info  ][DL] SL-Light starting
[00:00:00.126][info  ][DL] ==================================================
[00:00:00.126][info  ][DL] Init CHIP Stack
[00:00:00.131][info  ][DL] Setting device name to : "SL-Light"
[00:00:00.132][info  ][DL] Provision mode disabled
[00:00:00.132][info  ][DL] Initializing OpenThread stack
[00:00:00.133][info  ][DL] OpenThread started: OK
[00:00:00.134][info  ][DL] Setting OpenThread device type to ROUTER
[00:00:00.134][info  ][DL] Starting OpenThread task
[00:00:00.135][info  ][SVR] Initializing subscription resumption storage...
[00:00:00.137][info  ][SVR] Server initializing...
[00:00:00.137][detail][FP] Initializing FabricTable from persistent storage
[00:00:00.138][info  ][TS] Last Known Good Time: [unknown]
[00:00:00.138][info  ][TS] Setting Last Known Good Time to firmware build time 2                                  023-10-10T16:28:52
[00:00:00.140][info  ][DMG] AccessControl: initializing
[00:00:00.141][info  ][DMG] Examples::AccessControlDelegate::Init
[00:00:00.141][info  ][DMG] AccessControl: setting
[00:00:00.141][info  ][DMG] DefaultAclStorage: initializing
[00:00:00.142][info  ][DMG] DefaultAclStorage: 0 entries loaded
[00:00:00.142][info  ][SVR] WARNING: mTestEventTriggerDelegate is null
[00:00:00.142][detail][IN] UDP::Init bind&listen port=5540
[00:00:00.143][detail][IN] UDP::Init bound to port=5540
[00:00:00.143][detail][IN] BLEBase::Init - setting/overriding transport
[00:00:00.143][detail][IN] TransportMgr initialized
[00:00:00.148][detail][DL] Using Thread extended MAC for hostname.
[00:00:00.150][info  ][ZCL] Using ZAP configuration...
[00:00:00.151][detail][DMG] Failed to read stored attribute (0, 0x0000_0028, 0x0                                  000_0005: a0
[00:00:00.152][detail][DMG] Failed to read stored attribute (0, 0x0000_0028, 0x0                                  000_0010: a0
[00:00:00.154][detail][DMG] Failed to read stored attribute (1, 0x0000_0006, 0x0                                  000_0000: a0
[00:00:00.155][detail][DMG] Failed to read stored attribute (1, 0x0000_0006, 0x0                                  000_4003: a0
[00:00:00.156][detail][DMG] Failed to read stored attribute (1, 0x0000_0008, 0x0                                  000_0000: a0
[00:00:00.157][detail][DMG] Failed to read stored attribute (1, 0x0000_0008, 0x0                                  000_4000: a0
[00:00:00.158][detail][DMG] Failed to read stored attribute (1, 0x0000_0300, 0x0                                  000_0000: a0
[00:00:00.159][detail][DMG] Failed to read stored attribute (1, 0x0000_0300, 0x0                                  000_0001: a0
[00:00:00.160][detail][DMG] Failed to read stored attribute (1, 0x0000_0300, 0x0                                  000_0003: a0
[00:00:00.161][detail][DMG] Failed to read stored attribute (1, 0x0000_0300, 0x0                                  000_0004: a0
[00:00:00.162][detail][DMG] Failed to read stored attribute (1, 0x0000_0300, 0x0                                  000_0007: a0
[00:00:00.163][detail][DMG] Failed to read stored attribute (1, 0x0000_0300, 0x0                                  000_0008: a0
[00:00:00.164][detail][DMG] Failed to read stored attribute (1, 0x0000_0300, 0x0                                  000_4000: a0
[00:00:00.165][detail][DMG] Failed to read stored attribute (1, 0x0000_0300, 0x0                                  000_4001: a0
[00:00:00.166][detail][DMG] Failed to read stored attribute (1, 0x0000_0300, 0x0                                  000_4002: a0
[00:00:00.166][detail][DMG] Failed to read stored attribute (1, 0x0000_0300, 0x0                                  000_4003: a0
[00:00:00.166][detail][DMG] Failed to read stored attribute (1, 0x0000_0300, 0x0                                  000_4004: a0
[00:00:00.168][detail][DMG] Failed to read stored attribute (1, 0x0000_0300, 0x0                                  000_4010: a0
[00:00:00.168][info  ][DMG] AccessControlCluster: initializing
[00:00:00.168][detail][ZCL] GeneralDiagnostics: OnDeviceReboot
[00:00:00.169][detail][DMG] Endpoint 0, Cluster 0x0000_0033 update version to d3                                  5a9324
[00:00:00.169][detail][EVL] LogEvent event number: 0x0000000000000000 priority:                                   2, endpoint id:  0x0 cluster id: 0x0000_0033 event id: 0x3 Epoch timestamp: 0x00                                  0000DC6ACFAC28
[00:00:00.170][info  ][ZCL] Initiating Admin Commissioning cluster.
[00:00:00.170][detail][DMG] Endpoint 1, Cluster 0x0000_0003 update version to e2                                  afd74a
[00:00:00.171][info  ][ZCL] Cluster callback: 0x0000_0003
[00:00:00.171][info  ][ZCL] Identify attribute ID: 0x0000_0001 Type: 48 Value: 2                                  , length 1
[00:00:00.172][detail][DMG] Endpoint 1, Cluster 0x0000_0004 update version to b8                                  d0002f
[00:00:00.172][info  ][ZCL] Cluster callback: 0x0000_0004
[00:00:00.172][detail][DMG] Endpoint 1, Cluster 0x0000_0004 update version to b8                                  d00030
[00:00:00.173][info  ][ZCL] Cluster callback: 0x0000_0004
[00:00:00.173][info  ][ZCL] Endpoint 1 On/off already set to new value
[00:00:00.174][detail][DMG] Endpoint 1, Cluster 0x0000_0008 update version to c2                                  cfaab
[00:00:00.174][detail][DMG] Endpoint 1, Cluster 0x0000_0062 update version to fa                                  bd4a
[00:00:00.174][info  ][ZCL] Cluster callback: 0x0000_0062
[00:00:00.175][detail][DMG] Endpoint 1, Cluster 0x0000_0300 update version to a3                                  af4a7b
[00:00:00.176][detail][DMG] Endpoint 1, Cluster 0x0000_0300 update version to a3                                  af4a7c
[00:00:00.177][info  ][ZCL] Cluster callback: 0x0000_0300
[00:00:00.177][info  ][ZCL] Color Control attribute ID: 0x0000_0008 Type: 48 Val                                  ue: 2, length 1
[00:00:00.179][detail][DMG] Endpoint 1, Cluster 0x0000_0300 update version to a3                                  af4a7d
[00:00:00.179][info  ][ZCL] Cluster callback: 0x0000_0300
[00:00:00.179][info  ][ZCL] Color Control attribute ID: 0x0000_4001 Type: 48 Val                                  ue: 2, length 1
[00:00:00.181][detail][IN] SecureSession[0x20007920]: Allocated Type:1 LSID:6300                                  5
[00:00:00.182][detail][SC] Assigned local session key ID 63005
[00:00:00.182][detail][SC] Waiting for PBKDF param request
[00:00:00.182][info  ][DIS] Updating services using commissioning mode 1
[00:00:00.183][error ][DIS] Failed to remove advertised services: 3
[00:00:00.183][detail][DL] Using Thread extended MAC for hostname.
[00:00:00.184][info  ][DIS] Advertise commission parameter vendorID=65521 produc                                  tID=32773 discriminator=3840/15 cm=1 cp=0
[00:00:00.184][error ][DIS] Failed to advertise commissionable node: 3
[00:00:00.184][error ][DIS] Failed to finalize service update: 3
[00:00:00.185][info  ][DIS] Updating services using commissioning mode 1
[00:00:00.185][error ][DIS] Failed to remove advertised services: 3
[00:00:00.185][detail][DL] Using Thread extended MAC for hostname.
[00:00:00.186][info  ][DIS] Advertise commission parameter vendorID=65521 produc                                  tID=32773 discriminator=3840/15 cm=1 cp=0
[00:00:00.186][error ][DIS] Failed to advertise commissionable node: 3
[00:00:00.187][error ][DIS] Failed to finalize service update: 3
[00:00:00.187][info  ][IN] CASE Server enabling CASE session setups
[00:00:00.188][detail][IN] SecureSession[0x200079f8]: Allocated Type:2 LSID:6300                                  6
[00:00:00.188][detail][SC] Allocated SecureSession (0x200079f8) - waiting for Si                                  gma1 msg
[00:00:00.188][detail][ZCL] Emitting StartUp event
[00:00:00.189][detail][EVL] LogEvent event number: 0x0000000000000001 priority:                                   2, endpoint id:  0x0 cluster id: 0x0000_0028 event id: 0x0 Epoch timestamp: 0x00                                  0000DC6ACFAC3B
[00:00:00.189][info  ][SVR] Server Listening...
[00:00:00.190][silabs ]Starting Platform Manager Event Loop
[00:00:00.192][info  ][DL] Starting App Task
[00:00:00.475][info  ][DL] Bluetooth stack booted: v10.1.0-b0
[00:00:00.475][info  ][DL] RAIL version:, v2.19.1-b0
[00:00:00.476][detail][DL] CHIP event task running
[00:00:00.476][detail][DL] Start BLE advertisement
[00:00:00.477][detail][DL] BLE Static Device Address DF:4D:F2:55:30:71
[00:00:00.478][info  ][DL] Starting advertising with interval_min=32, intverval_                                  max=96 (units of 625us)
[00:00:00.480][info  ][DL] _OnPlatformEvent default:  event->Type = 32781
[00:00:00.481][info  ][DL] _OnPlatformEvent default:  event->Type = 32779
[00:00:00.482][detail][DL] OpenThread State Changed (Flags: 0x00038210)
[00:00:00.483][detail][DL]    Network Name: OpenThread
[00:00:00.483][detail][DL]    PAN Id: 0xFFFF
[00:00:00.483][detail][DL]    Extended PAN Id: 0xDEAD00BEEF00CAFE
[00:00:00.484][detail][DL]    Channel: 11
[00:00:00.484][detail][DL]    Mesh Prefix: fdde:ad00:beef:0:0:0:0:0/64
[00:00:00.485][info  ][SVR] Current Software Version String: 1
[00:00:00.485][info  ][SVR] Current Software Version: 1
[00:00:00.485][info  ][DL] Device Configuration:
[00:00:00.486][info  ][DL]   Serial Number: (not set)
[00:00:00.486][info  ][DL]   Vendor Id: 65521 (0xFFF1)
[00:00:00.487][info  ][DL]   Product Id: 32773 (0x8005)
[00:00:00.487][info  ][DL]   Product Name: SL_Sample
[00:00:00.488][info  ][DL]   Hardware Version: 1
[00:00:00.488][info  ][DL]   Setup Pin Code (0 for UNKNOWN/ERROR): 0
[00:00:00.488][info  ][DL]   Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 384                                  0 (0xF00)
[00:00:00.489][info  ][DL]   Manufacturing Date: (not set)
[00:00:00.489][info  ][DL]   Device Type: 65535 (0xFFFF)
[00:00:00.490][info  ][SVR] SetupQRCode: [MT:6FCJ142C00KA0648G00]
[00:00:00.490][info  ][SVR] Copy/paste the below URL in a browser to see the QR                                   Code:
[00:00:00.490][info  ][SVR] https://project-chip.github.io/connectedhomeip/qrcod                                  e.html?data=MT%3A6FCJ142C00KA0648G00
[00:00:00.491][info  ][ZCL] On/Off ep1 value: 0
[00:00:00.491][silabs ]App Task started
matterCli> [00:00:30.481][info  ][DL] Starting advertising with interval_min=240, intverval_max=1920 (units of 625us)

1 Like