When you use this function
adl_errHalt ( ADL_ERR_LEVEL_APP + 1, MyErrorString );
As described in the ADL manual, it says it logs the error in non-volatile memory where there is limited space.
However I cannot find anything about what it will do if the space is out. Will it start overwriting old backtraces? Will it crash? I want to know whether it is necessary for me to check and erase the backtraces.
All I need is to be able to manually check the last few backtraces at any given time.
AFAIR, it is only possible to start from the first backtrace, then work through in sequence until you reach the last one. Then you can delete all backtraces.
So it payss to read & clear backtraces frequently - don’t let them pile up!
I would be quite happy to read them all at once, but only the last 2 or 3 will actually be of interest to me. I mention this because I will not mind if the oldest backtraces are overwritten by newer ones. I am not intending to transmit or compile the backtraces anywhere else.
Is there a simple way I could read the number of backtraces currently in the log and then if they are too high, erase them? Or could I just keep using adl_errHalt and it will just keep working?
Also, if I want to read them to a terminal emulator, could I use this:
If I build it into my application with a way to trigger it (for a diagnostic situation).
Obviously I have copied this from the “nominal use case of the ADL Error service” in the ADL User Guide (except rather than returning the buffer I am attempting to output it to the console - not sure if this way of referring to the Buffer is sensible though?). There seems to be something unexplained here though; does adl_errRetrieveNextBacktrace retrieve all the backtraces at once? If not why is there no loop? And if so how do you separate each backtrace entry?
All I really want is the easiest way to read the strings from the backtrace logs. Can this be done in M2M studio or something?