Segger J-Link Software
J-Link Software
To support interaction with Segger’s J-Link Software tooling during production, an SBC can be included in the PPC.
For example, to program the EFM32 of a SiLabs EFM32WG-STK3800 Wonder Gecko Starter Kit over its built-in J-Link programmer using J-Link Commander:
Sample Test Plan
title: "Program EFM32 using Segger J-Link Commander"
suite:
- title: Defines
ident: TPM
steps:
- command: define FIRMWARE.hex "STM3800_blink.hex"
- command: define SBC.uart "UART2"
- title: New SBC Session
steps:
- command: agentCfg PROGSBC %SBC.uart%
with:
- "%FIRMWARE.hex%"
- title: "Program EFM32 with J-Link Commander"
steps:
- command: uart %SBC.uart%
send: |
/opt/SEGGER/JLink/JLinkExe -device EFM32WG990F256; echo prog:$?:DONE
eoe 1
si 1
speed 4000
r
erase
loadfile %FIRMWARE.hex%
verify
r
q
extract: "prog:(\\d+):DONE"
extractKey: RETVAL
timeout: 2m
- command: eval "RETVAL == '0'"
fail: 'J-Link Commander error; check UART logs'
Tip
J-Link Commander interaction can be inspected in the UART2 logs in the Test Report.
Example PLTcloud Projects
See also
J-Link Commander Preparation
Use the following test plan to prepare an SBC with an AgentOS SD Card image with J-Link Commander.
Files:
JLink_Linux_V854_arm64.deb
: J-Link Software and Documentation Pack,.deb
archive for ARM64 (download from Segger: SEGGER - Downloads - J-Link / J-Trace )
title: "PLTAgent: Install J-Link Commander"
suite:
- ident: SBC
title: "SBC Setup"
retry: 2
steps:
- command: sleepms 500
- command: agentCfg SBC UART2
with:
- JLink_Linux_V854_arm64.deb
- ident: JLINK.INST
title: "Install J-Link Software and Documentation bundle"
steps:
- command: agentExec SBC "sudo bash"
- command: agentExec SBC "mount -o remount,rw /"
- command: agentExec SBC "dpkg-deb -x /run/pltagent/mnt/JLink_Linux_V854_arm64.deb /"
timeout: 10s
- command: agentExec SBC "mount -o remount,ro /"
timeout: 30s
- ident: JLINK.VER
title: "J-Link version check"
steps:
- command: uart UART2
send: |
/opt/SEGGER/JLink/JLinkExe
q
extract: "J-Link Commander V([0-9.]+)"
extractKey: JLINK_VERSION