OpenOCD

Wide box Tiny box List
Ascent Descent

Mikroe Clicker 2 for STM32 and STLink v2

Mikroe Clicker 2 for STM32 and STLink v2

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 continue reading...

Building OpenOCD under Windows using MSYS2

Building OpenOCD under Windows using MSYS2

In past, building OpenOCD under Windows was really complicated since it has a lot of dependencies and not was easily available under windows. With MSYS2 this task has become very simple and, if you need to use the latest stable version of OpenOCD in MSYS2, it is available as binary and could be installed with a single command.

In some cases, you need to build the development version of OpenOCD or, maybe, to apply some patches from OpenOCD Gerrit repository. Using MSYS2 and some PKGBUILD from the upstream repository, this operation is easy to accomplish.

MSYS2, which continue reading...

Hello ChibiOS

Hello ChibiOS

One of most important feature of ChibiOS is multi-threading. Oversimplifying, a thread could be imagined like a sequence of instructions (with associated a priority and a working area) and multi-threading means kernel can manage more than a thread independently, executing them in a parallel fashion even if there is a single core.

Achieving this requires Kernel must plan operation sequence: this task is called scheduling. We could act indirectly on this operation though priority levels. Priority follows a simple rule:

among all the threads ready for execution, the one with continue reading...

A quick view of ChibiStudio

A quick view of ChibiStudio

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 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 continue reading...

How to setup ChibiStudio

Setup of ChibiStudio

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.

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, continue reading...