testloadapp: Delete any existing preloaded app before installing

This commit is contained in:
Mikael Ågren 2025-03-24 13:54:19 +01:00
parent 2caaf2a453
commit 5cba9b3f7e
No known key found for this signature in database
GPG Key ID: E02DA3D397792C46

View File

@ -26,6 +26,11 @@ int install_app(uint8_t secret_key[64])
return -1;
}
if (syscall(TK1_SYSCALL_PRELOAD_DELETE, 0, 0, 0) < 0) {
puts(IO_CDC, "couldn't delete preloaded app\r\n");
return -1;
}
int err = syscall(TK1_SYSCALL_PRELOAD_STORE, 0, (uint32_t)blink,
sizeof(blink));