1. Embedded ARM cortex-A8
If you're into embedded systems development, or low level smart phones development (a subset of the bigger 'Embedded' picture), then skip the rest of this paragraph, and read on. On the other hand, if you are not into hardware, programming, algorithms, lengthy boring text with bits of weird looking symbols like (#,$,->,uint32_t *P,0xFF,0b11,=0xFC), then you have read enough of this post, move on, nothing to see here (-_-).
If you're reading this, chances are you have heard of the all-famous ARM, I am not about to re-iterate on the exhausted topic of "An Introduction to the ARM processor", you may ask Google for that, and I'm sure it would have all the answers you need.
Originally, this series of posts was planned to be presented using a state-of-the-art platform powered by Qualcomm's Snapdragon 800 series processor. however, having failed to acquire enough information about the DragonBoard's documentation, I decided to put my plan to purchase the board hosting qualcomm's snapdragon processor on hold.You see, I made the mistake of buying FriendlyArm's Tiny210SDK v1.0 about two years ago, without making sure that the SDK was documented well enough, or that the tools provided to quickly pass the how-to-get-my-code-into-this-thing phase are available for Linux users, the project I was planning to work with was on a sufficiently high level that I didn't want to worry about getting the system to wake up, all I wanted was something that could get me up to the point where I can customize a Linux file system, to my disappointment, it turned out that the only useful document FriendlyArm provided was the schematic of the board modules, and that the flashing tools they provide were windows-only executable binaries.
A rule of thumb, if the user manual of the system you are buying has nothing more than a stream of screenshots of a windows-only based tool, then you should consider adding an entry to your (Cons of buying this system) list.
Documentation is key! it could save you some serious pain trying to figure out how to bring the system to life.
You could part with software tools that could be convenient when trying to get to the 'hello world' phase, but you WILL SUFFER without proper documentation!.
What this series of posts is all about
One of the most difficult tasks a novice could face trying to get into Embedded systems development is to answer the following questions:
- Where is all the information?!
- So I got my hardware in front of me, where do I start?
- I have the Technical Reference Manual, User Manual, Programmer Reference Manual, what do I do with those? which manual provides what ?!
Another issue that faces not only a beginner, but Engineers on all levels is the amount of different conventions out there, to put things in perspective, lets take the example of bootloaders. the functionality of all bootloaders is essentially the same, because of the highly standardized hardware components they all work with, there are only a small set of defined 'ways' the bootloader could use to communicate with a specific device within a particular embedded system, yet you see all sorts of variations in the way different bootloaders are implemented. Being familiar with U-BOOT would not really help much when you have to deal with Redboot, your knowledge of WHAT U-Boot DOES down there will however come in handy.
In an attempt to address these issues, I dug up my old tiny210 board, nicely put together by FriendlyARM, but poorly documented and lacks the necessary utilities for development under Linux, along with old log files I piled up over the years to try and demonstrate the process of bringing up an ARM cortex-A8 based system to life, and having it load a usable OS, I'll be implementing a custom bootloader instead of configuring and using one off the shelf, because it forces me to dig deep in the documentation of the system I have, and learn the ins and outs of it.
Obviously, a major part of the development process is the choice of system components, both hardware and software. The hardware part will not be addressed here, cause I have to use whats available to me now.
Software components and milestones
So far, I have only decided on developing a bootloader and making it capable of loading the Linux kernel and file system. I'll be using u-boot as my reference because it is the bootloader I am most familiar with, and because my log files talk about it all the time!. Post bootloader phase will (naturally) involve Linux, but the exact path I am going to take is not yet defined.
I will be using both Debian and Arch Linux distros exclusively, I have had a bad experience with fedora years ago, but I have to admit that I was still learning, and couldn't provide an objective view on fedora as a development machine distro.
Other than the Linux OS requirement, I will not be using an IDE for this project, vim is my preferred editor of choice, but you should still be able to follow, because the whole project will be built with MAKE and linaro's ARM-GCC toolchain, no IDE specific magic will be used.
An exception would be with GTK/QT UI design, where it would be irresponsible to not use UI design tools, that is if we decide to go that far, which would require dealing with GPU, the most complicated thing to do on an embedded system in my opinion, because of all the secrecy around it.
Development board hardware features
I'll start by a listing of the features this development board provides.
This particular development board is not at all important in this project's context, it is simply the platform I will use for demonstration, so you, the reader, need not worry about not having access to it.
- Samsung S5PV210, based on Cortex-A8, 1GHz
- Integrated PowerVR SGX540 graphic engine
- DDR2 512MB RAM
- NAND Flash: 4GB
- LCD interface: 41Pin, 1.0mm spacing, supports one wire precise touching including an I2C, three interrupts and a PWM output
- 10/100M Ethernet interface(RJ45) using DM9000AEP
Other good to knows:
- 1 x DB9 RS232 serial port
- 4 x TTL
- 1 x miniUSB Slave-OTG 2.0 which can be extened via a 2.0mm socket
- 1 x 3.5mm stereo audio output
- 1 x TF card socket
- 1 x integrated microphone
- 1 x one speaker port which can drive an 8Ω 1W speaker
- 1 x USB Host 2.01 x 5V power input (DC-23B)
On Board Hardware Resource:
- 1 x I2C-EEPROM (256byte)
- 4 x LEDs
- 4 x User’s Button
- 1 x adjustor resistor for ADC
- 1 x PWM buzzer
- 1 x backup battery for on board real time clock
- 4 x serial port
- 1 x JTAG
- 1 x LCD interface
- 1 x SDIO
- 2 x CMOS camera interface
- 1 x matrix keyboard interface: 20pin
- 1 x GPIO
This is about all we can get out of the User's Manual provided by FriendlyARM. We'll come back to it if we ever need to, but I highly doubt it will be of any use from now on .
More features will be exposed through each post in this series, we do not want to bombard ourselves with too much information without knowing why we need them.
Next, we take a look into the boot process of our S5Pv210 Samsung processor, and how we'll go about gathering resources to figure out what exactly goes on right after we switch on power.