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

@@ -8,10 +8,15 @@
#include "platform.h"
#include "stub.h"
#include "weak_under_alias.h"
#include "semihosting.h"
ssize_t __wrap_write(int fd, const void* ptr, size_t len)
{
const uint8_t * current = (const uint8_t *)ptr;
#if defined(SEMIHOSTING)
sh_write(current, fd);
return len;
#endif
if (isatty(fd)) {
for (size_t jj = 0; jj < len; jj++) {
#if defined(BOARD_ehrenberg)