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!

A quick view of ChibiStudio

A quick view of ChibiStudio

1 ChibiOS based projects in ChibiStudio

1.1 How it is composed

We have said more than once that ChibiStudio is Eclipse based, therefore, should not surprise that project management is based on Eclipse rules. In Eclipse a C project is a folder containing basically a main.c, a makefile and two additional files used by eclipse to manage projects: .project and .cproject.

A ChibiOS based project
Fig.1 – A ChibiOS based project.

A ChibiOS based projects contains also three additional files:

  • chconf.h, containing configuration related to kernel. As example, here it is possible to configure system timing, enable/disable kernel features and enable/disable debug options;
  • halconf.h, containing configuration related to HAL. Here it is possible to enable/disable whole HAL modules or configure them;
  • mcuconf.h, containing specific configuration of used MCU. As example if we enable a certain module in halconf.h here we can choose how many driver assign to/enable for that module.

Even more, we have a folder named debug containing a .launch file: this is a debug configuration.

Do not worry if words are not fully comprehensible now: we will see some practical example about how to edit these files in the subsequent tutorials.

1.2 How to create a new project

The best way to create a ChibiOS based new project is to duplicate a default one from the project explorer. This procedure is shown in the video above. Of course we can assemble a new project for ChibiOS starting from an empty project, but this will be a waste of time.

For that reason it is strongly recommended not to edit default project but operate on a new one. Duplicating a default project we need to perform certain tasks before you can use the new project.

These operation are shown into the video but we want to spent a few more words. continue reading…

How to setup ChibiStudio

Setup of ChibiStudio

1 Additional informations

Following the video we will install ChibiStudio. Note that in what follows when we will say “ChibiOS” we will refer to ChibiOS/RT, the Real Time kernel.

In the tutorial related to ChibiOS we will use an STM32 Nucleo-64 F401RE and we suggest to use the same. This board belong to STM32 MCUs family and is one of the cheapest and well designed MCUs you can found today.

STM32 Nucleo-64
Fig.1 An STM32 Nucleo-64. Click on it to reach its page.

This board costs more or less 10$ and exhibit almost the highest performances you can found on MCU‘s market today. This board has indeed anSTM32F401RE: an ARM CORTEX-M4 MCU with clock frequency up to 84 MHz, FPU, DSP, 96kB of SRAM, 512kB of Flash and a bunch of internal peripheral (GPIO, SPI, ADC, DAC, TIM and so on).

This board can be bought from every distributor, but you can receive it as a gift from every ST official stand you can found in the main embedded exhibitions.

It is highly recommended to download related documentation. We love to call them the “Bible of MCU” since they answer for any question you could make.

  • Data-sheet provides the description of theSTM32F401xD/xE line of MCUs;
  • Reference Manual provides complete information on how to use theSTM32F401xB/C and STM32F401xD/E micro-controller memory and peripherals;
  • User Manual provides additional information about STM32 Nucleo-64 boards.

STM32F401RE datasheet STM32F401 reference manual STM32 Nucleo-64 boards user manual

1.1 Requirements

Basic knowledge of C and electronics are mandatory to understand well the “experiments” submitted during these tutorials. We will use STM32 Nucleo-64 F4. As said, it is advisable but not mandatory to use the STM32 Nucleo-64 F4. About C, you could find a lot of tutorial on web but our personal suggestion is to read a good book like “The C Programming Language” by Kernighan and Ritchie or “C: A Reference Manual” by Harbison and Steele or open source The C book by Mike Banahan, Declan Brady and Mark Doran.

continue reading…

The ChibiOS project

The ChibiOS Project

1 About ChibiOS

ChibiOS is a well known project for those who make embedded. It was born in 2007 as a free and open source RTOS designed for deeply embedded real time applications where execution efficiency and compact code are important requirements. Grooving up, it starts to provide a set of device drivers for accessing common MCU peripherals. ChibiOS hierarchy was divided in two main branches: RT and HAL. RT (Real Time) was the kernel, HAL (Hardware Abstraction Layer) was the set of device driver.

During years, ChibiOS becomes more and more popular: enthusiast users begin to participate in discussions on the forum, they suggest improvements and report bug. Everything was required to start working with ChibiOS was encapsulated in a single archive: It was the birth of ChibiStudio Preview 1.

Prior to version 3 , HAL was dependent on RT and it was impossible to easily use HAL without RT kernel. ChibiOS 3.0 introduces significant changes improving RT, making HAL independent from RT through an OSAL (Operating System Abstraction Layer) and, even more, introducing a new kernel: NIL. ChibiOS has an official website (ChibiOS Official Website), an official forum (ChibiOS Official Forum), a SourceForge page (ChibiOS SourceForge Page) and some social pages like Facebook and Twitter.

2 Why ChibiOS

Approaching to Embedded world is not easy at all: it requires a lot of skills and knowledges. If on one hand getting started with ChibiOS requires a certain effort, on the other hand this software is designed for professional applications, provides advanced features and supports multiple architectures.

continue reading…