固件文件哈希
E:\zigb>rahash2 -a md5 xbp24-dm_8073.ehx2.dec
xbp24-dm_8073.ehx2.dec: 0x00000000-0x00022bcd md5: 971f71b674af2d5edb670a5ce4b0371f
我的 Windows 框中的 mingw objcopy 版本
E:\zigb>objcopy -V
GNU objcopy (GNU Binutils) 2.25.1
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
复制文件
E:\zigb>copy xbp24-dm_8073.ehx2.dec test.dec
1 file(s) copied.
现在我objcopy它
E:\zigb>objcopy -I srec -O binary -S test.dec
E:\zigb>ls -l
total 200
-rw-rw-rw- 1 HP 0 60800 2017-03-30 03:25 test.dec
-rw-rw-rw- 1 HP 0 142286 2017-03-30 02:43 xbp24-dm_8073.ehx2.dec
从文件中转储 32 个字节
E:\zigb>xxd -g 1 -l 32 test.dec
0000000: 43 54 02 d1 47 10 36 43 4e 00 d1 31 00 00 41 43 CT..G.6CN..1..AC
0000010: 00 d1 12 00 00 56 52 02 9c 1d fd 46 46 52 00 d1 .....VR....FFR..
从原始文件转储前两行
E:\zigb>head -n 2 xbp24-dm_8073.ehx2.dec
S0260000433A5C446576656C6F706D656E745C646D32345C62696E5C584232342D444D2E70726DBE
S1231080435402D1471036434E00D1310000414300D11200005652029C1DFD46465200D14C
解密第一个 s0 记录(标题)和第二行 S1 数据记录
E:\zigb>rax2 -s 433A5C446576656C6F706D656E745C646D32345C62696E5C584232342D444D2E70726D
C:\Development\dm24\bin\XB24-DM.prm
E:\zigb>rax2 -s 435402D1471036434E00D1310000414300D11200005652029C1DFD46465200D1
CT☻╤G►6CN ╤1 AC ╤↕ VR☻£↔²FFR ╤
它似乎是 objcopy 的正确转换
顺便说一句,objdump 可以使用 srec 作为目标,所以我认为不需要 objconv
:\>arm-none-eabi-objdump.exe -D -bsrec -marm -Mforce-thumb --start-address=0x1893 --stop-address=0x
18a3 e:\zigb\xbp24-dm_8073.ehx2.dec
e:\zigb\xbp24-dm_8073.ehx2.dec: file format srec
Disassembly of section .sec2:
00001893 <.sec2+0x67>:
1893: 0f45 lsrs r5, r0, #29
1895: 942e str r4, [sp, #184] ; 0xb8
1897: 0e45 lsrs r5, r0, #25
1899: 9602 str r6, [sp, #8]
189b: 7701 strb r1, [r0, #28]
189d: 0e20 lsrs r0, r4, #24
189f: a5a6 add r5, pc, #664 ; (adr r5, 0x1b38)
18a1: 0132 lsls r2, r6, #4
:\>
二进制 xbee-pro digimesh v24 和 mc13213 中的字符串似乎是一个 hcs08 兼容的 cpu