fred@fw:~/Documents/c_test/mmap$ arm-none-linux-gnueabi-gcc mmap.c -o mmap
root@fw:~/Documents/c_test/mmap$ cp mmap /home/fred/project/Odin/0.1.11/workspace/Build/output/ImageTree/usr/local/bin/
build
~ # /usr/local/bin/mmap
**********************************************
* MMAP TOOL V1.1 *
**********************************************
Usage: ./mmap [OPTIONS...]
OPTIONS:
-r|w Mode of operation read/write
-a [hex] Address to read/write
-d [hex] Data to write
-l [dec] length of data to read
-b [dec] Bit of data
-e Big endian
-h|? This help text
-v Print version
~ # /usr/local/bin/mmap -r -a 1e78502c
REG(0x1e78502c): 0x00000092
~ # /usr/local/bin/mmap -r -a 1e78502c -b 0
REG(0x1e78502c): 0x00000092 [0]=0
~ # /usr/local/bin/mmap -w -a 1e78502c -b 0 -d 1
REG(0x1e78502c): 0x00000093 [0]=1
~ # /usr/local/bin/mmap -r -a 20000000 -l 16
20000000: ea00 0014 e59f f014 e59f f014 e59f f014 ................
~ # /usr/local/bin/mmap -r -a 20000000 -l 256 -e
20000000: 1400 00ea 14f0 9fe5 14f0 9fe5 14f0 9fe5 ................
20000010: 14f0 9fe5 14f0 9fe5 14f0 9fe5 14f0 9fe5 ................
20000020: 2001 8040 8001 8040 e001 8040 4002 8040 ..@...@...@@..@
20000030: a002 8040 0003 8040 4003 8040 efbe adde ...@...@@..@....
20000040: 0000 8040 0000 8040 a0f2 8240 a866 8e40 ...@...@...@.f.@
20000050: dec0 ad0b dec0 ad0b 0000 0fe1 1f00 c0e3 ................
20000060: d300 80e3 00f0 29e1 1900 00eb 7400 4fe2 ......).....t.O.
20000070: 3810 1fe5 0100 50e1 0700 000a 4020 1fe5 8.....P.....@ ..
20000080: 4030 1fe5 0220 43e0 0220 80e0 f807 b0e8 @0... C.. ......
20000090: f807 a1e8 0200 50e1 fbff ffda 6400 1fe5 ......P.....d...
200000a0: 0208 40e2 8000 40e2 020a 40e2 0cd0 40e2 ..@...@...@...@.
200000b0: 7000 1fe5 7010 1fe5 0020 a0e3 0020 80e5 p...p.... ... ..
200000c0: 0400 80e2 0100 50e1 fbff ffda 04f0 1fe5 ......P.........
200000d0: b83b 8140 0000 a0e3 170f 07ee 170f 08ee .;.@............
200000e0: 100f 11ee 230c c0e3 8700 c0e3 0200 80e3 ....#...........
200000f0: 010a 80e3 100f 01ee 0ec0 a0e1 d33f 00eb .............?..
~ # /usr/local/bin/mmap -r -a 22000000 -l 256 -e
22000000: 1400 00ea 14f0 9fe5 14f0 9fe5 14f0 9fe5 ................
22000010: 14f0 9fe5 14f0 9fe5 14f0 9fe5 14f0 9fe5 ................
22000020: 2001 8040 8001 8040 e001 8040 4002 8040 ..@...@...@@..@
22000030: a002 8040 0003 8040 4003 8040 efbe adde ...@...@@..@....
22000040: 0000 8040 0000 8040 38ee 8240 2862 8e40 ...@...@8..@(b.@
22000050: dec0 ad0b dec0 ad0b 0000 0fe1 1f00 c0e3 ................
22000060: d300 80e3 00f0 29e1 1900 00eb 7400 4fe2 ......).....t.O.
22000070: 3810 1fe5 0100 50e1 0700 000a 4020 1fe5 8.....P.....@ ..
22000080: 4030 1fe5 0220 43e0 0220 80e0 f807 b0e8 @0... C.. ......
22000090: f807 a1e8 0200 50e1 fbff ffda 6400 1fe5 ......P.....d...
220000a0: 0208 40e2 8000 40e2 020a 40e2 0cd0 40e2 ..@...@...@...@.
220000b0: 7000 1fe5 7010 1fe5 0020 a0e3 0020 80e5 p...p.... ... ..
220000c0: 0400 80e2 0100 50e1 fbff ffda 04f0 1fe5 ......P.........
220000d0: cc3b 8140 0000 a0e3 170f 07ee 170f 08ee .;.@............
220000e0: 100f 11ee 230c c0e3 8700 c0e3 0200 80e3 ....#...........
220000f0: 010a 80e3 100f 01ee 0ec0 a0e1 d33f 00eb .............?..
root@fw:/home/fred/project/Odin/0.1.11/workspace/Build/output/bootloader# xxd u-boot.bin | more
0000000: 1400 00ea 14f0 9fe5 14f0 9fe5 14f0 9fe5 ................
0000010: 14f0 9fe5 14f0 9fe5 14f0 9fe5 14f0 9fe5 ................
0000020: 2001 8040 8001 8040 e001 8040 4002 8040 ..@...@...@@..@
0000030: a002 8040 0003 8040 4003 8040 efbe adde ...@...@@..@....
0000040: 0000 8040 0000 8040 a0f2 8240 a866 8e40 ...@...@...@.f.@
0000050: dec0 ad0b dec0 ad0b 0000 0fe1 1f00 c0e3 ................
0000060: d300 80e3 00f0 29e1 1900 00eb 7400 4fe2 ......).....t.O.
0000070: 3810 1fe5 0100 50e1 0700 000a 4020 1fe5 8.....P.....@ ..
0000080: 4030 1fe5 0220 43e0 0220 80e0 f807 b0e8 @0... C.. ......
0000090: f807 a1e8 0200 50e1 fbff ffda 6400 1fe5 ......P.....d...
00000a0: 0208 40e2 8000 40e2 020a 40e2 0cd0 40e2 ..@...@...@...@.
00000b0: 7000 1fe5 7010 1fe5 0020 a0e3 0020 80e5 p...p.... ... ..
00000c0: 0400 80e2 0100 50e1 fbff ffda 04f0 1fe5 ......P.........
00000d0: b83b 8140 0000 a0e3 170f 07ee 170f 08ee .;.@............
00000e0: 100f 11ee 230c c0e3 8700 c0e3 0200 80e3 ....#...........
00000f0: 010a 80e3 100f 01ee 0ec0 a0e1 d33f 00eb .............?..
root@fw:/home/fred/project/Odin/0.1.5/workspace/Build/output/bootloader# xxd u-boot.bin | more
0000000: 1400 00ea 14f0 9fe5 14f0 9fe5 14f0 9fe5 ................
0000010: 14f0 9fe5 14f0 9fe5 14f0 9fe5 14f0 9fe5 ................
0000020: 2001 8040 8001 8040 e001 8040 4002 8040 ..@...@...@@..@
0000030: a002 8040 0003 8040 4003 8040 efbe adde ...@...@@..@....
0000040: 0000 8040 0000 8040 38ee 8240 2862 8e40 ...@...@8..@.b.@
0000050: dec0 ad0b dec0 ad0b 0000 0fe1 1f00 c0e3 ................
0000060: d300 80e3 00f0 29e1 1900 00eb 7400 4fe2 ......).....t.O.
0000070: 3810 1fe5 0100 50e1 0700 000a 4020 1fe5 8.....P.....@ ..
0000080: 4030 1fe5 0220 43e0 0220 80e0 f807 b0e8 @0... C.. ......
0000090: f807 a1e8 0200 50e1 fbff ffda 6400 1fe5 ......P.....d...
00000a0: 0208 40e2 8000 40e2 020a 40e2 0cd0 40e2 ..@...@...@...@.
00000b0: 7000 1fe5 7010 1fe5 0020 a0e3 0020 80e5 p...p.... ... ..
00000c0: 0400 80e2 0100 50e1 fbff ffda 04f0 1fe5 ......P.........
00000d0: b83b 8140 0000 a0e3 170f 07ee 170f 08ee .;.@............
00000e0: 100f 11ee 230c c0e3 8700 c0e3 0200 80e3 ....#...........
00000f0: 010a 80e3 100f 01ee 0ec0 a0e1 d33f 00eb .............?..
mmapv1.1.zip
需积分: 9 166 浏览量
2016-08-15
21:38:05
上传
评论
收藏 3KB ZIP 举报
duanzhang512
- 粉丝: 10
- 资源: 24