mcmp

Name

mcmp -- Compare two segments of memory

Synopsis

mcmp {-s location1} {-d location1} {-l length} [-1 | -2 | -4]

Arguments

NameTypeDescriptionDefault
-s location1Memory addressLocation for start of data.none
-d location2Memory addressLocation for start of data.none
-l lengthNumberLength of datanone
-1 Access one byte (8 bits) at a time. Only the least significant 8 bits of the pattern will be used.-4
-2 Access two bytes (16 bits) at a time. Only the least significant 16 bits of the pattern will be used.-4
-4 Access one word (32 bits) at a time.-4

Description

Compares the contents of two ranges of memory (RAM, ROM, FLASH, etc).

Examples

Compare two buffers which match (result is quiet).

 
RedBoot> mfill -b 0x100000 -l 0x20 -p 0xDEADFACE
RedBoot> mfill -b 0x200000 -l 0x20 -p 0xDEADFACE
RedBoot> mcmp -s 0x100000 -d 0x200000 -l 0x20

Compare two buffers which don't match. Only the first non-matching element is displayed.

 
RedBoot> mcmp -s 0x100000 -d 0x200000 -l 0x30 -2
Buffers don't match - 0x00100020=0x6000, 0x00200020=0x0000

2017-02-09
Documentation license for this page: Open Publication License