I'm evaluating the ARM DS-5 and Linaro toolchains and the FVP model simulators. I'm starting with the DS-5 Community Edition and the Foundation Profile simulator before advancing to the commercial tools. So I have a few questions:
http://releases.linaro.org/latest/members/arm/openembedded/aarch64/linaro-image-lamp-genericarmv8-20150522-752.rootfs.tar.gz does include gdbserver. It appears to be a tarball for an ARM64 OS image. I'm looking for a toolchain that I can use to cross-compile ARM64 executable on Ubuntu that can then run on Foundation Model.
I've also looked at the Linaro GCC binaries, e.g. http://releases.linaro.org/14.11/components/toolchain/binaries, but they have links to non-standard (probably internal) directories or pathnames.
Am I missing something here? Should I be focusing on the Community Edition of DS-5 instead of the Linaro GCC toolchain?
Hi,
Although it is possible to use the Foundation model to do bare-metal application development,as Rob has said the lack of debug access will make it pretty difficult.
Hence the recommendation to use Linux instead to get a more debug-friendly environment.
1. boot the Linux image you want.
For this you need to follow Linaro instructions from http://releases.linaro.org/latest/members/arm/openembedded/aarch64
To get gdbserver, you will need to use the lamp image. You can directly use the pre-built image: http://releases.linaro.org/latest/members/arm/openembedded/aarch64/vexpress64-openembedded_lamp-armv8-gcc-4.9_20150522-7… (just unzip it), or build it again from the tarball you have found with linaro-media-create:
linaro-media-create --dev fastmodel --output-directory fastmodel --image_size 2000M --hwpack hwpack_linaro-vexpress64-rtsm_20150522-720_arm64_supported.tar.gz --binary vexpress64-openembedded_lamp-armv8-gcc-4.9_20150522-720.img.gz
2. Build your application with the cross-compilation tools.
I am not quite sure what you mean by
"I've also looked at the Linaro GCC binaries, e.g. http://releases.linaro.org/14.11/components/toolchain/binaries, but they have links to non-standard (probably internal) directories or pathnames.", the toolchain is supposed to be self-sufficient.
The most useful toolchain (unless you are trying to compile big-endian code or not tagerting Linux) is going to be: http://releases.linaro.org/14.11/components/toolchain/binaries/arm-linux-gnueabihf/gcc-linaro-4.9-2014.11-x86_64_arm-lin…
Then extract this archive. This will contain a standalone toolchain.
If you are only using C code, you can easily modify your makefile to use this toolchain rather than the DS-5 one by
- adding the <linaro toolchain install folder>/bin/ to your path
- changing armcc to arm-linux-gnueabi-gcc
If there are assembly files and linker scripts (such as scatter files), they will require some porting.
3. Get your cross-compiled application to the target. The easiest way to do it is to use the network.
You can do that by following the instructions from the bottom of this page:
http://releases.linaro.org/latest/members/arm/openembedded/aarch64
The NAT approach is less intrusive, but you will need to also map the ports you want to use. For ssh to work, you will need to add this option:
--network-nat-ports=8022=22
Then transfer the application with ssh:
scp <your_app> root@<ip_foundation_model>:/home/root -P 8022
Then run the application from the Foundation model terminal.
If you want to use DS-5 once you have done the previous steps, you can follow the instructions from here:
ARM DS-5 Debugger User Guide : 2.3 Configuring a connection to a Linux target using gdbserver
One important thing to remember is that Linaro procedures and images are likely to change from time to time, you should always refer to Software Downloads at Linaro to get the most up-to-date images and instructions.
I hope this helps,
Regards,
Simon
Thanks, I'll go through your notes now. I'm new at this, so I'll definitely
take your advice to use Linux instead of baremetal.
Just to note, the cross compiler Simon linked is for ARMv8-A AArch32 / legacy ARMv7 code generation. You'll need a different one to compile ARMv8-A AArch64 code. They're slightly older (2 months) than the 14.11 releases linked earlier, but you can check here for binaries that will run on both Windows and Linux (the 14.11 ones linked earlier come prebuilt only for Linux).
Namely, the binary you will want is this one on a Windows host, or this one on a Linux host.