An application to program and display the contents of the target microcontrollers memory. This application connects with the RPi based SWorD Server which is connected to the target microcontroller.

Installation

Download the SWorD Clients installer package see here how to install.

Usage

SWorDProgrammer [<options>]

-locate[:<programmer name>]

If <programmer name> is supplied then the application will attempt to find the named programmer on the network and report its IP address. If no programmer name is supplied, then the application will search for any programmers present on the network.

-program:<file list>

Programs the target microcontroller with the contents of the comma separated list of files. The programmer supports files of the following types:

  • Executable and Linkable Format (ELF)
  • Intel iHex (HEX)
  • JSON (json)

-eraseall

Forces a complete erase of the target microcontrollers memory

-read:<start address>[:<end address>]

Reads the microcontrollers memory starting at address <start address>. If <end address> is omitted then the subsequent 4096 bytes are read back.

-verify:<file list>

Verifies the contents of the comma separated list of files match the target microcontrollers memory.

-probe:<programmer address>

Attempts to connect to the programmer <programmer address> on the network.

<programmer address> can be the name of the programmer (recommended) or the IP address. Sometimes firewalls on the network interfere with the automatic discovery process and the only way to work around it is to use the IP address of the programmer.

-targettype:<target type>

Informs the programmer what type of target is is dealing with. For most operations this is not required but necessary for some i.e. reprogramming only part of the target microcontrollers memory.

Currently supported targettypes

  • nrf52. Nordic nrf52 devices

-out:<file path>

When used in conjunction with read, saves the contents of the readback memory into the file

-loglevel:<level>

Controls whether the application logs or not. a value of 0 (default) means no logging and a value of 5 means full logging.

On windows, log files are generated in:

C:\ProgramData\NoSMD\SWorDProgrammer\log

Log files are managed by the application and are automatically deleted.

Common usage Scenarios

Programming

To perform a full erase and flash with the elf file test.elf

C:\> "C:\Program Files\NoSMD\SWorD\bin\SWorDProgrammer.exe" -program:test.elf -eraseall -probe:rpi4programmer

To flash with the application test.elf and uicr.json. Even though -eraseall has not been specified, a full erase will occur as the target type has not been supplied.

C:\> "C:\Program Files\NoSMD\SWorD\bin\SWorDProgrammer.exe" -program:test.elf,uicr.json -probe:rpi4programmer

To just reflash the config data in uicr.json

C:\> "C:\Program Files\NoSMD\SWorD\bin\SWorDProgrammer.exe" -program:uicr.json -probe:rpi4programmer -targettype:nrf52

Erase all

To completely erase the memory of the microcontroller

C:\> "C:\Program Files\NoSMD\SWorD\bin\SWorDProgrammer.exe" -eraseall -probe:rpi4programmer

Read Contents of Memory

To read back 256 bytes of the microcontrollers memory from address 0x1000

C:\> "C:\Program Files\NoSMD\SWorD\bin\SWorDProgrammer.exe" -read:0x1000:0x10FF -probe:rpi4programmer
Searching for rpi4programmer... ...please wait.


Attempting to connect to rpi4programmer on 192.168.1.102::33332...

Connected to rpi4programmer on 192.168.1.102::33332...


0x00001000        0xB8 0x13 0x00 0x20 0x65 0x52 0x02 0x00 0xF1 0xC0 0x00 0x00 0xCB 0x51 0x02 0x00
0x00001010        0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00 0x00 0x00 0x00 0x00
0x00001020        0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xF1 0x52 0x02 0x00
0x00001030        0xF1 0xC0 0x00 0x00 0x00 0x00 0x00 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00
0x00001040        0x59 0x53 0x02 0x00 0x5F 0x53 0x02 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00
0x00001050        0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00
0x00001060        0x65 0x53 0x02 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00 0x6B 0x53 0x02 0x00
0x00001070        0xF1 0xC0 0x00 0x00 0x71 0x53 0x02 0x00 0x77 0x53 0x02 0x00 0x7D 0x53 0x02 0x00
0x00001080        0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00
0x00001090        0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00
0x000010a0        0xF1 0xC0 0x00 0x00 0x83 0x53 0x02 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00
0x000010b0        0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00
0x000010c0        0x89 0x53 0x02 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00
0x000010d0        0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00
0x000010e0        0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00
0x000010f0        0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00 0xF1 0xC0 0x00 0x00

Verify

To verify the contents of one or more files are present in the targets memory

C:\> "C:\Program Files\NoSMD\SWorD\bin\SWorDProgrammer.exe" -verify:test.elf,uicr.json -probe:rpi4programmer

Troubleshooting

Can’t locate the named programmer on the network

Try the application with locate to see if it reports any programmers on the network.

Is the firewall blocking discovery messages. Try to disable it or allow the application access to the network.

Try connecting using the programmers IP address instead of its name.

Check the programmer server is running on the RPi.

Can’t connect to the programmer using either its name or IP address

Check the programmer server is running on the RPi.

%d bloggers like this: