risc-v-tlm/tests/C/trace3/trace3.c

13 lines
179 B
C

#define TRACE (*(unsigned char *)0x40000000)
void main(void) {
char msg[] = "abcdefg\n";
int i;
for (i=0; i<5; i++) {
TRACE = msg[i];
}
asm volatile ("ecall");
}