REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
|
#include <hashflash.h>
Static Public Member Functions | |
static uint32_t | len () |
Returns the number of bytes of the flash image. | |
static utils::sha256 | sha256sum () |
Computes a SHA256 hash of the program image stored on Flash. | |
static void | toJson (JsonVariant target) |
Detailed Description
Definition at line 17 of file hashflash.h.
Member Function Documentation
◆ len()
|
inlinestatic |
Returns the number of bytes of the flash image.
This is identical to the output of
shell> objcopy –input-target=ihex –output-target=binary firmware.hex firmware.bin shell> ls -l firmware.bin
i.e. the file size of the firmware image in binary format. Note that the linker storage cell actually holds data, cf. https://sourceware.org/binutils/docs/ld/Source-Code-Reference.html
Definition at line 28 of file hashflash.h.
References _flashimagelen, and uint32_t.
Referenced by setup(), sha256sum(), and toJson().
◆ sha256sum()
|
inlinestatic |
Computes a SHA256 hash of the program image stored on Flash.
This is identical to the output of
shell> objcopy –input-target=ihex –output-target=binary firmware.hex firmware.bin shell> sha256sum firmware.bin
The computation takes 3383us. If you use the output in networking requests, it is fast enough to compute it on need, no caching neccessary.
Definition at line 40 of file hashflash.h.
References flash_origin, and len().
Referenced by loader::SinglePluginLoader::load_and_execute(), setup(), and toJson().
◆ toJson()
|
inlinestatic |
Definition at line 48 of file hashflash.h.
References len(), sha256sum(), and utils::sha256::to_string().
Referenced by msg::handlers::GetSystemIdent::handle().
The documentation for this struct was generated from the following file:
- lib/controller/src/utils/hashflash.h