next up previous
Next: Acknowledgements Up: Useful EDK and Multimedia Previous: Tutorial Modules

Subsections


Bugs and Workarounds in EDK 6.3 SP1

These are issues that we have found and workarounds that seem to work.

Entering addresses using Add/Edit Cores in Solaris version

When a new core is added to the system, it is not possible to specify the size on the Addresses tab for the new core. You can only select Unspecified.

The solution is to edit the system.mhs file and set the C_HIGHADDR parameter for the appropriate block.


Using GDB

In Module m03 you are asked to use the GDB GUI to control your program. This does not work too well in this version. Use the following steps to get it running:
  1. Ensure that you are using the xmdstub.
  2. Manually set the program start address to 0x500 under Compiler Options->Environment->Program Start Address. The linker is incorrectly assigning the default program start address to 0x400. This was okay in 6.2 but downloading using XMD now complains if the program starts there. The 6.3 XMD probably got bigger.
  3. If you want to look at the C code during debugging, you must enable debugger options (-g) and disable the optimizations.
  4. Close any open debuggers/xmd windows.
  5. Download the bitstream to the FPGA.

    You don't always need to reload the bitstream, as flipping the reset switch will reset the MicroBlaze. However, there is a catch: if the MicroBlaze has gone off and started executing code in some unknown region (lost in the grass), then some of these "instructions" may have overwritten the xmdstub. In this case, the reset switch will not be sufficient. Redownloading the bit stream is a guaranteed fix, but the reset switch option can be used at your own peril.

  6. Launch XMD and download the mb0_default/executable.elf. Do not attempt to run the program from XMD as this will just mess up the debugger.

    In other words, after you have used XMD to download the program, if you type run and then stop (or just wait for the program to complete), when you connect to the debugger and then try to "run" the program in the debugger, it will not work - even if you only use the next/step commands.

    Even if you have marked the mb0_default application for download to the BRAM, you must still do this step. Otherwise, XMD will not be able to identify that the executable is indeed there. Many students are not doing this step.

  7. Launch the debugger. Connect to the target. You will probably see a bunch of assembly code. Click the "next" or "step" buttons to get to the start of your program. The continue button should only be used in conjunction with a breakpoint, i.e. don't click continue if there isn't a breakpoint to halt execution - otherwise it's the same as hitting the run button and you end up with problems. Limit the number of your breakpoints (2-3 max) as it does not always work if you have more.

    Many students are clicking Run. This is because, if they do not download the executable in Step 6, the Continue option will not be available.

  8. You should now be able to debug as you wish.


next up previous
Next: Acknowledgements Up: Useful EDK and Multimedia Previous: Tutorial Modules
Paul Chow 2012-01-11