Welcome on PLAY Embedded

On PLAY Embedded you can find useful resources to getting started with embedded systems: media, examples and accurate descriptions are also provided. Come on, learn by doing!

How to switch to the development version of ChibiOS

How to switch to the development version of ChibiOS

1 Trunk!

First time I started to deal with a software a little bit more complicated than the one used to print “Hello World”, I have encountered some words like “versioning”, “revision”, “diff”, “branch”, “trunk”, “checkout” and I heard about certain software like “svn”, “git”, “mercurial”.

Do you keep in mind when your friends knows something you don’t know and they continuously talk about that making you feel like a complete dumbass? Well that was my feeling! It is much simpler than how it seems: there are certain programs which purpose is to keep trace of every single character edited in your code. They are named version control software (as example git or subversion also know as svn). ChibiOS is versioned through subversion even if the svn repository is also unofficially mirrored (in read only) to a git repository.

I will summarise subversion in few lines in order to at least give an idea of what you’re going to do. With subversion code is saved on a remote repository identified by an URL. The operation of creating a local copy of the whole repository is usually known as checkout while updating that copy is known as update. The developer which has also read permission of the repository can save code through the commit operation: each commit is like a “snapshot” of the versioned folder (files, hierarchy, content) and this snapshot, known as revision, is saved on the remote repository. In subversion, revisions are identified by a progressive number (as example r9901). continue reading…

A detailed explanation of multithreading in ChibiOS/RT

A further reading about ChibiOS multi-threading

1 Multithreading explained

In the article “Hello ChibiOS” we have briefly explained how multithreading works but in this article we want to discuss more in detail the mechanisms behind ChibiOS/RT. This article is addressed to those developers already experienced with this RTOS.

Single thread flow
Fig.1 – An example of execution flow in a single-thread application.

A single thread application could be imagined like a straight line (Fig.1). Executing code we are travelling along that line and the beginning of our line is the application entry point. We can jump from a point of the line to an other, but we will always be on the same line.

In a multithreaded application, the code execution can split in more than a branch: this mean that our line could fork and execution proceeds long two or more separate branches. Each branch is a thread and our line forks when a thread creates a new thread. As example let us consider Fig.2. continue reading…

SEGGER J-Link Pro: an exhaustive review

SEGGER J-Link PRO an exhaustive review

1 Meeting J-Link

In our minds, we have always seen SEGGER debugging solutions like a professional but costly tools: a debugger to perform advanced operations but definitely too much for a student. Some time ago we heard about a new version of SEGGER, the J-Link EDU, which is cheaper and addressed virtually to us. It started to take shape the idea of using it as external debugger for these ARM evaluation kit which comes without a debugger.

Some month ago SEGGER proposed a firmware suitable for STM32 Nucleo on-chip debugger which makes J-Link available also for the STM32 ecosystem and they notified us this solution commenting our STM32 Nucleo-144 review. After an exchange of reciprocal opinion they have definitely caught our attention and we have decided to ask them for a J-Link PRO in order to test it. continue reading…