From 0f32060aea0053d0e14d5aaf7d0b6275f6200417 Mon Sep 17 00:00:00 2001 From: Jiang Yufan Date: Wed, 23 Aug 2023 13:53:04 +0800 Subject: [PATCH] Fix: mergebin.py generate .bin file according to board --- Ubiquitous/XiZi_IIoT/mergebin.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Ubiquitous/XiZi_IIoT/mergebin.py b/Ubiquitous/XiZi_IIoT/mergebin.py index 91c2b8c05..f0e7b1889 100644 --- a/Ubiquitous/XiZi_IIoT/mergebin.py +++ b/Ubiquitous/XiZi_IIoT/mergebin.py @@ -1,4 +1,5 @@ import os +import sys def mergeBinProccess( files, fileSaveName): bin = b'' @@ -17,11 +18,11 @@ def mergeBinProccess( files, fileSaveName): f.write(bin) if __name__ == '__main__': - file1 = r'./build/XiZi-edu-riscv64_kernel.bin' + file1 = r'./build/XiZi-'+sys.argv[1]+'_kernel.bin' file1_start_addr = 0 - file2 = r'./build/XiZi-edu-riscv64_app.bin' + file2 = r'./build/XiZi-'+sys.argv[1]+'_app.bin' file2_start_addr = 1024 * 1024 + 4096 - newfile = r'./build/XiZi-edu-riscv64.bin' + newfile = r'./build/XiZi-'+sys.argv[1]+'.bin' file = [ [file1 , file1_start_addr] , [file2 , file2_start_addr] ] mergeBinProccess(file, newfile) \ No newline at end of file