Adding semihosting support for bmsp

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

No files matched your search

+5
View File
@@ -10,10 +10,15 @@
#include "platform.h"
#include "stub.h"
#include "weak_under_alias.h"
#include "semihosting.h"
ssize_t __wrap_read(int fd, void* ptr, size_t len)
{
uint8_t * current = (uint8_t *)ptr;
#if defined(SEMIHOSTING)
sh_read(current, fd, len);
return;
#endif
#if defined(BOARD_hifive1)
volatile uint32_t * uart_rx = (uint32_t *)(UART0_CTRL_ADDR + UART_REG_RXFIFO);
volatile uint8_t * uart_rx_cnt = (uint8_t *)(UART0_CTRL_ADDR + UART_REG_RXCTRL + 2);