Skip to content

Commit

Permalink
save riscv bits
Browse files Browse the repository at this point in the history
  • Loading branch information
keith-packard committed Oct 22, 2019
1 parent f9305d6 commit 28a4639
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 3,538 deletions.
9 changes: 7 additions & 2 deletions chips/fe310/snek-fe310.defs
Expand Up @@ -13,6 +13,7 @@
#

FREEDOM_METAL = /home/keithp/misc/sifive/src/freedom-e-sdk/freedom-metal/
BSP = /home/keithp/misc/sifive/src/freedom-e-sdk/bsp/qemu-sifive-e31
FM_SRC = $(FREEDOM_METAL)/src
FM_DRIVERS = $(FM_SRC)/drivers
FM_INC = $(FREEDOM_METAL)
Expand Down Expand Up @@ -69,13 +70,17 @@ WARN_FLAGS=-Wall -Wextra -Wcast-align \
-Wmissing-declarations \
-Wnested-externs \
-Wshadow \
-Warray-bounds=2
-Warray-bounds=2\
-Wno-missing-prototypes\
-Wno-unused-parameter\
-Wno-strict-prototypes\
-Wno-missing-declarations

AO_CFLAGS=\
-std=gnu99 $(WARN_FLAGS) $(OPT) -g

FE310_CFLAGS=-march=rv32imac -mabi=ilp32 \
-I. -I$(SNEK_FE310) -I$(SNEK_ROOT) -I$(FREEDOM_METAL) $(PICOLIBC_CFLAGS)
-I. -I$(SNEK_FE310) -I$(SNEK_ROOT) -I$(BSP)/install/include -I$(BSP) -I$(FREEDOM_METAL) $(PICOLIBC_CFLAGS)

CFLAGS = $(FE310_CFLAGS) $(SNEK_CFLAGS) $(AO_CFLAGS)

Expand Down
2 changes: 0 additions & 2 deletions chips/fe310/snek-metal.c
Expand Up @@ -24,14 +24,12 @@
static int
snek_metal_putc(char c, FILE *f)
{
(void) f;
return metal_tty_putc(c);
}

int
snek_metal_getc(FILE *f)
{
(void) f;
int c;
for (;;) {
if (metal_tty_getc(&c) != 0)
Expand Down
4 changes: 3 additions & 1 deletion ports/qemu-sifive-e31/Makefile
Expand Up @@ -24,11 +24,11 @@ include $(SNEK_FE310)/snek-fe310.defs
SNEK_EXTRA_SRC = \

SNEK_LOCAL_SRC = \
inline.c \
fixed-clock.c \
riscv_plic0.c \
riscv_clint0.c \
riscv_cpu.c \
riscv_htif0.c \
sifive_fe310-g000_prci.c \
sifive_fe310-g000_hfrosc.c \
sifive_fe310-g000_hfxosc.c \
Expand All @@ -41,6 +41,8 @@ SNEK_LOCAL_SRC = \
sifive_rtc0.c \
sifive_gpio0.c \
sifive_local-external-interrupts0.c \
snek-e31.c \
snek-metal.c \
$(SNEK_FE310_SRC)

SNEK_LOCAL_INC = \
Expand Down
288 changes: 0 additions & 288 deletions ports/qemu-sifive-e31/inline.c

This file was deleted.

0 comments on commit 28a4639

Please sign in to comment.