I want to implement the Crazyflie LOG subsystem in ADA. I'm trying to figure out how it works in log.h and log.c.
I see that the macros used to register Log groups with the variables to be logged (LOG_GROUP_START, LOG_GROUP_STOP) puts all the 'log_s' structures (containing the type, the name and the address of the logged variable) in a special binary section.
My question is why you want to put all these structures in a special section instead of defining a function that symply adds a 'log_s' struct into a global array of 'log_s' structs when adding the variables we want to log? Is it necessary to know the exact size and all the variables we want to log at compile time?
I'm not sure to understand the reasons of this choice, but I'm sure that they exist. I just want to know them.
Thank you in advance
