Table of Contents

SMP capability in RT 7

Starting from version 7, ChibiOS/RT offers support for multiple cores. There are 3 separate scenarios:

Single Core mode

This is the classic ChibiOS/RT mode, it is activated when CH_CFG_SMP_MODE == FALSE in chconf.h. In this mode there is a single CPU running the OS.

Weak SMP

In this mode a separate instance of ChibiOS/RT runs on each core, the various instances cannot interact each other, this means that it is not possible to share objects (semaphores, queues, mutexes, etc) between threads belonging to different cores.

This mode requires CH_CFG_SMP_MODE == FALSE in chconf.h but multiple instances of the RTOS can be started using chInstanceObjectInit(), basically it is the same of Single Core mode but it requires specific support in the port layer.

Note that the multiple instances are not multiple copies of the RT code, there is a single OS image, what is duplicated is just the OS object os_instance_t which is quite small.

Full SMP

The full SMP mode is one OS running on multiple cores, it is activated when CH_CFG_SMP_MODE == TRUE in chconf.h. Threads are assigned to cores and can interact each other using normal OS mechanisms without limitations.

Notes about HAL usage in SMP modes

HAL can work in SMP modes following some simple rules:

Everything else works as usual.