The logging service is essential to help us keep track of everything that is going on within the satellite’s flight software. Logging is like printing debug messages to the console. However, instead of just printing messages, logging will also save the debug message to a text file along with a timestamp for when that message was reported. By saving debug messages to text files, we can later review these text files to get a deeper understanding as to what was going on inside the system at a particular time.
The role and design of the logging service is pretty straightforward. The logging service is a Zephyr thread that will read messages that are stored in a queue (Queue A), apply a timestamp to those messages and log level to those messages, and then append the newly formed log messages to another queue (Queue B). The messages stored in Queue A come from other software components that want to log events to a text file. After the logging service adds messages to Queue B, another software component known as the Storage Service will take the messages and write them to a text file stored in NOR flash memory.
Your task is to create the Logging Service, and use test threads to write to Queue A and read from Queue B to simulate the Logging Service’s environment. If successful, your Logging Service will be able to quickly read messages from Queue A, create the log message, and then append it to Queue B. You will need a set of functions that use string manipulation techniques to format the log message the way we want it to be (see Tasks for the format).
Your main points of contacts are:
While creating and testing your code, please use the STM32G431RB MCU. This is the MCU that will be used for our on-board computer (OBC).
The log message will follow this particular format:
If you have suggestions for anything to change within the log message, bring it up with @Eesa Aamer and we can get your changes implemented.
[DATE] [TIME] [LOG LEVEL] [COMPONENT] [message]