添加生产镜像制作流程;
修改数据项地址分布; 修复数据读写重发逻辑; 修复字符串数据对`0xFF`数据无法解析的问题;
This commit is contained in:
@@ -404,29 +404,33 @@ if __name__ == "__main__":
|
||||
back_data_e1 = bin_back.read_bytes()[184:]
|
||||
|
||||
root = Path(r"D:\WorkingProject\LightStackAdapter\software\lamina_adapter\tools\uart_tool")
|
||||
result = Path('result')
|
||||
result = Path(r'D:\WorkingProject\LightStackAdapter\software\lamina_adapter\tools\uart_tool\生产版本3')
|
||||
# 正常启动镜像
|
||||
file_image = result / 'SLCP001_MEM.bin'
|
||||
hex_boot = root / r"生产版本\bootloader.hex"
|
||||
hex_main = root / r"生产版本\SLCP001_240525_1800_V1.12.hex"
|
||||
hex_back = root / r"生产版本\SLCP001_240525_1800_B1.12.hex"
|
||||
file_image = result / 'SLCP001_240528_1741_ROM.bin'
|
||||
file_main_header = result / 'SLCP001_header_main.bin'
|
||||
file_back_header = result / 'SLCP001_header_back.bin'
|
||||
hex_boot = root / r"生产版本3\bootloader.hex"
|
||||
hex_main = root / r"生产版本3\SLCP001_240528_1741_V1.01.hex"
|
||||
hex_back = root / r"生产版本3\SLCP001_240528_1741_B1.01.hex"
|
||||
data_bins = test4(hex_boot, hex_main, hex_back)
|
||||
file_image.write_bytes(data_bins[0].copy())
|
||||
file_main_header.write_bytes(data_bins[1].copy())
|
||||
file_back_header.write_bytes(data_bins[4].copy())
|
||||
|
||||
# 异常镜像-主分区md5错误
|
||||
file_image = result / 'SLCP001_MEM_b1.bin'
|
||||
file_image = result / 'SLCP001_240528_1741_ROM_b1.bin'
|
||||
data_image = data_bins[0].copy()
|
||||
data_image[0x0FC018: 0x0FC01A] = [0x00, 0x01]
|
||||
file_image.write_bytes(data_image)
|
||||
|
||||
# 异常镜像-备份分区md5错误
|
||||
file_image = result / 'SLCP001_MEM_b2.bin'
|
||||
file_image = result / 'SLCP001_240528_1741_ROM_b2.bin'
|
||||
data_image = data_bins[0].copy()
|
||||
data_image[0x0FE018: 0x0FE01A] = [0x00, 0x01]
|
||||
file_image.write_bytes(data_image)
|
||||
|
||||
# 异常镜像-双分区md5错误
|
||||
file_image = result / 'SLCP001_MEM_b3.bin'
|
||||
file_image = result / 'SLCP001_240528_1741_ROM_b3.bin'
|
||||
data_image = data_bins[0].copy()
|
||||
data_image[0x0FC018: 0x0FC01A] = [0x00, 0x01]
|
||||
data_image[0x0FE018: 0x0FE01A] = [0x00, 0x01]
|
||||
|
||||
Reference in New Issue
Block a user