ARM development environment on Ubuntu
Contents |
Arm development and test environment on Ubuntu can be set up the following way. We will need the cross-chain tools and libraries for compilation and emulation
This was tested on Ubuntu 22.04
sudo apt-get install gcc-arm-linux-gnueabi linux-libc-dev-armel-cross qemu-user
For the gdb-multiarch debugger:
sudo apt-get install gdb-multiarch
You may find the following tools useful as well, but the chances are you have them already:
sudo apt-get install build-essential binutils gcc git ddd
Usage
Let us compile a program myprog.c for ARM Xscale processor, like so:
arm-linux-gnueabi-gcc -g -mcpu=xscale -O0 -Wall -o myprog.o -c myprog.c arm-linux-gnueabi-gcc -o myprog myprog.o
Now we can run the new ARM program in the qemu emulator
qemu-arm -L /usr/arm-linux-gnueabi myprog
The parameter -L may be required to find the needed libraries for the ARM platform