diff options
author | Uros Majstorovic <majstor@majstor.org> | 2018-01-11 18:14:18 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2018-01-11 18:14:18 +0100 |
commit | 0b6d7b1baf2baf1f36a3a92865730c2d78fc12be (patch) | |
tree | 6888301324848f083cb47ea0b45e043bde90e60c | |
parent | 0b7db1a4555da3f9a153d72f44bc2a5d070df51f (diff) |
platforms added
-rw-r--r-- | code/Makefile.fe310 | 12 | ||||
-rw-r--r-- | code/Makefile.posix | 7 | ||||
-rw-r--r-- | code/config_fe310.h | 1 | ||||
-rw-r--r-- | code/core/core.h | 5 | ||||
-rwxr-xr-x | code/platform | 14 |
5 files changed, 36 insertions, 3 deletions
diff --git a/code/Makefile.fe310 b/code/Makefile.fe310 new file mode 100644 index 0000000..aff2784 --- /dev/null +++ b/code/Makefile.fe310 @@ -0,0 +1,12 @@ +htable= +vconn=vconn +platform=fe310 +rbuf_obj= + +FE310_HOME=/Users/majstor/src/sifive/freedom-e-sdk +EOS_HOME=/Users/majstor/src/sifive/hello + +CC=$(FE310_HOME)/work/build/riscv-gnu-toolchain/riscv64-unknown-elf/prefix/bin/riscv64-unknown-elf-gcc +AR=$(FE310_HOME)/work/build/riscv-gnu-toolchain/riscv64-unknown-elf/prefix/bin/riscv64-unknown-elf-ar +CFLAGS_PL=-O3 -fno-builtin-printf -march=rv32imac -mabi=ilp32 -mcmodel=medany -I$(EOS_HOME) -I$(FE310_HOME)/bsp/include -I$(FE310_HOME)/bsp/drivers -I$(FE310_HOME)/bsp/env -I$(FE310_HOME)/bsp/env/freedom-e300-hifive1 +# LDFLAGS_PL=-lm -pthread
\ No newline at end of file diff --git a/code/Makefile.posix b/code/Makefile.posix new file mode 100644 index 0000000..2680875 --- /dev/null +++ b/code/Makefile.posix @@ -0,0 +1,7 @@ +htable=htable +vconn=vconn +platform=posix +obj_rbuf=rbuf.o rbuf_send.o rbuf_recv.o msgq.o + +CFLAGS_PL=-O3 +LDFLAGS_PL=-lm -pthread
\ No newline at end of file diff --git a/code/config_fe310.h b/code/config_fe310.h new file mode 100644 index 0000000..fc95c26 --- /dev/null +++ b/code/config_fe310.h @@ -0,0 +1 @@ +#define ECP_DEBUG 1
\ No newline at end of file diff --git a/code/core/core.h b/code/core/core.h index 3f8fd38..ce81d9d 100644 --- a/code/core/core.h +++ b/code/core/core.h @@ -81,8 +81,9 @@ #define ecp_conn_is_reg(conn) ((conn->flags) & ECP_CONN_FLAG_REG) #define ecp_conn_is_open(conn) ((conn->flags) & ECP_CONN_FLAG_OPEN) -#include "config.h" +#include "../config.h" +#include <sys/types.h> #include <stddef.h> #include <stdint.h> @@ -130,8 +131,6 @@ typedef uint32_t ecp_seq_t; #define ECP_SIZE_PLD_RAW_BUF(X,T,P) (ECP_SIZE_PLD(X,T)+((P) ? ((P)->pcount+1)*(ECP_SIZE_PKT_HDR+ECP_SIZE_MSG_BUF(T,P)+ECP_AEAD_SIZE_TAG) : 0)) #define ECP_SIZE_PKT_RAW_BUF(X,T,P) (ECP_SIZE_PLD_RAW_BUF(X,T,P)+ECP_SIZE_PKT_HDR+ECP_AEAD_SIZE_TAG) -#include <sys/types.h> - #ifdef ECP_WITH_PTHREAD #include <pthread.h> #endif diff --git a/code/platform b/code/platform new file mode 100755 index 0000000..545b475 --- /dev/null +++ b/code/platform @@ -0,0 +1,14 @@ +#!/bin/sh +# + +BASEDIR=$(dirname $0) + +if [ -z $1 ]; then + echo usage $0 "<platform>" + exit 1 +fi + +PLATFORM=$1 + +ln -sf $BASEDIR/Makefile.$PLATFORM $BASEDIR/Makefile.platform +ln -sf $BASEDIR/config_$PLATFORM.h $BASEDIR/config.h
\ No newline at end of file |