trace32

Controlling a specific core in a trace32 multi core debugging enviroment


I am trying to write a practice script to debug a multi core system in Trace32. As per the docs, I started the scrpit as follows

SYStem.CPU CortexA55
SYStem.CONFIG CoreNumber 3
Core.Number 3

I can choose to single step in a single core by using the data list window buttons for that core. But I am not sure how to do that using the commands. In their docs they mention

Where the target is configured for Symmetric Multi-Processing (SMP), a single instance of TRACE32 PowerView is used to control all cores. In this case many PRACTICE commands add an option /CORE option to indicate that the command should be run with reference to a particular core or cores. But I tried to execute these commands

Go.Backover
Step
Print Register(pc)

but none of them does have this /Core option.


Solution

  • All commands used without the option /CORE are for the currently selected logical core. You can indicate the currently selected core by checking the status bar: Left to the system state (probably showing "stopped"), you'll see a digit, indicating the active logical core.

    You can change the active logical core with the command CORE.select. Note, that after any Step or Go command the active logical core can change, because when the SoC goes in a running-state and the enters halt-state, the active logical core is the core which caused the SoC to halt.

    So in you case the following should be safe.

    CORE.select 0   
    Step.Over
    CORE.select 0
    Step
    CORE.select 0
    ECHO Register(PP)
    

    Instead of CORE.select 0 you can use of course also CORE.select 1 or CORE.select 2.

    I think there is no command called Go.Backover. So I am not sure if you are referring to Step.BackOver, Step.Over, Step.Back, or Go.Back.

    By the way: You have used SYStem.CPU CortexA55. That is not wrong, but probably not optimal: Selecting as base-core like CortexA55 is indented for self-made SoCs and requires usually a lot of additional SYStem.CONFIG commands to tell the Debugger the location of the CoreSight components. If you have not created your own SoC try to find the exact chip name in the window SYStem.CPU.