mirror of
https://github.com/handsomezhuzhu/2025-yatcpu.git
synced 2026-02-21 04:20:14 +00:00
add csrc
This commit is contained in:
@@ -5,8 +5,8 @@ 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(ASM_PROGRAMS mmio sb hazard)
|
||||
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})
|
||||
set(OBJCOPY_ARGS -O binary -j .text -j .data)
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user