mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-04-21 15:46:31 -04:00
Add hardcoded preloaded app size
- Enable TKEY_DEBUG - Wait for something on CDC before continuing
This commit is contained in:
parent
a1acbe7cd7
commit
820c273e7f
@ -496,6 +496,21 @@ int main(void)
|
||||
|
||||
scramble_ram();
|
||||
|
||||
// Wait for terminal program and a character to be typed
|
||||
enum ioend endpoint = IO_NONE;
|
||||
uint8_t available = 0;
|
||||
uint8_t in = 0;
|
||||
|
||||
if (readselect(IO_CDC, &endpoint, &available) < 0) {
|
||||
// readselect failed! I/O broken? Just redblink.
|
||||
assert(1 == 2);
|
||||
}
|
||||
|
||||
if (read(IO_CDC, &in, 1, 1) < 0) {
|
||||
// read failed! I/O broken? Just redblink.
|
||||
assert(1 == 2);
|
||||
}
|
||||
|
||||
if (part_table_read(&part_table) != 0) {
|
||||
// Couldn't read or create partition table
|
||||
assert(1 == 2);
|
||||
@ -506,6 +521,10 @@ int main(void)
|
||||
run(&ctx);
|
||||
#endif
|
||||
|
||||
// Lie and tell filesystem we have a 128 kiB device app on
|
||||
// flash.
|
||||
part_table.pre_app_data.size = 0x20000;
|
||||
|
||||
// Just start the preloaded app.
|
||||
if (preload_load(&part_table) == -1) {
|
||||
state = FW_STATE_FAIL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user