forked from Firmware/Firmwares
update include paths
This commit is contained in:
parent
4cc156e0d0
commit
9105f5fb14
@ -3,6 +3,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.13 FATAL_ERROR)
|
|||||||
|
|
||||||
|
|
||||||
SET(BOARD "iss" CACHE STRING "board to be compiled for")
|
SET(BOARD "iss" CACHE STRING "board to be compiled for")
|
||||||
|
OPTION(SEMIHOSTING "Enable Semihosting" ON)
|
||||||
|
|
||||||
SET(RISCV_ARCH "rv32imc" CACHE STRING "arch")
|
SET(RISCV_ARCH "rv32imc" CACHE STRING "arch")
|
||||||
SET(RISCV_ABI "ilp32" CACHE STRING "abi")
|
SET(RISCV_ABI "ilp32" CACHE STRING "abi")
|
||||||
@ -37,9 +38,9 @@ INCLUDE_DIRECTORIES(
|
|||||||
${BSP_BASE}/include
|
${BSP_BASE}/include
|
||||||
${BSP_BASE}/drivers
|
${BSP_BASE}/drivers
|
||||||
${BSP_BASE}/libwrap/semihosting
|
${BSP_BASE}/libwrap/semihosting
|
||||||
|
${PLATFORM_DIR}
|
||||||
${ENV_DIR}
|
${ENV_DIR}
|
||||||
${PLATFORM_DIR})
|
)
|
||||||
|
|
||||||
|
|
||||||
# Source files
|
# Source files
|
||||||
SET(ASM_SRCS
|
SET(ASM_SRCS
|
||||||
@ -69,6 +70,11 @@ LIST(APPEND COMMON_FLAGS "-mabi=${RISCV_ABI}" "-mcmodel=medany" "-DBOARD_${BOARD
|
|||||||
|
|
||||||
# Compiler Options
|
# Compiler Options
|
||||||
ADD_COMPILE_OPTIONS("${COMMON_FLAGS}")
|
ADD_COMPILE_OPTIONS("${COMMON_FLAGS}")
|
||||||
|
IF(SEMIHOSTING)
|
||||||
|
ADD_DEFINITIONS(-DSEMIHOSTING=1)
|
||||||
|
ELSE ()
|
||||||
|
ADD_DEFINITIONS(-DSEMIHOSTING=0)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
ADD_EXECUTABLE(${PROJECT_NAME} ${ASM_SRCS} ${C_SRCS} ${SRC_FILES})
|
ADD_EXECUTABLE(${PROJECT_NAME} ${ASM_SRCS} ${C_SRCS} ${SRC_FILES})
|
||||||
|
|
||||||
@ -78,7 +84,7 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME} PUBLIC ${LIBWRAP_TGC_LDFLAGS} LIBWRAP_TGC)
|
|||||||
TARGET_LINK_LIBRARIES(${PROJECT_NAME}
|
TARGET_LINK_LIBRARIES(${PROJECT_NAME}
|
||||||
PUBLIC
|
PUBLIC
|
||||||
-march=${RISCV_ARCH} -mabi=${RISCV_ABI}
|
-march=${RISCV_ARCH} -mabi=${RISCV_ABI}
|
||||||
-T/scratch/gabriel/repos/Firmwares/bare-metal-bsp/env/iss/link.lds
|
-T../${PLATFORM_DIR}/link.lds #TODO Path
|
||||||
-Wl,-Map=${PROJECT_NAME}.map
|
-Wl,-Map=${PROJECT_NAME}.map
|
||||||
-nostartfiles
|
-nostartfiles
|
||||||
-L${ENV_DIR}
|
-L${ENV_DIR}
|
||||||
|
@ -8,7 +8,14 @@
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
char c = sh_readc();
|
char new[]="/scratch/gabriel/Documents/test_file";
|
||||||
printf(c);
|
//puts(new);
|
||||||
|
//char buf[10];
|
||||||
|
printf("TEST!!!");
|
||||||
|
//int fh = open(new, 0, 0);
|
||||||
|
//unlink(new);
|
||||||
|
//read(fh, buf, 10);
|
||||||
|
//printf(buf);
|
||||||
|
//read(fh, buf, 10);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user