Adding semihosting support for bmsp

This commit is contained in:
gabriel
2024-04-08 14:36:22 +02:00
parent 39ee91af7d
commit e83f7996bc
14 changed files with 175 additions and 7 deletions

View File

@@ -7,6 +7,7 @@
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include "semihosting.h"
#undef putchar
int putchar(int ch)
@@ -114,7 +115,11 @@ static void vprintfmt(void (*putch)(int, void**), void **putdat, const char *fmt
if (ch == '\0')
return;
fmt++;
#if defined(SEMIHOSTING)
sh_writec(ch);
#else
putch(ch, putdat);
#endif
}
fmt++;