mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-05 22:43:39 +00:00
Zero extram on startup.
On crash, dump extram to file
This commit is contained in:
parent
0ded19d04a
commit
7fae8c129f
1 changed files with 5 additions and 0 deletions
|
|
@ -203,6 +203,7 @@ int main(int argc, char *argv[]) {
|
|||
printf("Failed to allocate extram!\n");
|
||||
return 1;
|
||||
}
|
||||
memset(extram_buf, 0x00, extram_len);
|
||||
uvm32_extram(&vmst, extram_buf, extram_len);
|
||||
}
|
||||
|
||||
|
|
@ -227,6 +228,10 @@ int main(int argc, char *argv[]) {
|
|||
isrunning = false;
|
||||
memdump("host-ram.dump", vmst.memory, UVM32_MEMORY_SIZE);
|
||||
printf("memory dumped to host-ram.dump, pc=0x%08x\n", vmst.core.pc);
|
||||
if (extram_buf != NULL) {
|
||||
memdump("host-extram.dump", (uint8_t *)extram_buf, extram_len);
|
||||
printf("extram dumped to host-extram.dump\n");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case UVM32_EVT_SYSCALL:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue