-
Navigate to the test folder
cd socitrack/software/firmware/tests
-
Clean up the old builds
make clean
-
Program the device ID (using
ff
as an example here)make ID=c0:98:e5:42:00:ff UID
-
Program the test firmware (available BOARD_REV for apollo4 based TotTag:
EVB
,I
,K
,L
, see the revision letter on the side of the TotTag name on the board; for the list of available tests, see the makefile)
#test individual peripheral
make ranging_radio BOARD_REV=EVB
#test the full app
make full BOARD_REV=M
With the JLink debugger connected, run the following command.
jLinkSWOViewerCL -swoattach 1 -swofreq 1000000 -device AMA4B2KP-KBR -itmport 0x0
You should be seeing the debugging messages coming after that.
JLinkExe -Device AMA4B2KP-KBR -if SWD -speed 4000 -RTTTelnetPort 9201
Then in the JLink interface, use command r
and g
to reset the device.
When the device is reset without restarting, the RTC value would not get lost.
-
In one terminal tab, run the following command to start the GDB server
JLinkGDBServer -if swd -device AMAP42KK-KBR -endian little -speed 1000 -port 2331 -swoport 2332 -telnetport 2333 -RTTTelnetport 2334 -vd -ir -localhostonly 1 -singlerun -strict -timeout 0
-
In another terminal tab, navigate to the
bin
folder with the compiled filescd socitrack/software/firmware/tests/bin
-
invoke the GDB debugger
arm-none-eabi-gdb
-
With the GDB debugger starting, load the
.axf
file and start the testfile TestRangingRadio.axf target remote localhost:2331 load mon reset 0