I have a common program which executes on both ARM core of LS1021TWR board, Core 0 will initialize Core-1 after some point of time it has booted.
I want to put break point in code such a way that when Core-1 executes that program, Core-1 only should stop at break point not the Core-0.
Is there any such provision where I can put break-point for the same source code for particular Core?
Or what is other way to achieve this?
Solved! Go to Solution.
You should use switchtarget command in Debugger Shell.
%>switchtarget 0
--Connection-1-----------------------------------------------------
------------
Index Status Thread Process CPU Target
*0 Stopped 0x0 0x0 cpuARMLittle test.elf
1 Stopped 0x0 0x1 cpuARMLittle test.elf
%>bp PerformanceWork
id instance address type enabled? process description
#4 #1 x:0x8000008c -auto ENABLED 0x0 main.c,
line 20, PerformanceWork [test.elf]
%>switchtarget 1
--Connection-1--------------------------------------------------
---------------
Index Status Thread Process CPU Target
0 Stopped 0x0 0x0 cpuARMLittle test.elf
*1 Stopped 0x0 0x1 cpuARMLittle test.elf
%>go
Adrian
You should use switchtarget command in Debugger Shell.
%>switchtarget 0
--Connection-1-----------------------------------------------------
------------
Index Status Thread Process CPU Target
*0 Stopped 0x0 0x0 cpuARMLittle test.elf
1 Stopped 0x0 0x1 cpuARMLittle test.elf
%>bp PerformanceWork
id instance address type enabled? process description
#4 #1 x:0x8000008c -auto ENABLED 0x0 main.c,
line 20, PerformanceWork [test.elf]
%>switchtarget 1
--Connection-1--------------------------------------------------
---------------
Index Status Thread Process CPU Target
0 Stopped 0x0 0x0 cpuARMLittle test.elf
*1 Stopped 0x0 0x1 cpuARMLittle test.elf
%>go
Adrian
Thanks addiyi, I'm able to complete my task using your help.
The above suggestion works fine for me.
Thanks again.
Unfortunately, CodeWarrior for ARMv7 doesn't support this feature (SMP support).
Adrian
Is there any other way?
I mean if I'm putting a break-point on a program which is suppose run on both of ARM core independently, and I want to hold program only on Core-1, Can you please suggest me something on how to put a break-point here?
Can you provide guidance to me on this?
You can use two launch configuration (one for each core) to load the code build for core0 and core1. This way, you can stop the core1 while core0 is running, but I guess this is not your scope.
Adrian
Let me give it a try, if I can.
Will give feedback after experimenting on this.
Thanks
You can start by selecting both cores from wizard. AMP (One project per core) will create 2 projects, one for each core. AMP (One build configuration per core) will create one project with two launch configuration. After that you can enter in debug using both cores.
Adrian
I'm able to have two configuration set in one project and I'm able to toggle between two configurations using GUI by just clicking Core-0 and Core-1, but not able to figure out command behind it so that I can do the same using Debugger Shell using TCL scripting.
I figured out one configuration which holds current selected core, or say currently running one, "com.freescale.cdt.debug.cw.CW_SHADOWED_PREF.Embedded Initialization.coreIndex"
But how to set this run-time, that is a question for me. Can you please throw some light on this?
How to select configuration using debugging shell?