Microcontroller Software
This section of the documentation of the HotRIO project describes the information and working principles of the software which needs to be run by the microcontrollers embedded in the HotRIO product line.
Warning
The microcontrollers which run the HotRIO firmware are those tasked with the management operations to set up, configure and boot the different HotRIO components.
At the moment of writting this documentation, the microcontrollers that fulfill this definition are the STM32-G0 mircocontrollers embedded in the Pirnha and Ipanema boards as well as the STM32-G0 microcontroller embedded in the expansion boards for the HotRIO chassis.
Other microcontrollers embedded in different HotRIO components which do not have management purposes throught the HotRIO standard here defined are not considered HotRIO microcontrollers, and therefore this guide does not apply to such devices. An example of such scenario would be the microcontroller embbeded in the VIPER expansion board, which is tasked with IO functionality such as UDP.
HotRIO firmware is just a set of standard functionalities and components which allow flexible configuration and monitoring of the HotRIO-capable devices (such as the embedded FPGAs). Such standardisation allow the HotRIO devices to be configured and operated in a multitude of environments and roles just by changing its configuration through a set of files. In such sense, the firmware exposes a set of tools to create data-driven applications in the microcontrollers.
HotRIO firmware, being a standardisation software layer, relies on a set of software layers/components to be able to interface the microcontroller and other advanced functionalities. Such layers/components are described here:
STM32 HAL (Hardware Abstraction Layers) and LL (Low Level) libraries by STMicroelectronics provide standardised access to the microcontroller-specific peripherals, such access is then further abstracted by the HotRIO firmware drivers.
FreeRTOS in conjunction with the needed CMSIS layer provide the OS capabilities to the HotRIO firmware, allowing multitasking and operation scheduling to be used by the HotRIO firmware.
STM32 USB Stack libraries by STMicroelectronics provide both host and device capabilities through the USB port to access the microcontroller to perform management actions.
FatFS library provides the microcontroller with an onboard filesystem (allocated in the external flash memory) to store configurations and retrieve them during startup.
EK18 is the Kermit protocol library used for the file transfer capabilities embedded on the microcontroller which allows the user to upload and download files from the microcontroller fileSystem.
On top of such Third-Party libraries and capabilities, the HotRIO firmware provides the following capabilities to the programmer and maintainer of HotRIO components:
Abstraction of the devices connected to the different microcontroller buses (SPI, I2C, UART…) by means of encapsulated drivers available for a selection of devices in the firmware repository. Apart from that, the driver structure in which such devices are represented allows devices to be connected in networks and managed accordingly. All these features are loaded dynamically from a configuration file stored in the filesystem, allowing flexible configuration of these devices depending on the needs of the integrator.
Standardised CLI-based interface to all the different HotRIO components (either by direct USB-serial port connection) or through a more sophisticated interface such as HotRIO sideband remote communication. This interface allows the maintainer to perform all the needed manageing actions on the microcontroller and upload/download configurations by using a standar serial port.
The following sections of this documentation provide more insight on the firmware development and organisation: