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…

I am new with ChibiOS. Where do I start?

PLAY Embedded default featured image

We have written a lot of articles about this topic and they are all in the ChibiOS section. Our suggestion is to start trying to understand what you goals are. Independently from that there is always a basic path to follow to overcome the first step.

  1. Gather information about ChibiOS. Some are provided in the article The ChibiOS project, others can be found on the ChibiOS official website and official forum.
  2. Set up a working environment to train yourself and understand how things works. This is eased for Windows users since ChibiOS releases periodically an eclipse-based IDE named ChibiStudio and we have provided a guide for its setup.
  3. Explore the IDE: this our article could be useful. Do not undervalue this part since here you have to discovery what are the tools you can use to solve problems you will face.
  4. Run a demo for your board and try to figure out what code mean crossing information so far gathered.
  5. Duplicate the original program and make it works (at this point you should be able to do this or come back to the point 3).
  6. Try to figure out what is the most simplest main you have to write to make a LED blinking. It’s not a coincidence that there isn’t an article about that: this is something you must do on your own.
  7. Start to explore the HAL drivers. The best way is to start with PAL and this article is the best way to do this.
  8. According to your goal explore other HAL drivers. There are a lot of demo under the folder testhal you can consult in order to master the fundamentals. Remember that most likely someone else has tried to accomplice your same goal facing same problems. Take look to articles in the ChibiOS section and try to search in the ChibiOS official forum.
  9. Don’t be shy: get in touch with us and with the community.

Mikroe Clicker 2 for STM32 and STLink v2

Mikroe Clicker 2 for STM32 and STLink v2

1 Introduction

In this tutorial we are going to see how to connect a STLink v2 debugger to a Clicker 2 for STM32 enabling users to do debugging which could be very useful in development phases. A debugger is a computer program which is used to test and debug another program usually named Target.

In embedded things are slightly different since the code is executed on an external MCU and it is required an interface Computer-MCU. In this case the Target is the MCU and a debugger is composed by the ensemble of a hardware and a software tool. Nonetheless, when the majority of people is talking about debugger,they are referring only to the hardware part.

A debugger allows the connection to a Target enabling the Host to load a firmware on it managing its code execution, allowing the inspection of its registers and much more. To do this, it uses some specific commands that usually depend on the MCU architecture: this means that there are specific debuggers for specific MCUs. The STLink v2 is a low cost debugger supporting both STM32 and STM8. In what follows we are going to use OpenOCD, an open source debugging software largely used in ChibiStudio since it is a reliable solution for debugging. continue reading…