What do I need for development for an ARM processor?

claws picture claws · Apr 16, 2010 · Viewed 11.6k times · Source

I'm familiar with X86[-64] architecture & assembly. I want to start develop for an ARM processor. But unlike desktop processors, I don't have an actual ARM processor. I think I need an ARM simulator.

http://www.armtutorial.com/ say

An ARM assembly compiler will be required, the most accessible is the ARMulator.

I thought of downloading Armulator but found from http://forums.arm.com/index.php?showtopic=13744 that

Its not sold seperately. But you can download an eval of RVDS - which includes RVISS/ARMulator

I've downloaded & installed RVDS but It looks very complex. I'm unable to figure out what do I need to do to write ARM assembly & run it.

Do you have any better suggestions?

Answer

Mads Elvheim picture Mads Elvheim · Apr 16, 2010

Options for environments

  • Install Linux in the QEMU system emulator. It can emulate a variety of ARM-based chipsets.
  • Get an emulator for a specific ARM-chipset like a game handheld. Gameboy Advance is fun to play with. NoCash GBA and VisualBoy Advance are two great GBA emulators.

Toolchains

You will need a toolchain. A toolchain is a collection of low-level tools like an assembler, a linker, a compiler, an archiver and a bunch of other usefull stuff. Even more, you want a cross-toolchain, which means that the toolchain runs on one system, but builds executables for another architecture. This way you can build applications that run on ARM-devices, but on your x86-based PC. It's faster and more convenient.

If you run Windows, DevkitPro is a fairly good choice. For Unix/Linux/BSD variants, you have CodeSourcery's free toolchains, and the GCC toolchain from gnuarm.com. There are several others, but you don't need more options.

Documentation

Get the specification for your ARM CPU of choice at infocenter.arm.com. One reference you need no matter the CPU is the ARM Architecture Reference Manual (Often abbreviated ARMARM). I'm hosting an older version, which covers the ARM architecture and instruction set version up to ARMv4T, here, but you will find the current and later versions on infocenter.arm.com as well. If you go for GBA, notice that the CPU is an ARM7TDMI, with the instruction set version ARMv4T.

The ARMARM contains tips and examples for usual nitty-gritty system coding, tips on how to proceed on certain design issues, as well as a reference of both the ARM instruction set, Thumb instruction set and co-processors like MMUs, MPUs, DSPs and FPUs.

If you stick with QEMU, that's pretty much all you need, since the Linux kernel handles everything. QEMU also has user-mode emulation (with a C-library stub). If you go for one of the GBA emulators, here's a nice reference over the GBA hardware and hardware registers: CowBiteSpec. Also make sure to check out http://www.gbadev.org/.

Nintendo DS is probably an option as well, but I don't know of any decent emulators for that handheld yet. Good luck to you :-)

EDIT: Here's a trivial example of some GBA code I wrote years ago: GBA Color fill 240x160 16-bit example