Homepage Wiki Forum Buy

Quickstart

From GNUBLIN

Here you find a short introductory overview of GNUBLIN.

Note by the Editor: this page is currently in the translation phase.


You may have found this site looking for info on the Elektor-linux-board. That is because the Elektor-linux-board is based on and is a functional equivalent of the Gnublin board. The two boards operate identical. For this reason we will assume that when we address the Gnublin, we imply that this is also valid for the Elektor-linux-board. Where there are differences either way, a note is inserted pointing this out.

Contents

Introduction and notes

For the absolute beginner first a few notes and warnings regarding the handling of the Gnublin.

Use extreme caution with respect to electrostatic electricity.

This board is unprotected by a case. This makes it extremely sensitive to damage by electrostatic discharge. If you live in an environment where you can sometimes feel an electrostatic shock when touching door handles and so on, you will need to be very, very carefull. Walking around and then touching the board anywhere without touching electric ground first is almost certain to destroy a component on the board. Although the board is relatively inexpensive, it as advised to use extreme caution with respect to electrostatic electricity. If possible, build the board into an enclosure to protect it somewhat from directly touching the electronics.

To avoid filesystem damage, you MUST try to issue the shutdown command before powering down.

The Gnublin is an advanced small computersystem in a very small format. Being based on linux, the beginning user may need to be made aware that you are working with a regular operating system. Most controllers with hard programming can handle power on/off without any consequences. But when using a linux system like Gnublin, you are working with a regular operating system where the filesystem is copied to RAM (see boot-sequence). If the board looses power (because you unplug it for example) then you risk damaging the file system just like with a full-size system. If this happens, then it will be necessary to either repair the file system on another computer or laptop or it may be necessary to copy a fresh copy of the filesystem on the flashcard. To avoid filesystem damage, you MUST try to issue the shutdown command so the system shuts down properly. We will explain further down in this page how to do that, but please learn to do this to avoid filesystem damage.

I have installed the latest version on a new flashcard and I keep the original card safely as a backup in case anything goes wrong. A little further down the line we will learn to install a new filesystem on a blank card to recover from a catastrophic filesystem failure.

Make sure you keep backup copies of files that are on the Gnublin.

Following the previous item, it is therefore advisable to make sure you keep backup copies of files that are on the Gnublin to prevent dataloss. While developing applications, hang-ups will occur where a reset will be the only way to regain control. Any reset will imply the risk of filesystem damage just like with a normal size system. It is not a question of "if" you will need to recopy a fresh flashcard, it is a question of "when". So be prepared...


Now on to the quickstart guide.

For the beginner there are three area's of interest: the Quickstart, For Beginner and For Advanced users.

In this Quickstart you are introduced to the first-time use and connecting up to the GNUBLIN. By using the tutorials, you will increasingly use what you learned so you will start to write more and more your own applications for GNUBLIN and the Elektor-linux-board.


Quickstart

In order to work with the Gnublin board, you need two things:

  1. A Micro SD Card with the pre-installed GNU/Linux (is included in the package)
  2. A USB connection between the USB Console-connector on the Gnublin Board and a "development"-system. This system or laptop should be based on GNU/Linux to be able to use the Software Development Kit. To use console access, a windows-based system is enough. It is possible to use PuTTY as a console program as we'll explain later.

Lpc3131 boot sd.JPG

After connecting the USB cable you start a emulation terminal like picocom

sudo picocom -b 115200 /dev/ttyUSB0

Hint: You can exit from picocom with Strg-A Strg-X.


Hint for Windows: On Windows you have first to install the USB-RS232 (virtual COM) driver in order to connect the device (http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx). Furthermore you will need a Terminalprogramm. For more information visit this


Thereby the PC will be the "console" of the gnublin Board. That means, that you can see the messages from the Board on your screen and your keyboard input will be send to the Board.

Why is it important first to connect the device via USB and after that to start the Terminalapplication? The answer is, that only through connencting the cable a virtual serial interface will be applied on your PC wich is usually named /dev/ttyUSB0. The number at the end can change. Only then picocom can be started with the device as argument.


What happen after connecting?

After the board was connected to the PC, it first loads the apex bootloader (http://elinux.org/APEX_Bootloader) from the SD card into the internal RAM and then starts it. The bootloader is configured to load the Linux kernel after short break from the SD card into the RAM. Linux will boot and at the end the root filesystem will be mounted from SD card. Now you should see the following:

...
EDLK (Built by Poky 5.0) 5.0 armv5te ttyS0
armv5te login:

Now you can login with the name root (you don't need the passwort) and you will see the pompt:

root@armv5te:~#


Now you work on gnublin like on a usual gnu/linux computer. The root filesystem contains with over 600 MByte a lot of applications, even applications like the X window system wich is not supported by the LPC3131 hardware. If you have the 8 MB Version of the Board it's not recommended to use the gcc compiler from the Board, because it is very slow.


What can I do with the board?

Here are some examples of what you can do with the board.

  • You can learn about embedded linux on a ARM microcontroller.


  • USB OTG high-speed interface makes it possible either to connect the Board to host (a PC) or to use it as a host for other USB devices.


So you can connect Gnublin e.g. with an USB-Ethernet Adapter to any network and use protocols like HTTP, SSH, FTP etc.

An adapter like this only costs a few euro. On the figure Medium:Usb-ethernet.jpg you can see such an adapter. With the USB adaptercable you connect the Mini USB OTG on the Gnublin site with any other USB device on the "normal" USB site.

Even USB Wlan adapters are working like ASUS WL-167G Medium:Usb-wlan.jpg.

  • You can connect much of hardware to the interface of the Board, e.g. sensors, radio modules etc. Nothing stands in your way to read sensors values and forward them to a Webserver.
  • With the gpio Pins you can make some experiments with interrupts like measure the interrupt latency. This points to interresting area "Realtime Linux".
  • building Automation
  • portable embedded linux device
  • bicycle
  • And lot lot more

For which user-groups is the Gnublin project?

The different interest groups are described below:

Beginner

  • What is embedded Linux?
    • Be acquainted with the parts of bootloader, kernel and filesystem.
    • Be acquainted with a microcontroller of an ARM core.
    • Be acquainted with open-source development methods.
  • How do I start Gnublin?
  • How to login?
  • How to get access to the interfaces (GPIO, I2C, ADC, PWM) with simple commands?
  • How to build some application with an interpreter language, e.g. Shell script or python. Simple applications are:
    • Turn LED's off/on.
    • Read switches.
    • Connect displays over SPI or I2C.
    • Read analog values from a photo resistor or a temperatur sensor.
    • Readout of measurements by a web server.
    • Using CGI scripts with the webserver.
  • How to create an autostart application after boot.


Advanced

  • Configure, compile and install the available kernel.
  • Integrate new available kernel modules.
  • Make simple changes on the root filesystem.
  • Cross compile available applications for Gnublin.
  • Write your own applications for Gnublin.

Gurus

  • Write and compile your own kernel modules.
  • Port an own kernel to Gnublin.
  • Make some changes in the apex bootloader.
  • Build your own root filesystem, without the default of ELDK.
  • Get deeper into the technical details of the LPC3131 ARM926 microcontroller.
  • Make experiments with realtime linux, e.g. with Xenomai or other realtime extensions.

Further in the beginners tutorial

After Linux booted the first time on Gnublin you can go on with controlling external devices with different available interfaces.

Tutorial for beginners

In other languages