f9micro / f9-kernel

An efficient and secure microkernel built for ARM Cortex-M cores, inspired by L4
Other
679 stars 145 forks source link
arm cortex-m embedded l4-microkernel microkernel

F9 Microkernel

This is F9, an experimental microkernel used to construct flexible embedded systems inspired by famous L4 microkernel. The motivation of F9 microkernel is to deploy modern kernel techniques to support running real-time and time-sharing applications (for example, wireless communications) for ARM Cortex-M series microprocessors with efficiency (performance + power consumption) and security (memory protection + isolated execution) in mind.

Characteristics of F9 Microkernel

Licensing

F9 Microkernel is freely redistributable under the two-clause BSD License. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Quick Start

F9 Microkernel supports the following boards:

Building F9 Microkernel requires an arm-none-eabi- toolchain with Cortex-M4F support. The known working toolchains are as following

Other build dependency includes: (for Debian/Ubuntu)

Configuration is the initial step in the build of F9 Microkernel for your target, and you can use make config to specify the options from which to choose. Regardless of the configuration method you use or the actual configuration options you choose, the build system will generate a .config file at the end of the configuration and will generate a configuration header file, include/autoconf.h for C programs.

Then, just execute make to get the generated files in directory build.

For flashing and debugging on the STM32F40x, stlink is required. With stlink in your path, command "make flash" will flash your STM32F4DISCOVERY board with built F9 binary image.

When developing on top of F9 Microkernel, you do not have the luxury of using a source level debugger such as gdb. There are still a number of techniques at your disposal to assist debugging, however. KDB (in-kernel debugger) is built and run at boot by default, and here are the supported commands:

Through USART, KDB can be operated interactively on USART4 (default), USART2, or USART1 of STM32F4DISCOVERY depending on the selected option when you execute make config:

For 32F429IDISCOVERY, the pins are as follows:

You can established serial connection with the board using a serial to USB converter (for STM32F4DISCOVERY):

or (for 32F429IDISCOVERY):

Select the appropriate terminal emulator and configure it for 115200 baud, 8 data bits, no parity, one stop bit. For GNU/Linux, program screen can be used for such purpose. Installation on Ubuntu / Debian based systems:

sudo apt-get install screen

Then, attach the device file where a serial to USB converter is attached:

screen /dev/ttyUSB0 115200 8n1

Once you want to quit screen, press: Ctrl-a k

Build Configurations

F9 Microkernel deploys Linux Kernel style build system, and the corresponding files are described as following:

You can modify source file board/<BOARD_NAME>/board.[ch] to specify the preferable resource assignment. To get acquainted with the configuration of F9 Microkernel internals, file include/autoconf.h is the entry point: