Overview
NTIOS can load programs from an SD card and run them, as well as provides an assembler and text editor that allows these programs to be written on the system. This is done through an emulator, which runs an architecture I designed to run fast on emulators. It also provides a bunch of useful APIs for the Arduino script that hosts it. I'm still working on running it outside of Arduino, as a lot of libraries are still used to make it work, but I've made some progress on that front.
NTIOS has a lot of features, some of them are sort of random or niche:
- Basic hardware abstraction layer, drivers can be initialized after the system starts
- Drivers for many different devices, including displays, CTP controllers, sensors, GPS, etc - many of which can be initialized from the system CLI shell
- Software framework for GUIs and visuals
- Detects and controls the CPU frequency on Teensy 4.x
- CPU architecture detection via macros for a few architectures, including Xtensa, various ARM architectures, and Teensy 4
- Built-in shell with useful functions for file manipulation, and even a text editor if you are on a graphical terminal
- Some file encoders/decoders for WAV and BMPs, also a simple compressed audio format I made up
- Code for PID loops and Kalman-filter based sensor fusion, which can be inserted into the HAL if I remember correctly
- Built in pixel font for graphical displays
- Configurable graphical keyboard for touch displays
It is generally tailored for portable devices and a lesser extent for robotics. A lot of this could be bloatware for certain applications, so I think at some point the different parts should be separated into modules that are inserted at compile time, instead of keeping everything loaded at once. A tablet doesn't need code for PID loops, for example.
This OS was created as a sort of development environment for various ideas. It's been used in a few portable device prototypes of mine, as well as other random stuff. That's why it has such diverse and specific features.
Driver List
Here's a list of the drivers I've written or worked on for the system, with notes indicating if it's unfinished:
- BNO055 IMU
- GT911 Capacitive Touch Controller
- FT5436 Capacitive Touch Controller
- ILI9481 LCD Screen Controller
- NMEA GPS
- MCP23017 GPIO Expander
- AT command cellular driver (not well tested)
- RA8875 Driver (probably needs some work, not sure what the state is)
Progress
I've been working on adding some other features, which do not quite work yet:
- PNG decoding
- Loading ELF files and running them in the OS's environment (ie, natively running applications instead of running through an emulator)
- RA8875 driver still needs some work I think, need to test it
I need to make some standard graphical shell for this OS, as of right now there is no good way to use it via touchscreen or keyboard/mouse. That would need to be a different sort of 'package' from the OS, so there isn't a graphical shell bloating the base OS.
Also, as previously mentioned, I think a separation of the OS into different modules would be useful, so a reduced form of it can easily be compiled.
Supported Devices
I know it works with ESP32, Artemis, and Teensy 4.0. I would expect that it works with many other devices and architectures on Arduino, I just haven't tried others yet.
Integration with Processors
The OS is a git repo to be inserted in the sketch's 'src' directory. Since the OS's repo cannot contain drivers for every interface on every processor, it is up to the sketch to extend some of the HAL base classes and add them to the device list. From there the other drivers can be attached to the base hardware drivers. For example, on Teensy there is a TeensySPIPort class, which provides the OS with access to the SPI bus. From here the OS's included drivers can use the bus in a modular way. The only other required steps are OS initialization, and starting any shell code or intended application code:
/*
* This function sets...
Read more »