The Atomthreads operating system design enables easy porting to alternative CPU architectures and compiler tools. There follows some documentation describing the steps necessary to get up and running on your own embedded platform. This should be read in conjunction with examination of the existing architecture ports in the source tree, which include further documentation within the source files.
Ports to entirely new architectures can be created by writing four key functions which are required by the kernel. These architecture-specific functions are described here:
One of the main considerations when porting the Atomthreads RTOS to a new architecture, is which registers need to be saved and restored during a context-switch. We provide some guidance on how to minimise the register saves using knowledge of your compiler's calling conventions here:
With the core context-switch functionality and other kernel requirements in place, you can create a simple initialisation file to bring up the operating system:
Once you start writing your own applications, you will likely need to add interrupt handlers for supporting the hardware devices on your embedded platform. Here we describe how to integrate your ISRs with the Atomthreads RTOS such that you can achieve synchronisation between ISRs and threads:
When you have completed porting to your architecture, you can take advantage of the automated test suite in the source tree to prove correct operation of all core RTOS features on your own architecture. These built-in tests cover all key functionality and are designed to provide confidence in ports to new architectures.