srec_cat:实现删除hex文件中的指定段
对于hex文件,有时候需要删除其中的某些特定段,这个时候可以使用srec_cat。这个工具在ModusToolbox的tools下,使用以下命令:C:\Users\ABC\ModusToolbox\tools_3.1\srecord\bin\srec_cat mtb-example-psoc6-qspi-xip.hex-intel -exclude 0x10000000 0x18000000 -o onlyExternalFlash.hex-intel --Output_Block_Size 16 操作HEX文件有点危险吧 可以用这个命令干掉Creator生成hex文件的小尾巴
把0x90003000~0x90006000的都给干掉~
放到一个批处理文件中直接调用:
srec_cat.exe CY4025.hex -intel -exclude 0x90000000 0x91000000 -o cy4025_ex900x.hex-intel --Output_Block_Size 64
即可 为啥不直接删除? 通常可以直接文件操作 srec_cat很实用的工具 srec_cat了解一下 srec_cat如何使用 为什么不重新编译程序 Amazingxixixi 发表于 2024-10-30 16:14
通常可以直接文件操作
hex文件大了就不好找,用批处理简单 为啥不重新编译生成hex?对hex删减操作,不了解源程序,很容易出事儿。 sblpp 发表于 2024-9-19 19:32
放到一个批处理文件中直接调用:
srec_cat.exe CY4025.hex -intel -exclude 0x90000000 0x91000000 -o cy40 ...
对的,这个工具主要用来删除PSoC Creator生成的一些信息段
页:
[1]