ChibiOS/RT Architecture - Reference Manual - Guides |
All the delivered ChibiOS/RT demos are stand alone applications so if you just start your application from an existing demo there isn't any integration effort, you are simply using the existing makefiles, the default startup files etc, minimal effort.
The matter is very different if you are going to integrate the OS into a different runtime framework or if you want to use a different build system, in that case you have the problem to integrate the OS source code into your application.
This guide has a limited scope, the following topics are handled elsewhere:
This section covers the scenario where you want to use the ChibiOS/RT kernel into an existing application. In order to accomplish this you need to import in your project two components:
See the Architecture for more details. You need to add the following files to your build process:
./os/kernel/src
, note that you should add all of them even if you don't plan to use some of the subsystems. Unused subsystems can be excluded from the kernel configuration file chconf.h
../os/ports/<compiler>/<architecture>
. Note that those could be both C source files and assembler source files and that some architectures have an extra directories layer containing files required for a specific platform.You also need to add to the compiler options the following paths for searching header files:
./os/kernel/include
../os/ports/<compiler>/<architecture>
.If, in addition to the kernel as described in the previous section, you also need to integrate the HAL into your application you also need to import the following components:
See the Architecture for more details. You need to add the following files to your build process:
./os/hal/src
, note that you should add all of them even if you don't plan to use some of the subsystems. Unused drivers can be excluded from the HAL configuration file halconf.h
../os/hal/platforms/<platform>
../boards/<board_model>
.You also need to add to the compiler options the following paths for searching header files:
./os/hal/include
../os/hal/platforms/<platform>
../boards/<board_model>
.