How to set break point for particular Core on LS1021ATWR?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to set break point for particular Core on LS1021ATWR?

ソリューションへジャンプ
1,297件の閲覧回数
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?

ラベル(1)
0 件の賞賛
1 解決策
942件の閲覧回数
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

元の投稿で解決策を見る

0 件の賞賛
8 返答(返信)
943件の閲覧回数
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

0 件の賞賛
942件の閲覧回数
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 件の賞賛
942件の閲覧回数
addiyi
NXP Employee
NXP Employee

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

Adrian

0 件の賞賛
942件の閲覧回数
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 件の賞賛
942件の閲覧回数
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 件の賞賛
942件の閲覧回数
janmejayjoshi
Contributor I

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

0 件の賞賛
942件の閲覧回数
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 件の賞賛
942件の閲覧回数
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 件の賞賛