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

@@ -5,9 +5,16 @@
#include <sys/types.h>
#include "stub.h"
#include "weak_under_alias.h"
#include "semihosting.h"
off_t __wrap_lseek(int fd, off_t ptr, int dir)
{
#if defined(SEMIHOSTING)
if(sh_istty(fd))
return 0;
sh_seek();
return ptr;
#endif
if (isatty(fd))
return 0;