This commit is contained in:
TOKISAKIX\21168
2023-12-11 21:54:53 +08:00
parent 910ee11168
commit e720a0dfc2
57 changed files with 2621 additions and 2152 deletions

View File

@@ -5,7 +5,7 @@ project(yatcpu-programs C CXX ASM)
# Setting variables
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 --target=riscv32-unknown-elf -march=rv32i -mabi=ilp32")
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -O0 --target=riscv32-unknown-elf -march=rv32i -mabi=ilp32")
set(C_PROGRAMS tetris hello fibonacci quicksort)
set(C_PROGRAMS tetris hello fibonacci quicksort paging tetris_mmu)
set(ASM_PROGRAMS mmio sb)
set(LINKER_SCRIPT ${CMAKE_SOURCE_DIR}/link.lds)
set(LINKER_FLAGS -T ${LINKER_SCRIPT})
@@ -32,8 +32,8 @@ foreach(program IN LISTS ASM_PROGRAMS)
set_target_properties(${program} PROPERTIES LINK_DEPENDS ${LINKER_SCRIPT})
endforeach()
# Copy the .text section to .asmbin files
foreach(program IN LISTS C_PROGRAMS ASM_PROGRAMS)
# Copy the .text and .data section to .asmbin files
foreach(program IN LISTS C_PROGRAMS ASM_PROGRAMS PROGRAMS)
add_custom_command(
TARGET ${program}
POST_BUILD