处理状态栏中内存显示异常的问题

This commit is contained in:
2025-07-06 15:22:15 +08:00
parent 0037d0c1af
commit 9f691644a4
3 changed files with 45 additions and 40 deletions

View File

@@ -9,6 +9,7 @@ from multiprocessing import Process,Queue,Value,cpu_count
os.environ["PATH"]+=";D:/Program Files/arm-gnu-toolchain/bin"
os.environ["LANG"]="zh_CN.GBK"
CC="arm-none-eabi-gcc"
AS = CC + ' -x assembler-with-cpp'
@@ -25,6 +26,8 @@ CFLAG=[
'-Wall',
'-fdata-sections',
'-ffunction-sections',
# '-u _printf_float', # 使用这个选项会导致调用exit
'-specs=nano.specs', # 使用nano-newlib
# debug
'-g -gdwarf-2'
]
@@ -298,7 +301,7 @@ def build_target(src:list):
obj_list.append('.'.join([name,'o']))
dst=os.path.join(OUTPUT,TARGET)+".elf"
if(check_rebuild(dst,obj_list)):
rsp=f"{' '.join(obj_list)} -o {dst} {flags} -specs=nano.specs \
rsp=f"{' '.join(obj_list)} -o {dst} {flags} \
-T{LD_FILE} -lc -lm -lnosys -Wl,-Map={OUTPUT}/{TARGET}.map,--cref -Wl,--gc-sections \
-Wl,--no-warn-rwx-segments -Wl,-print-memory-usage"
print(f"链接 {dst}")