Document number
205065
Version
Rev. N
Issue date
2019-02-04
Sirius OBC and TCM User Manual
Page
19
of
174
using the autocreated path at
/dev/serial/by-id/
. The debug UART is identified as
usb-AAC_Microtec_JTAG_Debugger_FTZ7QCMF-if01-port0
, where
FTZ7QCMF
is
the serial number in this case. Make sure you use the
if01
number and not
if00
as this is
consumed by the OpenOCD server later.
3.5.3. Loading an application
An application can either be loaded only to the volatile memory, which is easier and typically
used during the development stages, or to NAND flash (see section 3.6). This is done using
gdb.
1.a) Start gdb with the following command from a shell for a bare-metal environment
or1k-aac-elf-gdb
or
1.b) Start gdb with the following command from a shell for an RTEMS environment
or1k-aac-rtems4.11-gdb
2. When gdb has opened successfully, connect to the hardware through the
OpenOCD server using the gdb command
target remote localhost:50001
3. To run an executable program in hardware, first specify its name using the gdb
command file. Make sure the application is in ELF format.
file
path/to/binary_to_execute
4. Now it needs to be uploaded onto the target RAM
load
5. In the gdb prompt, type
c
to start to run the application
3.5.4. Using multiple debuggers on the same PC
In order to use multiple debuggers connected to the same PC, each instance of OpenOCD
must be configured to connect to the specific debugger serial number and to use unique
ports. Support for this is included in the run_aac_debugger.sh script.
In order to determine the serial number for a specific device, run the following command
before connecting the debugger
sudo tail -f /var/log/kern.log
which initially prints the last 10 lines of the kernel log file (which can be ignored). When
plugging in the debugger USB cable into the PC, this should produce new output similar to
[363061.959120] usb 1-1.3.3.3: new full-speed USB device number 15
using ehci_hcd
[363062.058152] usb 1-1.3.3.3: New USB device found, idVendor=0403,
idProduct=6010
[363062.058176] usb 1-1.3.3.3: New USB device strings: Mfr=1,
Product=2, SerialNumber=3
[363062.058194] usb 1-1.3.3.3: Product: JTAG Debugger
[363062.058207] usb 1-1.3.3.3: Manufacturer: AAC Microtec
[363062.058220] usb 1-1.3.3.3: SerialNumber: FTZ7QCMF