A Minimal kernel for the Arduino Due
Find a file
fef 7e6dbad05f
sched: complete rework of context switching
The old strategy was to only do context switching
from within the PendSV handler.  This worked fine
until now because all syscalls were handled either
atomically or just returned -EAGAIN if the
resource was locked or busy.  However, with the
introduction of I/O wait, we need to be able to
sleep directly from within the kernel by moving
the context switching completely into the kernel.
2021-08-08 20:48:55 +02:00
.vscode vscode: update C settings to match CMake 2021-08-03 17:34:13 +02:00
arch sched: complete rework of context switching 2021-08-08 20:48:55 +02:00
contrib arch: use CMSIS after all 2021-08-07 14:30:09 +02:00
include sched: complete rework of context switching 2021-08-08 20:48:55 +02:00
init sched: make sleeping actually work 2021-08-05 18:52:51 +02:00
kernel sched: complete rework of context switching 2021-08-08 20:48:55 +02:00
lib sched: complete rework of context switching 2021-08-08 20:48:55 +02:00
.editorconfig Add some compiler flag macros for convenience 2020-06-12 03:43:11 +02:00
.gitignore gitignore: ignore hidden files in .vscode 2021-08-03 14:41:58 +02:00
.gitmodules arch: use CMSIS after all 2021-08-07 14:30:09 +02:00
CMakeLists.txt arch: use CMSIS after all 2021-08-07 14:30:09 +02:00
LICENSE kiss capitalism goodbye for good 2021-05-10 16:19:38 +02:00
options.cmake syscall: add config option to check syscall source 2021-08-01 23:28:25 +02:00
README.md README: clarify what architectures are supported 2021-08-03 17:35:08 +02:00

The Ardix Kernel

This is the source tree of Ardix, a microkernel for various Arduino boards that implements some core concepts of the Unix philosophy. Please note that this project is not affiliated with or endorsed by Arduino s.r.l. in any way. Only ARM-based boards are supported at the moment (and probably ever will be, because AVR MCUs just don't have enough horsepower).

License

Copyright (c) 2020, 2021 Felix Kopp owo@fef.moe.

Ardix is non-violent software: you may only use, redistribute, and/or modify it under the terms of the CNPLv6+ as found in the LICENSE file in the source code root directory or at https://git.pixie.town/thufie/CNPL.

Ardix comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. See the CNPLv6+ for details.

Compiling

Prerequisites

  • The GNU toolchain, including
    • arm-gcc
    • arm-ld
    • arm-objcopy
  • CMake >= 3.14
  • A programmer (bossac recommended)
  • A Unix-like shell (sorry Microsoft lackeys, you can use the Windows Subsystem for Linux for compiling but probably not for flashing)

Configuration

Configuration is done with the standard CMake config system. See options.cmake for a full list of available configuration variables. In the simplest case, you will only need to specify the target architecture (ARCH) to get a basic build. The following architectures are supported:

  • at91sam3x8e (Arduino Due)

Build

To build the EEPROM image, execute the following command. Pass any other configuration options you want to set to the first command or use cmake-gui(1).

# Replace <target> with one of the target architectures from the list above
# This will default to at91sam3x8e (Arduino Due)
cmake -DARCH=<arch> -B build -S .
cmake --build build

This will create ardix.bin in the build directory, which can be passed to bossac for flashing. If you are using an Arduino DUE (at91sam3x8e), make sure to connect the USB cable to the programmer port (the one closer to the power jack).

# Replace <tty> with the name of the tty device in /dev
# that is connected to your Arduino
bossac -e -w -v -b -a --port=<tty> build/ardix.bin

Please refer to bossac --help for more information on how to use it.