0

I have a script to setup different stuff before I start debugging the target with Trace32. Sometimes I debug also on simulator where some steps are not relevant for.

I want to check in a script if I run on simulator or I am attached to live system. Is there any cmd or way to achieve it in .cmm?

Thanks,

wrymarkX
  • 99
  • 8

1 Answers1

1

You can check if you're using the simulator with the PRACTICE function SIMULATOR().

E.g.:

SYStem.CPU STM32F407VG
IF !SIMULATOR()
(
    // Commands only executed if you're not in simulator mode
    SYStem.JtagClock 10.MHz
    SYStem.CONFIG DEBUGPORTTYPE SWD
    SYStem.MemAccess DAP
)
ELSE
(
    // Commands only executed if you're in simulator mode        
    SYStem.MemAccess CPU
)
Holger
  • 3,920
  • 1
  • 13
  • 35