Updater: Add safety memory to updater

This commit is contained in:
2021-04-06 20:55:41 +02:00
parent 08eee66d30
commit 6e5627fde2
9 changed files with 86 additions and 22 deletions

View File

@@ -22,7 +22,10 @@
#include <helper-macros/helper-macros.h>
#include <stm-periph/crc-unit.h>
#include <stm-periph/backup-ram.h>
#ifndef SAFETY_MEMORY_STRIPOUT_DUMP
#include <base64-lib/base64-lib.h>
#endif /* SAFETY_MEMORY_STRIPOUT_DUMP */
static int word_to_error_memory_entry(uint32_t entry_data, struct error_memory_entry *out)
{
@@ -608,6 +611,8 @@ int safety_memory_get_config_override(uint32_t idx, struct config_override *conf
return 0;
}
#ifndef SAFETY_MEMORY_STRIPOUT_DUMP
int safety_memory_dump_base64(char *buffer, size_t buffsize, size_t *used_size)
{
uint32_t safety_mem_size;
@@ -633,3 +638,5 @@ int safety_memory_dump_base64(char *buffer, size_t buffsize, size_t *used_size)
*used_size = output_size + 1u;
return 0;
}
#endif /* SAFETY_MEMORY_STRIPOUT_DUMP */