meke.py 使用命令行传入源文件

This commit is contained in:
2025-06-26 16:15:07 +08:00
parent 8928998479
commit 262d5d3f90
9 changed files with 44 additions and 35 deletions

View File

@@ -25,7 +25,7 @@ CC = 'gcc'
# HEX = 'C:\\ARM_GCC\\bin\\arm-none-eabi-objcopy' + ' -O ihex'
# BIN = 'C:\\ARM_GCC\\bin\\arm-none-eabi-objcopy' + ' -O binary -S'
CSRC = ["main.c","test/riscv_test.c","test/signal_test.c"]
CSRC = ["main.c"]
CINC = ['-Isoft',"-Iriscv_cpu", "-I./","-Itest"]
@@ -192,7 +192,8 @@ def main():
global ASRC
if(not os.path.exists(BUILD_DIR)):
os.makedirs(BUILD_DIR)
# 在命令行中传入的源文件
CSRC+=sys.argv[1:]
CSRC+=find_type('soft',['c','C'])
CSRC+=find_type('riscv_cpu',['c','C'])
CSRC=search_lambda(CSRC)