Sytstem-On-a-Chip (SoC)

A number of courses use ARM-based SoC systems. This page provides general information and links related to the use of these devices.

ARM-based System-On-a-Chip

BeagleBone Black

BeagleBone Black ARM CPU Specification

Raspberry Pi ARM CPU Specification

Raspberry Pi Broadcom Board Specification

Direct-connect the Pi to your laptop

ARM Assembly

We will be writing assembly programs for the ARMv7 architecture. The gcc compiler suite includes an architecture-dependent assembler named as for translating assembly code to machine code. "Architecture-dependent" means that gcc installed on an x86-based Mac running OS/X would generate x86 machine code. The easiest path to development then, is to use gcc and as on the ARM-based system-on-a-chip (SoC). However, you are free to experiment with installing cross-compilers and hardware emulators on a different development platform. Keep in mind that I will be testing your code on actual hardware (i.e., my SoC).

To use the assembler you:

  1. Write a program in assembly code in a file with a .s suffix (e.g., foo.s)
  2. Translate and assemble your code using gcc:
    $ gcc -o foo foo.s
    Alternatively, you can run the "assembler" explicitly using as to translate your program and produce an object file and then use gcc for final assembly into an executable:
    $ as -o foo.o foo.s
    $ gcc -o foo foo.o
    
    Note that without the -o flag the default output file from gcc is named a.out in both examples. While gcc will generate an executable program, as merely generates an "object" file that must subsequently be linked into an executable using gcc.

Chapter 1 of a great ARM Assembly tutorial - note that this tutorial assumes ARMv6; ARMv7 includes integer division instructions.

Writing ARM Assembly

ARM Assembly Quick Reference - we'll use a relatively small subset of these instructions.


Last modified: , by David M. Hansen