Search code examples
trace32lauterbach

Fill memory with a constant in Trace32


I'm new to Trace32 and symply trying to fill 174bytes, starting from a given adress, with the same value (sometimes 0x00, sometimes 0XFF).

Looking at the documentation, Data.Set seems to be the way to go but I can't figure out the correct arguments.

Thanks.


Solution

  • The correct command is in fact Data.Set

     Data.Set <address>|<addr.range> %<access width> <value(s)> [/<option>]
    

    Data.Set can be used to set a value to a single address or to set a value repetitively inside an address range.

    So how to define an address range? There are two options

    • <first addr.>--<last addr.>
    • <first addr.>++<number of following addresses>

    Putting all together: To set 0xFF to 174 Bytes starting from 0x1000 you have to write

     Data.Set 0x1000++173. %Byte 0xFF   
    

    Note the trailing dot after 173, which identifies decimal numbers. Without the dot the number would be interpreted as a hexadecimal value (unless you used SETUP.RADIX Decimal)