Using the ARM Realview Versatile VP in the cloud with your own software

9 views
Skip to first unread message

AchimNohl

unread,
Apr 7, 2010, 7:29:27 PM4/7/10
to Virtual Platform-Users
Hi all,

I have been asked this question a couple of times recently. So, I
decided to post the info here.

Starting from Scratch
=====================
The Virtual Platform Analyzer has been configured for the provided
skins in a way that the Linux/Android can be debugged and analyzed
efficiently. However, for other operating systems or software images
this setup may not be helpful. Therefore, I quickly want to explain
how to start a simulation with your own software images really from
scratch.

1. Open a terminal console from "Applications->System Tools->Terminal"
2. "cd ARM926EJS-CoWareVP-VersatilePB-QuadCore-1.20"
3. Set up the environment using "source setup.sh"
4. Set the license "export LM_LICENSE_FILE=7790@localhost
5. Launch Virtual Platform Analyzer using vpa &.
6. From the menu bar, select "Simulation->Start".
7. Select "/home/demo/ARM926EJS-CoWareVP-VersatilePB-QuadCore-1.20/
simulation/sim" for the simulation image
8. Push Start and connect. The simulation gets launched.

For more details, see the Virtual Platform Analyzer and User’s Guide
(PA_VPAnalyzerGuide.pdf).


Compiling your own Code
=======================
You can download your own images from the VP in the cloud e.g. through
ftp. Also, you can just use a pre-installed arm-gcc compiler to build
your own elf images. You can find the gcc in "/home/demo/ARM926EJS-
CoWareVP-VersatilePB-QuadCore-1.20/other/vanilla/tools/arm-eabi-4.2.1"


Figuring out the Memory Map
===========================
Before putting images into the memories, you need to know the
addresses/locations. Therefore, the memory map can be easily obtained
from Virtual Platform Analyzer via: Right-click on the hardware
hierarchy item HARDWARE and from the pop-up menu, select Open in
Memory Map View and choose the master from which you want to see the
memory map.


Loading your Images
===================
All memories listed in Table 12 provide a Tcl command mem_load to load
binary image files, as shown by the examples given in the following
instructions.

BOOT_0 mem_load path/bootImage
SSMC_0 mem_load path/anotherImage
MPMC_1 mem_load path/yetAnotherImageWithOffset 0x1000

Note:
- All four cores start executing their code at address 0.
- BOOT_0, BOOT_1, BOOT_2, BOOT_3 are accessed by i_ARM926EJS_0 to 3
- You can stall un-used cores by either loading an image that put the
core into idle, or by using the TCL command stall. E.g. i_ARM926EJS_1
stall
- Important: You should not forget about the above thing for "un-used"
cores
- The offset is within the particular memory


Loading and Relocating Symbol Files
===================================

Each core can have its own collection of symbol tables organized in so-
called symbol-table sets. A default symbol-table set is always active
and can be used to load symbols. The command load_symbols, which is
available on each core, allows to load a symbol file or list of file-
name and offset pairs. If an offset is used, this offset is added to
each symbol. The following instructions provide examples:

i_ARM926EJS_0 load_symbols /home/demo/MyHelloWorld.elf
i_ARM926EJS_0 load_symbols [list [ list $fileName $offset ]]


Now you should be able to run and debug your software image. If you
have compiled it with "-g", you can just open a DDD using a right
click on the core in the hierarchy and choose "Launch DDD".

Let me know if you have questions...

Best regards,
Achim

Reply all
Reply to author
Forward
0 new messages