Add C toolchain
This commit is contained in:
parent
f57f85264e
commit
c6c501f9b4
8
program/CMakeLists.txt
Normal file
8
program/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project(riscv-program C)
|
||||
|
||||
set(CMAKE_C_FLAGS "-Os -g -Wall -ffunction-sections")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -nostartfiles -fno-exceptions -Xlinker)
|
||||
|
||||
add_executable(${PROJECT_NAME} src/main.c)
|
3
program/src/main.c
Normal file
3
program/src/main.c
Normal file
@ -0,0 +1,3 @@
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user