Add C toolchain

This commit is contained in:
Mario Romero 2022-11-27 03:45:36 -03:00
parent f57f85264e
commit c6c501f9b4
2 changed files with 11 additions and 0 deletions

8
program/CMakeLists.txt Normal file
View 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
View File

@ -0,0 +1,3 @@
int main() {
return 0;
}