Search code examples
debuggingtrace32lauterbach

Assign a register value from d.in to a local variable


I want to assign a register value to a local macro/variable in trace32.

&temp = d.in 0x0234567

does not seem to work. Any ideas?


Solution

  • Use PRACTICE function REGISTER(regname) to get the value of a core register.

    E.g. To assign the value of core register r5 to the macro &temp you can write:

    &temp=REGISTER(r5)
    

    If you try to to the same with a memory mapped peripheral register try PRACTICE function Data.Long(address).

    E.g. To assign the value of 32-bit data mapped to memory address 0x010000 to the macro &temp you can write:

    &temp=Data.Long(D:0x010000)