update include paths
This commit is contained in:
@ -5,18 +5,16 @@
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../../include/tgc-vp/devices/uart.h"
|
||||
#include "../../env/tgc-vp/platform.h"
|
||||
#include "platform.h"
|
||||
#include "semihosting.h"
|
||||
#include "stub.h"
|
||||
#include "weak_under_alias.h"
|
||||
#include "semihosting.h"
|
||||
|
||||
int __wrap_puts(const char *s) {
|
||||
#if defined(SEMIHOSTING)
|
||||
sh_write0(s);
|
||||
return 0;
|
||||
#endif
|
||||
#endif
|
||||
while (*s != '\0') {
|
||||
#if defined(BOARD_ehrenberg) || defined(BOARD_tgc_vp)
|
||||
while (get_uart_rx_tx_reg_tx_free(uart) == 0)
|
||||
|
@ -1,24 +1,20 @@
|
||||
/* See LICENSE of license details. */
|
||||
|
||||
#include <stdint.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
#if defined(BOARD_ehrenberg)
|
||||
#include "platform.h"
|
||||
#endif
|
||||
#include "../../include/tgc-vp/devices/uart.h"
|
||||
#include "/scratch/gabriel/repos/Firmwares/bare-metal-bsp/env/tgc-vp/platform.h"
|
||||
#include <unistd.h>
|
||||
|
||||
#include "platform.h"
|
||||
#include "semihosting.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;
|
||||
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;
|
||||
int i = sh_read(current, fd, len);
|
||||
return i;
|
||||
#endif
|
||||
#if defined(BOARD_hifive1)
|
||||
volatile uint32_t *uart_rx = (uint32_t *)(UART0_CTRL_ADDR + UART_REG_RXFIFO);
|
||||
|
@ -5,27 +5,25 @@
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../../include/tgc-vp/devices/uart.h"
|
||||
#include "../../env/tgc-vp/platform.h"
|
||||
#include "platform.h"
|
||||
#include "semihosting.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;
|
||||
ssize_t __wrap_write(int fd, const void *ptr, size_t len) {
|
||||
const uint8_t *current = (const uint8_t *)ptr;
|
||||
#if defined(SEMIHOSTING)
|
||||
if(isatty(fd)) {
|
||||
for (size_t jj = 0; jj < len; jj++) {
|
||||
sh_writec(current[jj]);
|
||||
}
|
||||
return len;
|
||||
if (isatty(fd)) {
|
||||
for (size_t jj = 0; jj < len; jj++) {
|
||||
sh_writec(current[jj]);
|
||||
}
|
||||
return len;
|
||||
} else {
|
||||
sh_write(current, fd);
|
||||
return len;
|
||||
sh_write(current, fd);
|
||||
return len;
|
||||
}
|
||||
//return len;
|
||||
#endif
|
||||
// return len;
|
||||
#endif
|
||||
if (isatty(fd)) {
|
||||
for (size_t jj = 0; jj < len; jj++) {
|
||||
#if defined(BOARD_ehrenberg) || defined(BOARD_tgc_vp)
|
||||
|
Reference in New Issue
Block a user