Sunday, 29 August 2010

ARM Programming tutorials

When trying to get started with Single board computers (SBC), System on module (SOM) and system on Chip (SOC), I found it difficult to track down good resources or tutorials.

Sites like this:- www.armtutorial.com/index.html seemed to hi-jack the search for arm tutorials and present adverts when you follow the link. So when I find a good tutorial, I put it here. If you find more, let me know in the comments.


Below is the list I have so far. The most authoritative must be ARM-UK themselves, so the first link is to a large repository of PDFs at their info centre.


Tutorials from the ARM-UK info centre.
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.set.appnotes/index.html

ARM-GCC Inline Assembler programming.
www.ethernut.de/en/documents/arm-inline-asm.htm

Introduction to ARM-SOC, from a London University.
www.ee.ic.ac.uk/pcheung/teaching/ee2_computing

Programming AT92SAM7 ARM-SOC - An Introduction
www.triplespark.net/elec/pdev/arm/at91sam7.htm

Old but good ARM3 assembly language programming. (PDF)
www.peter-cockerell.net/aalp/html/frames.html

Tour of ARM assembly language

Tuesday, 24 August 2010

Single board computers





https://www.olimex.com/Products/OLinuXino/A10/A10-OLinuXino-LIME/open-source-hardware
Open Source Hardware Embedded ARM Linux single board computer with Allwinner A10 Cortex-A8

Also available with 4GB


  • 1GHz and Mali 400 GPU
  • 512MB DDR3 RAM memory
  • SATA connector with 5V SATA power jack
  • Capable of HD (720p) video playback 
  • HDMI connector

  • 2 x USB High-speed host with power control and current limiter
  • USB-OTG with power control and current limiter
  • 100MBit native Ethernet
  • LiPo Battery connector with battery-charging capabilities
  • LCD row of pins (0.05'' step)
  • 160 GPIOs on four GPIO rows of pins (0.05'' step)
  • MicroSD card connector
  • DEBUG-UART connector for console debug with USB-SERIAL-CABLE-F
  • GPIO LED
  • Battery charge status LED
  • Power LED
  • 2KB EEPROM for MAC address storage and more
  • 3 BUTTONS with ANDROID functionality + RESET button
  • 4 mount holes
  • 5V input power supply, noise immune design
  • PCB dimensions: 84x60 mm

Historical list of older boards:-
https://blackpoollug.blogspot.co.uk/2010/08/


ADlink CoreModule 430 -- Mar. 10, 2009 -- ADlink's latest PC/104 SBC is based on DMP Electronics's x86-compatible Vortex86SX SoC. The "CoreModule 430" includes 256MB of RAM, four serial ports, 10/100 Ethernet, two USB ports, and support for both CRT and TFT displays.



Aaeon NanoCOM-U15

Aaeon NanoCOM-U15 -- Mar. 09, 2009 -- Aaeon's COM exploits the newly proposed "COM Express Ultra" standard. The 84 x 55mm NanoCOM-U15 includes an SDVO (serial digital video out) connector, an Intel Atom Z5xx-series CPU, and up to 4GB of SSD (solid state disk) storage.

ARM9 Samsung S3C2443 SoC

Digi ConnectCore 9M 2443 and ConnectCore Wi-9M 2443 -- Mar. 04, 2009 -- Based on an ARM9 Samsung S3C2443 SoC, these two network-enabled embedded modules from Digi International target networked displays, medical devices, building access controls, energy management devices, time and attendance devices, and scales. The ConnectCore 9M 2443 and WiFi-enabled ConnectCore Wi-9M 2443 offer a variety of interfaces, including Ethernet, USB, serial, and camera support.

Calao TNY-A9G20-C0x

Calao TNY-A9G20-C0x, TNY-A9260-C0x, and TNY-A9263-C0x -- Feb. 09, 2009 -- Calao Systems's Linux-ready "TinyCore" SBC modules are offered with Atmel's ARM9-based processors, including the 400MHz AT91SAM9G20, 200MHz AT91SAM9263, and 180MHz AT91SAM9260. The TNY-A9G20-C0x, TNY-A9260-C0x, and TNY-A9263-C0x modules each measure a scant 1.4 x 1.6 inches, and ship with 64MB of SDRAM, 256MB of flash, micro-USB connections, serial debug interface, and other I/O.

Armadeus APF27

Armadeus APF27 -- Feb. 26, 2009 -- Armadeus Systems's low-cost system-on-module (SOM) is available with a development board and a Linux community distribution. The "APF27" processor module is built around an ARM9 Freescale i.MX27 system-on-chip (SoC) and a Xilinx Spartan3A FPGA, and offers a variety of I/O.

Icop VDX-635

Icop VDX-6354 -- Jan. 13, 2009 -- Icop's PC/104 computer module is based on a 32-bit, 800MHz x86-compatible SoC that is claimed to run Linux on under two Watts. The "VDX-6354" has 256MB of RAM, 4GB of flash, 10/100 Ethernet, audio, and an onboard VGA controller.

gumstix overoearth2-sm

Gumstix Overo Earth -- Oct. 28, 2008 -- Gumstix's heir to the popular Verdex SBC is another open-source, gumstick-shaped SBC, but with a more powerful ARM Cortex-A8-based Texas Instruments (TI) OMAP 3503. The Linux-based Overo Earth measures 0.7 x 2.3 x 0.2 inches, 40 percent smaller than the Verdex, and offers 256MB of DDR RAM, 256MB of flash, an on-board microSD adapter, a 24-pin flex ribbon connector for camera control, and dual 70-pin AVX 5602-14 connectors for various functional options.

ARM9-based Cirrus EP9302 SoC

Emac SoM-9307M -- Sep. 19, 2008 -- Emac's SO-DIMM-sized processor module is built around an ARM9-based Cirrus EP9302 SoC. The SoM-9307M targets development of customized products and applications, and runs Linux, Windows CE 6.0, or the .NET Micro Framework.

Glomation GESBC-9260

Glomation GESBC-9260 -- Aug. 06, 2008 -- This ARM9-powered single-board computer (SBC) from Glomation runs Linux and costs just $69 in volume. The GESBC-9260 measures 3.75 x 3.5 inches, sports Atmel's 200MHz AT91SAM9260, and targets "highly connected image processing applications" such as Ethernet-based IP cameras, and bar code readers.

Via P700

-- Jun. 30, 2008 -- This Via Technologies motherboard uses its tiny 3.9 x 2.8 inch pico-ITX format, and is available with a 1GHz C7 or 500MHz Eden ULV processor. The P700 boasts an onboard DC-DC adapter, and comes with two daughterboards that add real-world I/O connectors.



The new Epia P700 pico-ITX is available with the 1GHz Via C7 processor as the Via Epia P700-10L, or with the fanless 500MHz Eden ULV as the Epia P700-05LE. Both models include an integrated power adapter, enabling them to accept 12VDC power directly -- and even power 5V SATA drives -- without an external power daughterboard. Compared to the older pico-ITX products, other improvements include gigabit Ethernet, and bundled companion boards with real-world connectors.


The Epia P700 pico-ITX comes with P700-A and P700-B "companion boards" that fit atop the linear pin headers located at the left and right of the main board, as seen below. The P700-A provides an RJ45 connector for gigabit Ethernet, a VGA port, and a COM port, while P-700B sports four USB ports and three audio jacks. Other connectors on the Epia P700 include a 44-pin IDE connector, and a SATA connector.

Securely mounted, the P700's daughterboards can effectively be considered part of the main board. However, they do approximately double its width (overall system dimensions were not cited by Via). Alternatively, for installations where a small footprint is more important than overall system height, the companion boards could be mounted below the main board, given suitable cabling and mounting brackets.

As mentioned, the Epia P700 pico-ITX is offered with a choice of CPUs, both supported by Via's VX700, a core-logic chip that integrates the company's VN800 northbridge and VT8237 southbridge functionality. Graphics capabilities include 2D/3D graphics acceleration, MPEG2 support, and dual monitor outputs. Meanwhile, a single SODIMM socket accommodates up to 1GB of DDR2 533 SDRAM memory.

Via lists the following key features and specifications for the Epia P700 pico-ITX board:
Processor/chipset:
Via Eden ULV 500 clocked at 500MHz or 1.0GHz Via C7
Via VX700 Unified Digital Media IGP chipset
Memory -- DDR2 533MHz SODIMM socket for up to 1GB memory
Display -- integrated Via UniChrome Pro II 3D/2D AGP graphics with MPEG-2/4 and WMV9 decoding acceleration
Networking -- Via VT6122 gigabit Ethernet controller
I/O:
Pin connectors:
1 x LAN
1 x CRT/DVI
1 x COM
1 x CPU fan connector
1 x audio pin connector for line out, line in, mic in
4 x USB 2.0
1 x PS/2 keyboard/mouse
1 x LVDS
1 x LPC/SM Bus/GPIO
Real-world connectors (on companion boards):
1 x RJ45 gigabit Ethernet
1 x VGA
1 x COM
4 x USB 2.0
3 x 3.5mm audio (line out, line in, mic in)
Dimensions -- 3.9 x 2.8 inches (main board)
Operating temperature -- 0 to 50 deg. C
Dimensions -- 3.9 x 2.8 inches (100 x 72mm)
Power consumption -- "under 13 watts"

Embedian MXM-8310 and MXM-8110

Embedian MXM-8310 and MXM-8110 -- Jul. 10, 2008 -- These two computer-on-modules (COMs) from Embedian are available with a baseboard that connects via an MXM (Mobile PCI Express Module) connector. The MXM-8310 and MXM-8110 run Debian on a PXA320 (Monahans-P) processor, and offer interfaces for Ethernet, USB, TFT LCD, RS232, CF, and IDE.

Cogent CSB737

Cogent CSB737 -- Apr. 24, 2008 -- This SO-DIMM-sized (2.6 x 2.0 inches) computer module from Cogent Computer Systems targets "any size-restricted, low-power embedded system." Based on Atmel's AT91SAM9263 processor, the CSB737 runs Linux, and is available with a development kit and carrier board.

Debian-based KB9260

KwikByte KB9260 -- Mar. 12, 2008 -- KwikByte's 3.1 x 3.1-inch SBC targets general purpose computing, embedded controls, machine vision, remote monitoring, and database/web servers. The Debian-based KB9260 incorporates a 200MHz ARM9-based AT91SAM9260 processor, offers a variety of I/O interfaces, and costs only $80 in volume.

Icop VSX-6115

Icop VSX-6115 -- Dec. 18, 2007 -- Icop Technology's "low-power embedded controller" is effectively a complete headless PC crammed onto a board measuring 4 x 2.6 inches. The VSX-6115 runs Linux on a 32-bit x86-compatible Vortex86SX SoC from DMP Electronics, clocked at 300MHz.

ARM development on a virtual platform




This is an article related to what is commonly called the Virtual Platform or Virtual Prototype. There are probably many definitions of what this means. here it means the Virtual Platform as a software model of a hardware system, created for the purpose of running embedded software and verifying the hardware/software interaction.

Here are some general characteristics to help clarify what the Virtual Platform is:

  • Runs unmodified target code
  • Uses instruction accurate models of processors 
  • Provides a full programmers view
  • Runs very fast (may be faster than the hardware it emulates)
  • Has excellent visibility and control (compared to physical hardware)
  • Is easy to distribute to many users


Virtual Platforms have been available since somebody had the idea to make a software model of the hardware.

I expect that many software engineers already understand the details about how to select operating systems, write device drivers, create and populate file systems, cross compile software, program flash memory, etc., but sometimes software engineers are not familiar with virtual systems since somebody else sets up all the infrastructure and they just "add code" in the right place.

I'm sure that virtual platforms are (or will become) critical to verification engineers and people who have worked primarily with RTL simulation in the past and are making the transition to the next level of abstraction.
Virtual Platforms can play a key role in system verification and delivery of high quality software sooner in the process.

The hardware system to be virtualized is the ARM Integrator CP board. It is an older board that was supplied by ARM and according to the ARM website is no longer promoted because newer hardware platforms have been developed.

Not being a state of the art board that means there is a lot of public information available as well as software.

One of the benefits of the Virtual Platform becomes apparent immediately. First, a software company probably wouldn't understand the need to buy a board to develop embedded software.
Next, if a physical board was needed I doubt any readers would buy the board to learn about how embedded software development and verification works.

Since we have Virtual Platform technology nobody needs to buy any hardware and everybody can contribute. All that is needed is a computer, and the Qemu emulator.

Instead of actually reading the User Guide, we can start with a quick overview of the Integrator board and its memory map:
ARM926EJ-S CPU
Peripherals                                        Base Address
Primary Interrupt Controller                    0x14000000
Secondary Interrupt Controller                0xca000000
Counter / Timer                                     0x13000000
Real time Clock                                    0x15000000
UART 0                                                0x16000000
UART 1                                                0x17000000
Control Registers                                  0xcb000000
Keyboard Controller                               0x18000000
Mouse Controller                                   0x19000000
Multimedia Card                                    0x1c000000
Ethernet Controller                                0xc8000000
LCD Controller                                      0xc0000000

There are many uses for the Virtual Platform. A common one we can start with is to boot the operating system and run applications. Another one is to write device drivers and debug them.

Linux will be used as the operating system to load on the virtual device. Again, there is a wealth of information available and Linux is becoming popular as an embedded operating system.

To start, download QEMU which will emulate the Integrator board and boot Linux.

Get QEMU here. QEMU is an open source processor emulator which is available to run on both Linux and MS Windows.

If you have a Linux machine it may be installed already or can be installed using your package manager.


Once you have qemu installed it's time to get a Linux kernel and file system and boot it.

There are Fedora and Debian howto links on the home page with step by step guides.

An easy starting point is to download the ARM Linux 2.6 kernel and ram disk file system image from the qemu website. Extract this file and go to the arm-test directory.
As the README shows you can boot doing:
% qemu-system-arm -kernel zImage.integrator -initrd arm_root.img

If all goes well you will see a new window:

Photobucket

You can login as root with no password and you have a Linux system running on the ARM Integrator CP Board with the ARM926EJ-S processor.

You can use
Ctrl-Alt-2 to get to the qemu command prompt, type help to see the commands or type quit to exit.
Ctrl-Alt-1 will get back to the console (this is actually the LCD controller).
Ctrl-Alt-3 will get to UART 0 and allows another login window.
Ctrl-Alt is the key to release the keyboard and mouse.

Now try some networking:
% wget http://www.google.com
This will download index.html This is a ramdisk so next time you boot the file will be gone.
To browse the web use the lynx browser:
% lynx google.com

Other than being pretty cool, this exercise raises many questions:

  • How is the Integrator Board modeled?
  • How does qemu know I want to run the Integrator board?  There was no configuration or arguments.
  • What's in the file zImage.integrator?
  • What's in the file arm_root.img
  • How is the Ethernet controller on the Integrator board able to access the Internet?
  • Can I debug code running on the Integrator board?
  • This is a minimalist system, how can I compile and add more programs to it?


Original article:
http://www.cadence.com/Community/blogs/sd/archive/2009/01/16/welcome-to-quot-understanding-the-virtual-platform-quot-series.aspx?postID=13987