summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorkkitayam <[email protected]>2021-07-01 00:19:03 +0900
committerkkitayam <[email protected]>2021-07-02 11:37:23 +0900
commitea9ec1fb43eec29c00611335ea1c0585074f2b1b (patch)
treedb8643474fd31acae417cf65173004e9244b5293 /hw
parent9b3ec69b27b5d18d4c1f34d6730cec21afc8e628 (diff)
extend stack areas to enable logging
add dummy functions to avoid warnings when logging is enable remove codes regarding OPTLIB
Diffstat (limited to 'hw')
-rw-r--r--hw/bsp/board.c2
-rw-r--r--hw/bsp/rx/boards/gr_citrus/gr_citrus.c48
-rw-r--r--hw/bsp/rx/boards/gr_citrus/r5f5631fd.ld4
-rw-r--r--hw/bsp/rx/boards/rx65n_target/r5f565ne.ld4
-rw-r--r--hw/bsp/rx/boards/rx65n_target/rx65n_target.c29
-rw-r--r--hw/bsp/rx/family.mk20
6 files changed, 64 insertions, 43 deletions
diff --git a/hw/bsp/board.c b/hw/bsp/board.c
index 383a02ef4..9dae8a04d 100644
--- a/hw/bsp/board.c
+++ b/hw/bsp/board.c
@@ -25,7 +25,7 @@
#include "board.h"
-#if defined(__MSP430__)
+#if defined(__MSP430__) || defined(__RX__)
#define sys_write write
#define sys_read read
#else
diff --git a/hw/bsp/rx/boards/gr_citrus/gr_citrus.c b/hw/bsp/rx/boards/gr_citrus/gr_citrus.c
index b773e0dd0..caf5fd6fa 100644
--- a/hw/bsp/rx/boards/gr_citrus/gr_citrus.c
+++ b/hw/bsp/rx/boards/gr_citrus/gr_citrus.c
@@ -36,24 +36,20 @@
*
* Connect the pins between GR-CITRUS and JLink as follows.
*
- * | JTAG Function | GR-CITRUS pin name| JLink pin No.| note |
- * |:-------------:|:-----------------:|:------------:|:--------:|
- * | VTref | 3.3V | 1 | |
- * | TRST | 5 | 3 | |
- * | GND | GND | 4 | |
- * | TDI | 3 | 5 | |
- * | TMS | 2 | 7 | |
- * | TCK | 14 | 9 | short J4 |
- * | TDO | 9 | 13 | short J5 |
- * | nRES | RST | 15 | |
+ * | Function | GR-CITRUS pin | JLink pin No.| note |
+ * |:---------:|:-------------:|:------------:|:--------:|
+ * | VTref | 3.3V | 1 | |
+ * | TRST | 5 | 3 | |
+ * | GND | GND | 4 | |
+ * | TDI | 3 | 5 | |
+ * | TMS | 2 | 7 | |
+ * | TCK/FINEC | 14 | 9 | short J4 |
+ * | TDO | 9 | 13 | short J5 |
+ * | nRES | RST | 15 | |
*
* JLink firmware needs to update to V6.96 or newer version to avoid
* [a bug](https://forum.segger.com/index.php/Thread/7758-SOLVED-Bug-in-JLink-from-V6-88b-regarding-RX65N)
* regarding downloading.
- *
- * When using SEGGER RTT, `RX_NEWLIB=0` should be added to make command arguments.
- * The option is used to change the C runtime library to `optlib` from `newlib`.
- * RTT may not work with `newlib`.
*/
#include "../board.h"
@@ -253,3 +249,27 @@ uint32_t board_millis(void)
#else
uint32_t SystemCoreClock = 96000000;
#endif
+
+int close(int fd)
+{
+ (void)fd;
+ return -1;
+}
+int fstat(int fd, void *pstat)
+{
+ (void)fd;
+ (void)pstat;
+ return 0;
+}
+off_t lseek(int fd, off_t pos, int whence)
+{
+ (void)fd;
+ (void)pos;
+ (void)whence;
+ return 0;
+}
+int isatty(int fd)
+{
+ (void)fd;
+ return 1;
+}
diff --git a/hw/bsp/rx/boards/gr_citrus/r5f5631fd.ld b/hw/bsp/rx/boards/gr_citrus/r5f5631fd.ld
index fa8142936..bb9c297c7 100644
--- a/hw/bsp/rx/boards/gr_citrus/r5f5631fd.ld
+++ b/hw/bsp/rx/boards/gr_citrus/r5f5631fd.ld
@@ -1,5 +1,5 @@
-__USTACK_SIZE = 0x00000200;
-__ISTACK_SIZE = 0x00000200;
+__USTACK_SIZE = 0x00000400;
+__ISTACK_SIZE = 0x00000400;
MEMORY
{
diff --git a/hw/bsp/rx/boards/rx65n_target/r5f565ne.ld b/hw/bsp/rx/boards/rx65n_target/r5f565ne.ld
index a02f0c02f..8e5617f23 100644
--- a/hw/bsp/rx/boards/rx65n_target/r5f565ne.ld
+++ b/hw/bsp/rx/boards/rx65n_target/r5f565ne.ld
@@ -1,5 +1,5 @@
-__USTACK_SIZE = 0x00000200;
-__ISTACK_SIZE = 0x00000200;
+__USTACK_SIZE = 0x00000400;
+__ISTACK_SIZE = 0x00000400;
MEMORY
{
diff --git a/hw/bsp/rx/boards/rx65n_target/rx65n_target.c b/hw/bsp/rx/boards/rx65n_target/rx65n_target.c
index 96d8f36f0..20867455e 100644
--- a/hw/bsp/rx/boards/rx65n_target/rx65n_target.c
+++ b/hw/bsp/rx/boards/rx65n_target/rx65n_target.c
@@ -48,11 +48,6 @@
* JLink firmware needs to update to V6.96 or newer version to avoid
* [a bug](https://forum.segger.com/index.php/Thread/7758-SOLVED-Bug-in-JLink-from-V6-88b-regarding-RX65N)
* regarding downloading.
- *
- * When using SEGGER RTT, `RX_NEWLIB=0` should be added to make command arguments.
- * The option is used to change the C runtime library to `optlib` from `newlib`.
- * RTT may not work with `newlib`.
- *
*/
#include "bsp/board.h"
@@ -299,3 +294,27 @@ uint32_t board_millis(void)
#else
uint32_t SystemCoreClock = 120000000;
#endif
+
+int close(int fd)
+{
+ (void)fd;
+ return -1;
+}
+int fstat(int fd, void *pstat)
+{
+ (void)fd;
+ (void)pstat;
+ return 0;
+}
+off_t lseek(int fd, off_t pos, int whence)
+{
+ (void)fd;
+ (void)pos;
+ (void)whence;
+ return 0;
+}
+int isatty(int fd)
+{
+ (void)fd;
+ return 1;
+}
diff --git a/hw/bsp/rx/family.mk b/hw/bsp/rx/family.mk
index 7d7585b4a..5a8281718 100644
--- a/hw/bsp/rx/family.mk
+++ b/hw/bsp/rx/family.mk
@@ -11,25 +11,7 @@ CFLAGS += \
-fdata-sections \
-fshort-enums \
-mlittle-endian-data \
-
-RX_NEWLIB ?= 1
-
-ifeq ($(CMDEXE),1)
- OPTLIBINC="$(shell for /F "usebackq delims=" %%i in (`where rx-elf-gcc`) do echo %%~dpi..\rx-elf\optlibinc)"
-else
- OPTLIBINC=$(shell dirname `which rx-elf-gcc`)../rx-elf/optlibinc
-endif
-
-ifeq ($(RX_NEWLIB),1)
- CFLAGS += -DSSIZE_MAX=__INT_MAX__
-else
- # setup for optlib
- CFLAGS += -nostdinc \
- -isystem $(OPTLIBINC) \
- -DLWIP_NO_INTTYPES_H
-
- LIBS += -loptc -loptm
-endif
+ -DSSIZE_MAX=__INT_MAX__
SRC_C += \
src/portable/renesas/usba/dcd_usba.c \