Changes

Jump to: navigation, search
Introduction
(1) The techniques described in this chapter apply to the ''Example #1: HelloWorld'' FreeRTOS application (please refer to section TBD).
 
===Prerequisites===
LA-3500 Power Debug USB3 or LA-7705 Power Debug Ethernet or LA-7699 PowerDebug II
LA-7843 JTAG Debugger for Cortex-A/-R
LA-7960X License for Multicore Debugging
TRACE32 PowerView for ARM (Release: Feb 2013, Software Version: R.2013.02.000045901)
Optional: LA-7970X Trace License for ARM (Debug Cable)
For a general introduction to debug features provided by TRACE32 tools, please refer to:
“Debugger Basics – Training” manual (training_debugger.pdf)
“Training HLL Debugging” manual (training_hll.pdf)
===TRACE32 configuration===
In AMP configuration, each core runs a unique code, already fixed at compile time. The CPU interoperates with other processing units, exchanging data through dedicated channels (for example, shared memory buffers or peripheral units). Lauterbach supports these architectures with different TRACE32 instances, each one connected to a single core, in “core view” configuration where debug focus is on single processor.
However, as the cores do not work independently but perform the application task together and in parallel, it is possible to start and stop all the cores simultaneously. This is the only way to test the interaction between the cores and to monitor and control the entire application. Moreover, as each core run a separate part of the application, the majority of the symbol and debug information is assigned exclusively to the corresponding core.
In the following paragraphs, the basic TRACE32 multicore configuration for a single device will be introduced. For more details, please refer to “ICD Debugger User's Guide” (debugger_user.pdf).
====Multicore configuration====
For the configuration of TRACE32 application, reference scripts are provided from Lauterbach. The first GUI must be started manually and must register itself to share a common JTAG handler with other TRACE32 applications. This is done setting the option CORE= in the configuration file (default file name: config.t32).
PBI= ; within config file of first core
USB
CORE=1
 
or:
 
PBI= ; within config file of first core
NET
NODE=<IP_address>
PACKLEN=1024
CORE=1
Nevertheless, the setting to define which core is addressed, actually is done later on.
====Multicore synchronization====
To use the start/stop synchronization between different core debuggers, the INTERCOM port settings are necessary. This is done assigning predefined port numbers in the configuration file to each TRACE32 application (option PORT=).
IC=NETASSIST ; within config file of first core
PORT=20001
 
IC=NETASSIST ; within config file of second core
PORT=20002
===Startup scripts===
In order to use a generic configuration file for each TRACE32 instance, there is the possibility to use just one generic template file for all cores. The particular settings are passed as parameter. This is shown in the reference script:
amp_start_core0.bat
which refers to the configuration file:
amp_config.t32
The batch file starts automatically this startup script:
amp_demo.cmm
After booting the first TRACE32 GUI, the second GUI will be started automatically by the startup script. See the reference script:
amp_demo_start_core1.cmm
For more details about PRACTICE batch language, please refer to:
“Training PRACTICE” manual (training_practice.pdf)
“PRACTICE Script Language User´s Guide” (practice_user.pdf)
“PRACTICE Script Language Reference Guide” (practice_ref.pdf)
====PRACTICE macros for multiple TRACE32====
The startup script, started automatically at the first TRACE32 application, is fully able to configure the whole debug system, providing PRACTICE commands both to the current instance of TRACE32 application, and to the second instance. It’s also possible to deliver the same PRACTICE command to both instances with a single command line. The command redirection is possible using the INTERCOM feature. Typically some PRACTICE macros can be defined for this purpose.
&core0="" ;only to improve readability
&core1="intercom localhost:&intercomport_core1"
&both="GOSUB intercom_both "
where:
intercom_both:
LOCAL &param
ENTRY %Line &param
&core0 &param
&core1 &param
RETURN
In this way, all CPU-specific configuration commands can be performed in the same way for each TRACE32 application, or distinguishing between different configurations. For example:
&both SYStem.RESet
or:
&core0 SYStem.CPU ZYNQ-7000CORE0
&core1 SYStem.CPU ZYNQ-7000CORE1
====The SYnch command====
The synchronization between different TRACE32 applications is done by SYnch command group, which allows the following purposes:
to establish a start/stop synchronization between the cores controlled by different TRACE32 instances;
to allow concurrent assembler single steps between the cores controlled by different TRACE32 instances;
to allow synchronous system mode changes between the cores controlled by different TRACE32 instances.
== Related documents and additional resources ==
4,650
edits

Navigation menu