Search code examples
armembedded-resourcetrace32lauterbach

How to assign an integer value to a Macro in trace32 cmm script?


I have written one file1.cmm file, in this file many &BITPOS=21 is present. For example, &BITPOS=21 &BITPOS=22 &BITPOS=23 and so on present in file1.cmm

I debugged this issue and found form PMACRO window, I observe it is taking &BITPOS=21 as
&BITPOS=0x21 so when I am trying to shift 1<<&BITPOS instead of shifting 21 times left shift of 1, it is shifting 0x21 times which is 33 in integer value.

reference:- repo.lauterbach.com/manual.html Almost all documents I opened but not found any info.


Solution

  • In TRACE32, decimal numbers are declared by adding a decimal point to the number:

    &BITPOS=21.