ThreadX is a lightweight real-time operating system (RTOS) that is perfectly at home in highly demanding embedded systems and IoT devices. It has been installed more than six billion times worldwide, for instance in consumer devices, medical electronics, and industrial machinery. Technolution recently carried out a port of ThreadX to a commercially available RISC-V softcore processor.
Small and versatile
ThreadX is produced by the American company Express Logic, market leader in the field of royalty-free real-time operating systems. The basic version of ThreadX is minuscule: the RTOS is only two kilobytes large and needs no more than a kilobyte of memory space. Its small size makes ThreadX particularly suitable for applications with limited resources and low energy consumption. It is no surprise therefore that this RTOS is often used in IoT devices. The system is small but versatile: it’s a kernel that can be used among other things to schedule threads, process interrupts, and communicate between threads. The basic functionality of ThreadX can easily be expanded.
Port to RISC-V
Express Logic asked us whether it was possible to implement ThreadX in a RISC-V processor. RISC-V is an open-source instruction set for which both softcores and physical processors can be developed. A RISC-V softcore processor can then be implemented on an FPGA, a programmable chip. Technolution had already developed an RISC-V processor before, as a basis for various security products. We successfully ported the ThreadX RTOS to Microsemi’s RISC-V processor for Express Logic.
We were able therefore to answer Express Logic’s question with a definitive ‘yes’. But we did have to clear a few obstacles on our way. One of them was that Microsemi’s RISC-V processor did not yet function properly on the chosen platform. By using our own RISC-V processor with corresponding tooling, we were able to isolate the problem and switch to another platform. The port of ThreadX that we realized allows Express Logic to offer a ready-made RTOS for the RISC-V architecture that can be easily implemented on FPGAs. This means that ThreadX is now an even more attractive option for developers who use softcores.