This section refers to the fundamental structures of the software system and the discipline of creating such structures and systems. The software architecture functions as a blueprint for the system and the developing project, laying out the assignments necessary to be executed to fulfill the system needs. In other words, it may hazily be defined by the most important aspects of the internal design of the software system.
The project was developed using a modular programming technique, splitting the project by several files, called modules. A module is a collection of functions that perform the related assignments. This way, the project was broken into different modules, with a header file for each source file with the definitions of all functions and global variables of that module that must be used by others. This approach has several advantages, for instance, it keeps the code structure organized and allows each module to be compiled and tested separately. The system was built based on two libraries, shown in the figure below, one with all the modules that serve the different needs of the system (SembLib), and the other with the adaptations of those modules to a concurrent system with FreeRTOS (SembLibRTOS).
All the modules within the SembLib library were developed using the TivaWare libraries, avoiding direct contact with the microcontroller configuration registers for an easier debug and understanding. They also share a common function, the initialization, however each module has his own initialization. This initialization function is required to be called prior to any other functions within the module.
All the developed modules inside the SembLib library had to be adapted to a concurrency system that uses FreeRTOS. Thus, a new library with new modules had to be created (SembLibRTOS), this library took advantage of all the modules developed for a non-concurrency system with the necessary tweaks to work in a concurrent one.
To your right, you can observe the task diagram of the system, which includes the tasks inter-process communication.