mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-05 22:43:39 +00:00
Handle syscall cstring argument when pointing to extram
This commit is contained in:
parent
ce63353156
commit
74267d94df
3 changed files with 100 additions and 13 deletions
|
|
@ -42,6 +42,25 @@ void main(void) {
|
|||
uint16_t *p = (uint16_t *)UVM32_EXTRAM_BASE;
|
||||
printdec(p[7]); // short read
|
||||
} break;
|
||||
case TEST9: {
|
||||
uint8_t *p = (uint8_t *)UVM32_EXTRAM_BASE;
|
||||
p[0] = 'h';
|
||||
p[1] = 'e';
|
||||
p[2] = 'l';
|
||||
p[3] = 'l';
|
||||
p[4] = 'o';
|
||||
printbuf(p, 5); // try to print from extram (unterminated)
|
||||
} break;
|
||||
case TEST10: {
|
||||
uint8_t *p = (uint8_t *)UVM32_EXTRAM_BASE;
|
||||
p[0] = 'h';
|
||||
p[1] = 'e';
|
||||
p[2] = 'l';
|
||||
p[3] = 'l';
|
||||
p[4] = 'o';
|
||||
p[5] = '\0';
|
||||
println(p); // try to print from extram (terminated)
|
||||
} break;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue