Trice Output to SD Cards and Custom Writers
- Enable
TRICE_DEFERRED_AUXILIARY8in your project specific triceConfig.h file. - Enabling
TRICE_DEFERRED_AUXILIARY8is possible parallel to any direct and/or deferred output. - The
TRICE_DEFERRED_OUT_FRAMINGvalue is used also for the deferred auxiliary writes. - Consider the value for
TRICE_DEFERRED_TRANSFER_MODE. TheTRICE_SINGLE_PACK_MODEwould trigger a file write function on each single Trice message. -
Provide a self-made function like this:
/// mySDcardWrite performs SD-card writing by appending to file myTriceLogs.bin. mySDcardWrite(const uint8_t* buf, size_t bufLen){ ... } /// Assign this function pointer accordingly. UserNonBlockingDeferredWrite8AuxiliaryFn = mySDcardWrite; - If the SD-card write is more effective using 32-bits chunks, consider
TRICE_DEFERRED_AUXILIARY32, what is recommended also if you use the encryption option.TRICE_DEFERRED_AUXILIARY32writes whole 32-bit words and pads the last word with zero bytes when needed.
- There maybe use cases for
TRICE_DIRECT_AUXILIARY8orTRICE_DIRECT_AUXILIARY32, but consider the max write time. - Placing the files til.json and li.json anto the SD-card as well might be meaninjful.
-
To decode myTriceLogs.bin later
trice log -port FILEBUFFER -args myTriceLogs.bin -hs off