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 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…