Thursday, 4 March 2010

Fedora ARM in qemu

First attempts with Fedora Arm running in qemu on Linux Mint 8.

The picture below (click to enlarge) shows a small c file in the Vi editor, with one line of inline ARM assembler (a NOP instruction) and a puts statement which puts hello on the screen so that you can see something has happened.

Instructions on how to get Fedora ARM running in Qemu are here:-

The file above is saved as test.c, and compiled with:-  gcc test.c
the resulting file is called a.out, run it with ./a.out to see 'hello' appear on the screen.
There are numerous options which can be applied at compile time.
If you do not want the output file to be called a.out, use gcc -o myoutputfile test.c
the -g option will produce debugging information for the gdb debugger to use.
See the gcc manual for all options.

as you can see below, a.out does not run,
./a.out is required.

using a terminal on the desktop and trying to compile test.c outside of the emulator. This causes an error indicating that ARM assembler instructions are not acceptable to the X86 compiler.
This is expected behaviour. A cross compiler would be needed to compile for ARM on a PC.

Wednesday, 3 March 2010

ARM (assembler) programming reference material