Segger Flasher Software
Flasher Software
To support interaction with Segger’s Flasher Software tooling during production, an SBC can be included io n the PPC.
Project File
SEGGER’s Universal Flasher GUI tool can be used to create a .uflash
project file and .DAT
firmware image file that can be used
with FlasherControl from a PLT test plan.
Sample Test Plan
This example updates a Segger Flasher Compact programmer using UniversalFlasher, and FlasherControl to program the DUT.
title: "Program PIC16 using Segger UFlash"
suite:
- title: Defines
ident: TPM
steps:
- command: define PROJECT.uflash "pic16.uflash"
- command: define FIRMWARE.dat "pic16fw.DAT"
- command: define SBC.uart "UART2"
- title: New SBC Session
steps:
- command: agentCfg PROGSBC %SBC.uart%
with:
- "%FIRMWARE.dat%"
- "%PROJECT.uflash%"
- title: "Update Flasher config"
steps:
- command: uart %SBC.uart%
title: "Universal Flasher (download)"
send: |
export DISPLAY=:0
cd /run/pltagent/mnt
UniversalFlasherExe -openprj %PROJECT.uflash% -opendat %PROJECT.dat% -download -exit; echo download:$?:DONE
extract: "download:(\\d+):DONE"
extractKey: RETVAL
timeout: 2m
- command: eval "RETVAL == '0'"
fail: "Flasher download error; check UART2 logs"
- command: uart %SBC.uart%
title: "FlasherControl (list files)"
send: "FlasherControlExe -C '#flist'; echo list:$?:DONE\r\n"
extract: "list:(\\d+):DONE"
extractKey: RETVAL
timeout: 2m
- command: eval "RETVAL == '0'"
fail: "Flasher #flist error; check UART2 logs"
- title: "Program PIC16 with UFlash"
steps:
- command: uart %SBC.uart%
title: "FlasherControl (auto)"
send: "FlasherControlExe; echo prog:$?:DONE"
extract: "prog:(\\d+):DONE"
extractKey: RETVAL
timeout: 2m
- command: eval "RETVAL == '0'"
fail: "Flasher program error; check UART2 logs"
Tip
UniversalFlasher and FlasherControl interaction can be inspected in the UART2 logs in the Test Report.
References
Example PLTcloud Projects