FAQs for BDM-MICROBLAZE


The embedded tools company

Search FAQs


TOP

Connection to Target Fails (MICROBLAZE)

Why does the connection to the target fails?

When connecting to XILINX targets be sure to use a recent version of the debug cable (see picture).
With the old version of the debug cable target connection will fail or be unreliable.

TOP

Fail of Single Stepping (MicroBlaze)

Single stepping sometimes fails with MB V4.00.a, MB V5.00.A. What can I do?

In MicroBlaze V4.00.a, V5.00.A there is a hardware issue that can lead to erroneous single stepping behavior. Solution: update to TRACE32 from December 2006 or later. This release works around the problem.

TOP

FPGA configuration via TRACE32 (MicroBlaze)

FPGA configuration via TRACE32 fails but works with Xilinx Impact

In one case it was observed, that FPGA configuration worked with Xilinx Impact but failed with TRACE32. In this case the target had been set up for FPGA configuration via SPI. This implies the possibility to override the configuration via JTAG.

After jumpering the target for "JTAG dedicated" configuration, downloading the bitstream via TRACE32 worked fine. Note that in the failing case the download failed silenty i.e. jtag.loadbit did not report an error.

In general be sure to set multicore pre/post parameters before configuring the FPGA with identical values as used for debugging.

TOP

Generating correct debug info (MicroBlaze)

Why are local variables displayed incorrectly?

When compiling MicroBlaze applications for debugging them with TRACE32, be sure to use the correct compiler options. The option "-g3" and DWARF2 debug info are recommended.

Note: The option "-g" creates debug info that is mostly intended for GDB and does not work well with TRACE32. The debugger will no be able to correctly display local variables, stack back trace etc.

TOP

Go.Up Command Fails (MicroBlaze)

Why does the Go.Up command fail inside interrupt handlers?

The Go.Up command (function key F6) may fail inside an interrupt, exception or break handler that is called via the brk or brki instructions. Use go.return to get to the end of the handler routine and leave it via step.asm until the PC is back in the interrupted routine.

TOP

Loading C++ programs (MicroBlaze)

I have problems loading C++ programs for Microblaze. Which parameters do I need?

For loading C++ programs for Microblaze that were generated with the Xilinx Tool chain use the Data.Load.ELF command with the parameters /cygdrive /gcc3 /gnucpp

In some cases it is necessary to execute the symbol.cleanup command (no parameters) after loading the .elf file.

Example:

d.load.elf filename.elf /cygdrive /gcc3 /gnucpp

TOP

MC Settings Calculation (MicroBlaze)

How are multicore settings calculated?

For a description of how to calculate multicore settings (PRE/POST values) for MicroBlaze cores see the application note "Connecting to MicroBlaze Targets for Debug and Trace" (app_microblaze.fm)

TOP

MicroBlaze spontaneously stops while debugging interrupts (MICROBLAZE)

MicroBlaze spontaneously stops while TRACE32 is attached

In some configurations of MicroBlaze using interrupts it was observed, that the core stopped without apparent reason, if TRACE32 was attached. Without the debugger, the program runs OK.

Apparently this is because MicroBlaze′s mechanism for polling the run state can fail when the core takes an interrupt.

To work around the problem, move the SW break vector to an address far away from the interrupt handler (0x10) e.g. to the address 0x40. The distance should ideally be 24 bytes or more.

sys.o.BRKVECTOR 0x40 ; Attention: set this _before_ SYStem.UP

TOP

No Source Code shown on Xilinx Targets (MICROBLAZE)

Virtex: after loading an ELF file (PPC or Microblaze) to the target, no source code is displayed. Why?

The Xilinx compilers from the EDK operate inside a Cygwin environment and therefore create debug information with non-standard path names. Use the option /cygdrive when loading these ELF files: data.load.elf eventgen_ppc/executable.elf /CYGDRIVE

TOP

On-chip Data Breaks with unaligned Memory (MicroBlaze)

Why are the on-chip databreaks unaligned with memory?

There is a (mostly theoretical) problem with the on-chip breakpoint implementation in MBV4, MBV5 related to unaligned memory accesses. A "sw" or "lw" instruction (store word, load word) writing/reading address 0x2003 will automatically word-align its address to 0x2000 before executing. However, an on-chip breakpoint set at 0x2000 will _not_ detect this access. The case is largely theoretical because the MB compiler does not create this kind of access. If necessary, the problem can be worked-around by using an address range for the OnChip as in "break.set 0x2000--0x2003 /read". (Note the "--" double minus for range specifiation).

TOP

On-chip Databreak Problem (MicroBlaze)

MB V4.00.a: OnChip Data Breaks do not work as expected

Microblaze MB V4.00.a has a hardware issue that affects use of on-chip breaks. When specifying a read or write data value, the OnChip break logic does not consider the width of the access. Therefore avoid using the /data.byte, /data.word, /data.long options. Simple read/write on-chip breaks that do not specify a data value work.
The hardware issue is fixed in MB V5.00.b.

TOP

Problems with Source Code Display (MicroBlaze)

Why does not the debugger display the source code associated with my program?

The Xilinx Microblaze compiler is based on the GNU GCC and the Cygwin toolset. Therefore file paths in the debug information in the .ELF file are generated in a non-standard form e.g. as /cygdrive/c/sample instead of
    c:/sample.
Use the option /CYGDRIVE for enabling automatic path conversion:
    Data.LOAD.ELF MBSample/sample.elf /CYGDRIVE


TOP

Setting Register R0 fails (MicroBlaze)

Why does the setting of register R0 fail?

The architectural register R0 in Microblaze is hardcoded to 0. Therefore changing the register value to other values will fail.

TOP

Software Breakpoints or Single Stepping fail with ucLinux (MicroBlaze)

Why do software breakpoints or single stepping fail with ucLinux for MicroBlaze?

Because the initialization code for ucLinux overwrites the breakpoint handler, single stepping and software breakpoints will fail after starting the ucLinux kernel.
Use the command
SYStem.Option BrkVector 0x70
to specify an alternative location for the breakpoint handler.

TOP

Target Connection (MicroBlaze)

How should I connect the target? Why does connection to ML310 fail?

For connecting to the target use the included adapter together with the debug cable. The adapter plugs into the 14-pin connector of the target board. This port is also used to configure the FPGAs via the Xilinx download cable and often labelled as "FPGA&CPU Debug" or "PC4 JTAG".
For debugging Microblaze on Xilinx EVB ML310 always use the "PC4 JTAG" connector. The "CPU JTAG" connector will not work.
NOTE: Even though Microblaze and PPC405 use the same debug cable there is a difference regarding target connections: Microblaze cores are always debugged via the 14 pin header, whereas PPC405 cores (embedded in some Xilinx FPGAs) are occasionally accessed via other connectors.

TOP

Trace Interface for MicroBlaze (MicroBlaze)

Is there a trace interface for Microblaze cores?

Lauterbach supports a real-time trace for the Xilinx MicroBlaze core up to MicroBlaze V7. The trace provides up to 512MB of external high speed trace memory, which is used instead of scarce on-chip memory resources for storing the trace information. Features included are: program flow and data trace as well as statistical analysis of function and task run-times, variables access, code coverage and more.

TOP

XPS demo applications do not work (MICROBLAZE)

 

Many of the demo applications generated by the XPS (Xilinx platform studio) give feedback via printf(). Therefore be sure to open a terminal window in TRACE32, otherwise the application will appear to fail working, because it is blockes waiting for the debugger to read the output data. Use the following sequence to open a terminal window
term.res              ; be sure to reset terminal functionality
term.method mdmuart
term.size 110. 1000.  ; make T32 poll the target for text output
term.gate


TOP

No Source Code shown on Xilinx Targets (PPC440)

Virtex: after loading an ELF file (PPC or Microblaze) to the target, no source code is displayed. Why?

The Xilinx compilers from the EDK operate inside a Cygwin environment and therefore create debug information with non-standard path names. Use the option /cygdrive when loading these ELF files: data.load.elf eventgen_ppc/executable.elf /CYGDRIVE



Copyright © 2012 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.
Last generated/modified: 1-Feb-2012