demo工程暂存 优化菜单界面UI和功能

This commit is contained in:
2024-04-29 16:32:24 +08:00
commit 330cd25cf1
3310 changed files with 2163318 additions and 0 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,37 @@
import os
import struct
import zlib
import sys
def fill_header(f_in_file,
f_out_file):
code_length = os.path.getsize(f_in_file)
f_out_create = open(f_out_file, 'wb')
f_out_create.close()
f_out = open(f_out_file, 'r+b')
f_in = open(f_in_file, 'rb')
array = f_in.read(code_length)
f_out.write(array)
f_out.seek(0x150)
f_out.write(struct.pack('I', code_length))
f_out.seek(0)
arrayout = f_out.read(code_length)
image_crc = zlib.crc32(arrayout)
f_out.seek(code_length)
#f_out.write(struct.pack('I',image_crc))
f_out.write(struct.pack('B', image_crc&0xff))
f_out.write(struct.pack('B', (image_crc&0xff00)>>8))
f_out.write(struct.pack('B', (image_crc&0xff0000)>>16))
f_out.write(struct.pack('B', (image_crc&0xff000000)>>24))
if 'BAT_RUN' in os.environ:
fill_header(".\output\Project.bin", ".\output\Project_mp_burn.bin")
else:
fill_header("Project.bin", "Project_mp_burn.bin")
# if sys.argv[0].endswith('.bat'):
# fill_header(".\output\Project.bin", ".\output\Project_burn.bin")
# else:
# fill_header("Project.bin", "Project_burn.bin")

View File

@ -0,0 +1,11 @@
@echo off
if exist Project_burn.bin (
del Project_burn.bin
)
@echo off
set BAT_RUN=1
python .\output\app_post_process.py