FAQs for JTAG-ARC


The embedded tools company

Search FAQs



PDF document ( 61KB / 07-Sep-2016 )


TOP

Emulation debug port fail (ARC)

Ref: 0332
I've received the error message "Emulation debug port fail". What has happened?

"emulation debug port fail" can happen with TRACE32 for ARC under the following circumstances:
  • Stopping the core on SYStem.UP failed, because the core does not stop even after 1000ms.
    Try SYStem.Mode Attach instead of SYStem.Mode Up
  • The JTAG Status Register of the ARC debug interface reports an error, by showing the Failure-Bit active.
    Try a lower JTAG frequency (e.g.: SYStem.JtagClock CTCK 1MHz ). Check your core.
  • A read or write transaction to/from the ARC core does not complete. The JTAG Status Register does not show the Ready bit after waiting for 1000ms and even not after re-initializing the read/write-transaction and waiting for. (Timeout) Try a lower JTAG frequency (e.g.: SYStem.JtagClock CTCK 1MHz ).
    Disable or disconnect any external source which resets the ARC core frequently (like e.g. a watchdog timer).


TOP

MetaWare Hostlink Library (ARC)

Ref: 0380
Why does PowerView open a TERM.GATE window automatically?

Since TRACE32 build 18086, PowerView opens a TERM.GATE window automatically when your target application would hang otherwise.
This might happen by mistake when you've created a symbol named __HOSTLINK__ by your own.

By default the MetaWare® C/C++ Compiler adds the MetaWare hostlink library. This hostlink library enables your target application to communicate with the host PC running the debugger for e.g. doing a "printf".

When a target application is compiled with the MetaWare hostlink library, it will always go in a polling-loop before going to the main() routine to fetch argc/argv from the host PC. Without a debugger interacting with the target memory the target application would hang in this loop forever.

To support the MetaWare hostlink library you have to execute the following two command in PowerView (after loading your ELF file):
    TERM.METHOD METAWARE
    TERM.GATE
When starting your target application with GO, PowerView checks if your ELF file contains the magic symbol called __HOSTLINK__ , which usually indicates that you are using the MetaWare hostlink library. If this magic symbol is there but a suitable TERM.GATE-window is not yet open, PowerView opens the window automatically.
Thus, PowerView might have opened TERM.GATE when you are not using the hostlink library but has created a symbol named __HOSTLINK__ by your own.

What can you do to avoid an automatically popping up TERM.GATE-window?
  • Open the window on purpose after loading your ELF file by using the commands TERM.METHOD METAWARE and TERM.GATE .
  • Remove the MetaWare hostlink library from your target application by linking it with the compiler switch "-Hhostlib=" with nothing after the equals sign (=).
  • Rename symbol __HOSTLINK__ in your target application.
  • Rename symbol __HOSTLINK__ in the debugger after loading the ELF file with e.g.
    sYmbol.Modify.NAME __HOSTLINK__ __HOSTLINK-OFF__

See also: "MetaWare® C/C++ Programmer’s Guide for ARC®"

TOP

MetaWare Hostlink Library (ARC)

Ref: 0381
My target application never reaches the main() function. What's up?

By default the MetaWare® C/C++ Compiler adds the MetaWare hostlink library. This hostlink library enables your target application to communicate with the host PC running the debugger for e.g. doing a "printf".

When a target application is compiled with the MetaWare hostlink library it will always go in a polling loop before going to the main() routine to fetch argc/argv from the host PC. Without a debugger interacting with the target memory the target application would hang in this loop forever.
However TRACE32 for ARC build 17699 an earlier (before Apr.2009) does not support the MetaWare hostlink library.

What can you do?
  • Update your installation of TRACE32 for ARC.
  • Remove the MetaWare hostlink library from your target application by linking it with the compiler switch "-Hhostlib=" with nothing after the equals sign (=).
  • If you are using TRACE32 for ARC with a buildnumber within the range (17699 < build < 18086) please execute the commands TERM.METHOD METAWARE and TERM.GATE after loading your ELF file.

Please consider that there might be lots of other individual reasons, why your target application never reaches the main() function.

TOP

Viewing auxiliary registers (ARC)

Ref: 0275
How can I see the auxiliary registers?

The auxiliary register space is accessible in PowerView via the special memory class "AUX".
To view the registers simply type:
    data.dump AUX:0
For any ARC700 core lots of registers will be displayed with ???????? , which means that those registers are inaccessible, because they are not present at your core.
For ARC600 and older cores unimplemented auxiliary registers normally show the same value than the IDENTITY register.

The most common auxiliary register are also shown in the peripheral view. Open the peripheral view with the command PER .

TOP

Viewing member variables in C++ methods (ARC)

Ref: 0367
How can I see member variables in C++ methods without using the 'this' pointer?

Adding a member variable to the watch window without an object name should show a usefull value, when you are debugging a method/function of the desired object (like local variables).
However at least MetaWare compiler 8.5 and earlier do not mark its code as C++ code. As a result TRACE32 does not search for the 'this' pointer.

Solution:
Update TRACE32 to build 27455 or higher and load your ELF with /CPP option
or update your MetaWare compiler to a version witch addresses this issue.

Workaround:
Always explicitly use 'this->' in the watch window.





Copyright © 2016 Lauterbach GmbH, Altlaufstr.40, D-85635 Höhenkirchen-Siegertsbrunn, Germany  Impressum
The information presented is intended to give overview information only.
Changes and technical enhancements or modifications can be made without notice. Report Errors
Last generated/modified: 22-Sep-2016