How to set break point for particular Core on LS1021ATWR?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set break point for particular Core on LS1021ATWR?

Jump to solution
458 Views
janmejayjoshi
Contributor I

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?

Labels (1)
0 Kudos
1 Solution
103 Views
addiyi
NXP Employee
NXP Employee

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

pastedImage_3.png

Adrian

View solution in original post

0 Kudos
8 Replies
104 Views
addiyi
NXP Employee
NXP Employee

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

pastedImage_3.png

Adrian

View solution in original post

0 Kudos
103 Views
janmejayjoshi
Contributor I

Thanks addiyi‌, I'm able to complete my task using your help.
The above suggestion works fine for me.
Thanks again.

0 Kudos
103 Views
addiyi
NXP Employee
NXP Employee

Unfortunately, CodeWarrior for ARMv7 doesn't support this feature (SMP support).

Adrian

0 Kudos
103 Views
janmejayjoshi
Contributor I

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?

0 Kudos
103 Views
addiyi
NXP Employee
NXP Employee

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

0 Kudos
103 Views
janmejayjoshi
Contributor I

Let me give it a  try, if I can.
Will give feedback after experimenting on this.
Thanks

0 Kudos
103 Views
addiyi
NXP Employee
NXP Employee

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

0 Kudos
103 Views
janmejayjoshi
Contributor I

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?

0 Kudos