Sunday, 29 August 2010
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.
ARM-GCC Inline Assembler programming.
Introduction to ARM-SOC, from a London University.
Programming AT92SAM7 ARM-SOC - An Introduction
Old but good ARM3 assembly language programming. (PDF)
Tour of ARM assembly language
Tuesday, 24 August 2010
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:-
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.
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:
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
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"
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:
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:
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?
Tuesday, 27 July 2010
Tuesday, 1 June 2010
Once I had got as far as running the Fedora ARM port in Qemu, I realised how rusty my coding skill were.
I also realised that although I enjoyed playing around with hardware, it is unlikely that I have the required ability now that Dual in Line (DIL) packages have disappeared and been replaced with surface mount devices that I can barely see let alone solder.
As a result of the above realisation, I will probably start playing with the Android OS for PC, and maybe buy a pre-built development board later.
Another option might be to buy and Android based phone and use that instead of a development board, as is demonstrated in this IBM guide:-
Download and install instructions for Android
Read is Android the 'top' Linux
Thursday, 4 March 2010
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. http://gcc.gnu.org/onlinedocs/
as you can see below, a.out does not run,
./a.out is required.
Wednesday, 3 March 2010
Wednesday, 27 January 2010
I think this is the same device as the Elonex Onet
The site of a Dutch guy who's had some success in hacking software and hardware. This includes links to the Dutch importer's site that are also worth looking at:
This is probably going to be a very useful thing to do, as I can imagine that lots of other Elonex ONE tips are going to start: "open up xterm and type the following commands..."
Anyway this is what you have to do to get xterm on your menu:
Pop up the virtual keyboard with alt-tab and hover over the xkbd logo.
Hold down the left button and select 'manual' and miraculously xterm will appear, running as "root".
type: cd /home/user
type: vi .icewm/menu
..then you're in the menu file. Find a suitable location for your menu entry, and type a line that says:
prog "xterm" xterm /bin/sh -c "xterm"
Make sure it lines up like the other lines, then save and close the file. (If '-c' doesn't work, try '-x' instead.)
Now hit the "One" button and see your new menu option.
gang a very helpful bunch and with the most advanced "hacking"
There are a couple of thread there, specifically "Apps" and "Games"
which have a collection of interesting stuff, mainly for me VNC viewer
and Doom (!)
Your first port of call though should be this website which has a
small collection of useful software:
Ultimately you can grab and convert Debian Lenny mipsel packages
(http://www.debian.org/distrib/packages) to .xap format (the OneT's
format) with "mkxap" script available at the URL above. In short the
procedure is as follows on either a Linux box, through the OneT's
xterm or root console or in a Cygwin prompt:
1. go to a new directory, i.e. "mkdir temp", "cd temp"
2. download the .deb package from the Debian website
2. expand the .deb package with "ar -x
3. uncompress the data.tar.gz file "tar zxvf
its component directories
4. repackage the file as a .xap "mkxap
5. you can now go to the Software installer and install the .xap
and .info files from the "temp" directory
Please remember to check for dependancies for the Debian packages on
download page as you may need to convert those too for the binaries to
It's a clunky process but I have succesfully converted a couple of
programs and it is a whole lot simpler than building a cross-compiler
environment and make your own binaries! ;-)
On the other hand there are a number of wiser people than me out there
working at getting proper debian running on this low-spec gadget and
that will make it a lot more useful.
Bear in mind that run-of-the-mill techies are not enough for hacking
this gadget... you'll need people with experience of building software
on non-x86 cpu. Or just a lot of Googling and trial and error (I'm in
Sites with specialist Elonex ONEt software
http://freespace.virgin.net/hugh.satow/gtk/ has some Card Games and some Puzzles and a quick note taking program - I particularly like the puzzles.
Each of these additional programs use up one of the icon spaces on the Elonex ONEt desktop - you have 5 screens of 15 icons, 75 in total - and some of the icons only want to display in certain places, which can mean that sometimes you add a program and don't see an icon because it's hidden by one for another program. To solve this you need to edit the relevant .desktop file. The simplest way to do this is to use the "Nedit" program downloaded from - launch the program, then select file open and type in the full path name of the file you want to edit - you discover the pathname by using the Bon Echo Internet Browser - type the address file:///share/applications into the Browser address bar (and, yes, you do need three "slashes" together - the pathname you want is: /share/applications/programname.desktop - replace programname by the actual name used for the file, when you edit the file the number on the line that starts Categories= determines which screen the icon appears on (numbered from 1 to 5) and the number on the line that starts ItemIndex= determines the position on the screen (numbered from 0 to 14) - a number of -1 means "place at the end" a # symbol at the beginning of a line makes it a comment so it's ignored - leaving out or commenting out the ItemIndex= line let's the Elonex place the icon at the earliest available position - if an icon cannot be placed at the requested position it will be placed at the next available later position (but never at an earlier position) - the actual places are determined by the order in which the files are read when the computer starts - so you won't see your changes until you restart the computer.
You can now understand why I quite like Firefox Addons and Flash Games (they don't use up any of your icons) and Games and Puzzles where one icon launches a program giving you access to many games or puzzles (they give you a lot of value for each icon used).
Tuesday, 26 January 2010
The toolchain provides the ever-popular GDB for debugging low-level programs. When the program is targeted for a single-board computer with a JTAG or ICE unit attached, you can use the Sourcery G++ Lite debugger (gdb) to debug the ARM code remotely.
If you wish to test the code as I did—on the Android Linux system running on a mobile phone—you need to attach the phone to the workstation using the USB cable that came with it, then use the Android software development kit's (SDK's)
adb pushcommand to transfer the program to the phone. Once on the phone, in a directory that can contain executable code (/data/local/bin), make the program executable by issuing the
chmod 555 hwcommand. (The
chmodcommand on Android doesn't use
555is necessary, instead.)
Finally, use the
adb shellcommand to connect to the phone, use
cdto change to the correct directory, and run it with
./hw. If all goes according to plan, the program should respond as it did on my phone, by greeting you with "Hello Android!"
Read more here:-
GNU ARM toolchain guide from IBM
- ARM low cost debuggind application note by ARM Inc.
- Student's guide for building low cost debugging environment by ARM Inc.
- ARM Jtag debugging with wiggler and OpenOCD by Martin Thomas
- Using OpenOCD as Flash programming tool article written by Martin Thomas
- ARM projects with OpenOCD by Martin Thomas
- Using Open Source Tools for AT91SAM7 Cross Development - Revision B guide by Jim Lynch
- (the old) ARM Cross Development with Eclipse (10MB) REV-3 very detailed tutorial by Jim Lynch how to setup and works with the free GNUARM tools ARM-JTAG and LPC2106 board. The sample codes for this tutorial is here.
- ARM Cross Development with Eclipse in Spanish language (3MB) REV-1 Paul Aguayo did a great job translating to Spanish language Jim Lynch's tutorial. He also shrink the size of the document without missing the quality of the pictures and tutorial text.
- GNU toolchain setup with openOCD by Michael Fischer
- ARM low cost development guide - paper from ARM Inc.
- H-JTAG freeware RDI151 server supports ARM-JTAG for every debugger/IDE which have RDI151 support. The setup should be as on this picture.
- open source debugger diplom project from Dominic Rath with target to replace OCDdeamon for debugging with Insight/GDB.
- YAGARTO open source Windows nad MACOS GCC setup
- EWARM professional C compiler and debugger.There is free kickstart version which is with unlimited assembly language and 32K limit for C code from IAR Systems AB Sweden. Tested to work with H-JTAG RDI151 and our ARM-JTAG. The flash download to our LPC2138 board show about 30% slower flash programming than the expensive USB J-Link adapter from Segger. According to IAR Systems their EW-ARM is benchmark leader.
- CrossWork for ARM IDE and debuger on top of GCC from Rowley Associates, this is the very first package to support smoothly Wiggler and ARM-JTAG.
- OCDeamon toolchain and debugger from Macraigor Systems. Quite unstabile software, when it wants to work it works, when it doesn't want to work it doesn't. too dependand of computer CPU speed, parallel port settings etc. Macraigor is the original developer of Wiggler, but after the Wiggler clones flooded the internet they don't support quite this product.
- WinARM - easy to install open source GCC toolchain by Martin Thomas. Lots of examples for our LPC boards are included in the installation. Simple tutorial how to setup our ARM-JTAG you can find here.
- GNUARM another GCC toolchain from Arius.
- Do-it-yourself 3D printer with LPC-H2148 as controller, contain also instructions how to setup Eclipse and GCC as development environment
than “The Insider’s Guide to the Philips ARM7-Based Microcontrollers” by
Trevor Martin. Martin is an executive of Hitex, a UK vendor of embedded
microcomputer development software and hardware and he obviously understands
You must register first, then you can download this e-book for free from the Hitex web site.
This is another excellent introduction to ARM Cross Development With Eclipse Components, the free open source system, available as a free download with no need to register:-
Other resources are available at Alex the Geek
Snippet from the Hitex book:-
1.6 The ARM 7 Instruction Set
Now that we have an idea of the ARM7 architecture, programmers model and operating modes we need to take
a look at its instruction set or rather sets. Since all our programming examples are written in C there is no need
to be an expert ARM7 assembly programmer. However an understanding of the underlying machine code is
very important in developing efficient programs. Before we start our overview of the ARM7 instructions it is
important to set out a few technicalities. The ARM7 CPU has two instruction sets: the ARM instruction set which
has 32-bit wide instructions and the THUMB instruction set which has 16-bit wide instructions. In the following
section the use of the word ARM means the 32-bit instruction set and ARM7 refers to the CPU.
The ARM7 is designed to operate as a big-endian or little-endian processor. That is, the MSB is located at the
high order bit or the low order bit. You may be pleased to hear that the LPC2000 family fixes the endianess of
the processor as little endian (i.e. MSB at highest bit address), which does make it a lot easier to work with.
However the ARM7 compiler you are working with will be able to compile code as little endian or big endian.
You must be sure you have it set correctly or the compiled code will be back to front.
Sunday, 24 January 2010
|The CM-X300 is a small Computer-on-Module board designed to serve as a building block in embedded applications. The CM-X300 has all the components required to run operating systems such as Linux and Windows CE. Ready packages for these operating systems are available from CompuLab. |
The small size and low power consumption of the CM-X300 allows its integration into hand-held and mobile devices, while its low price makes it an ideal selection for cost-sensitive applications. The CM-X300 delivers a price / performance ratio significantly better than that of any other platform.
The feature set of the CM-X300 module combines a 32-bit CPU, DDR, Flash Disk and vital computing peripherals. For embedded applications, the CM-X300 provides a general purpose local bus, 100Mbit Ethernet, serial ports, I/O lines and other essential functions.
Targeting the handheld application market as well, the module provides integrated WLAN (WiFi) and Bluetooth interfaces to implement industry standard wireless connectivity. Integrated battery charging and management enables easy integration in battery-powered mobile devices.
The standardized CAMI ("CompuLab's Aggregated Module Interface") connectors of the CM-X300 module allow interchangeability with other Computer-On-Module's available from CompuLab, enabling the flexibility required in a dynamic market where application requirements can change rapidly.
See O/S Support Coverage Map
For more information, see
Developer Resources page
"Option" column specifies the configuration code required to have the particular feature.
"+" means that the feature is always available.
CPU, Memory and Busses
|CPU||Marvell XScale PXA300 / PXA310 / PXA320 CPU |
208 / 624 MHz, WMMX2, 2*128K internal SRAM
32 KB I-cache and 32 KB D-cache, WB, 128 MB address space
DMA and Interrupt controllers, Timers
|RAM||64 - 128 MB, DDR, 208 MHz, 16-bit||D|
|NAND Flash Disk||512 Mbytes, bootable.||N|
|External local bus||16-bit, variable rate up to 52 MHz, 3.3V tolerance||+|
|AC97 bus||AC97 / AMC97 Rev 2.1 compliant||+|
8/16 bit color, TFT / STN, frame buffer in CPU SRAM or system DDR
Resolution: up to 800 x 480 x 16 without restrictions, and up to 1024 x 1024 with some restrictions about overlays, BPP and pixel clock.
Direct camera sensor support, max resolution 2560 x 2048, pixel clock up to 52MHz. Available only with PXA310 CPU.
Supports up to D1 decode and encode performance for codecs including H.264, MPEG-4, H.263, MPEG-2, RealVideo and Microsoft WMV9.
Hardware scaling, rotation and other raster graphics operations.
* Implemented by PXA310 CPU
Host/Slave (OTG) port, 12 Mbps, 23-endpoints (in slave mode), OHCI v1.0
Host port (shared with Bluetooth, therefore not available with "W" option)
Up to 3 UART ports, 16550 compatible, max 921 kbps
COM-A - RS232, Rx / Tx
COM-C - TTL, full modem controls
COM-D - TTL, partial modem controls
General Purpose I/O
42 dedicated lines (32 I2C-controlled + 10 memory-mapped) plus additional lines shared with other functions. Can also be used as interrupt inputs.
Keyboard & mouse
USB, keypad or redirection from COM port
Davicom DM9000A MAC & PHY, 10/100BaseT, Activity LED's
Wolfson W9712L, AC97 interface, mono microphone input, stereo line input and 25 mW output for active speakers
A part of the W9712L codec chip. Supports resistive touch panels.
Real Time Clock, powered by external lithium battery
Implements 802.11b/g wireless connectivity standard
Supports Node to Access Point and Multi-Node (w/o access point) methods of connection. (but cannot act as Access Point)
Marvell 88W8686 802.11b/g chipset.
On-board ceramic chip antenna and connector for external antenna.
Bluetooth V2.0+EDR system. CSR BlueCore4-ROM chipset, 2.4GHz band, up to 3Mbps. On-board ceramic chip antenna and connector for external antenna.
Bluetooth and WiFi interfaces are always assembled together, and therefore are specified by the same assembling option.
|Supply Voltage||Single 3.3V or 3.6V battery|
|Active power consumption||0.2 - 2 W, depending on configuration and CPU speed|
|Standby/Sleep consumption||20 - 100 mW, depending on configuration and mode|
|Dimensions||66 x 44 x 7 mm|
|MTBF||> 100,000 hours|
|Operation temperature (case)|| |
|Storage temperature||-40o to 85o C|
|Relative humidity||10% to 90% (operation) |
05% to 95% (storage)
|Shock||50G / 20 ms|
|Vibration||20G / 0 - 600 Hz|
|Connectors||2 x 140 pin, 0.6 mm|
|Connector insertion / removal||50 cycles|
- CM-X300 Reference Guide
- Developer Resources
Processors - Direct Insight Tools for ARM7, ARM9, ARM11, Cortex Devices
We offer comprehensive tool support for virtually all derivatives and cores including:
ARM Cortex-A8, Cortex-R4, Cortex-M3, ARM11, ARM720T, ARM920T, ARM922T, ARM926EJ-S, (F)-S, ARM7EJ-S, ARM7TDMI, ARM7TDMI-S, ARM946E-S, ARM966E-S, ARM968E-S. We have separate pages dedicated to Intel XScale, Marvell PXA270, PXA310, PXA320 and i.MX27, i.MX25 and i.MX37 processors.
Integrated Development Environment: IAR Systems
IAR Embedded Workbench provides a completely integrated development environment including a project manager, editor, build tools and the C-SPY debugger. In a continuous workflow, you can create source files and projects, build applications and debug them in a simulator or on hardware. IAR Systems is well known for highly optimized compilers. Every C/C++ compiler contains both generic global optimizations as well as low-level chip-specific optimizations that take advantage of all the specific features of your selected device.
The optional PowerPAC RTOS adds an affordable real-time kernel, file system, and optional USB and Ethernet support.
KickStart Kits for NXP LPC, Atmel SAM7/SAM9, Luminary, STR7/9, STM32, Toshiba TMPA9/M3: IAR Systems
IAR KickStart Kits contain everything you need to get started with development, and to try out your application directly on the device. Each kit includes code-size limited development system with C/C++ compiler and example code, development board and- JTAG probe with flash programming
JTAG emulators and debuggers: Sophia
We offer a broad range of JTAG debuggers to cover every imaginable combination of development environments, embedded OS and target device.
Sophia's EJ-SCT is a powerful, USB-powered probe with configurable support for all ARM families. Most popular development boards are supported out of the box, and the powerful Watchpoint debugger features optional interfaces to GDB for Linux targets, and Microsoft Platform Builder for hardware-assisted debugging of targets running Windows CE 6.0.
The advanced EJ-Extreme supports up to 100Gig of ETM and RTP trace.