Add procedure to compute unique ID at startup.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2024-04-17 11:31:11 +02:00
parent 019c5929a2
commit 22d4e62952
7 changed files with 42 additions and 26 deletions

View File

@@ -263,6 +263,9 @@ void scan_region(bool persistent) {
}
}
void wait_flash_finish();
#ifndef ENABLE_EMULATION
extern uint16_t usb_vid, usb_pid;
#endif
void scan_flash() {
initialize_flash(false); //soft initialization
if (*(uintptr_t *) flash_read(end_rom_pool) == 0xffffffff &&
@@ -278,6 +281,12 @@ void scan_flash() {
printf("SCAN\n");
scan_region(true);
scan_region(false);
#ifndef ENABLE_EMULATION
file_t *ef_vp = search_dynamic_file(EF_VP);
if (file_has_data(ef_vp)) {
}
#endif
}
uint8_t *file_read(const uint8_t *addr) {

View File

@@ -67,6 +67,10 @@
#define EF_SKDFS 0x6045
#define EF_META 0xE010
#ifndef ENABLE_EMULATION
#define EF_VP 0xE020
#endif
#define MAX_DEPTH 4
typedef PACK(struct file {