UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer makarau1
Observer
805 Views
Registered: ‎06-26-2018

Dual core Microblaze XSDK Run/Debug

Jump to solution

Dear Experts,

 

I have 2 core Microblaze HW with one MDM for the two processors. The MDM has the following config:

 

 mdm.png

 

The targets are as follows:

 

xsct% targets

1 xcku040

     2 MicroBlaze Debug Module at USER2

       3* MicroBlaze #0 (Running)

       4 MicroBlaze #1 (Running)

5 04900220

xsct%

 

 

With a bitstream included the mb1_test.elf (Microblaze 0) and mb2_test.elf (Microblaze 1) the software runs smoothly.

 

My problem is that I cannot run the software in the Run or Debug in the XSDK. For the ELFs I have the following config:

 

 xsdk_debug.png

 

The ELFs are build with the Debug configuration.

 

Programming the FPGA with a bitstream (no ELFs included) and then running the Debug the following errors rise in the SDK log:

 

  

15:38:03 INFO   : Connected to target on host '127.0.0.1' and port '3121'.

15:38:04 INFO   : 'targets -set -filter {jtag_cable_name =~ "Digilent JTAG-SMT2 210251A4627A" && level==0} -index 0' command is executed.

15:38:13 INFO   : FPGA configured successfully with bitstream "C:/xprj/dual_mb_00/dual_mb.sdk/dual_mb_00_top_hw_platform_0/dual_mb_00_top.bit"

15:38:18 INFO   : CPU Number not found for processor design_mb_1_wrapper_inst_design_mb_1_i_microblaze_0, defaulting to 0

15:38:18 INFO   : CPU Number not found for processor design_mb_2_wrapper_inst_design_mb_2_i_microblaze_0, defaulting to 0

15:38:18 INFO   : 'targets -set -filter {jtag_cable_name =~ "Digilent JTAG-SMT2 210251A4627A" && level==0} -index 0' command is executed.

15:38:18 INFO   : 'fpga -state' command is executed.

15:38:18 INFO   : Connected to target on host '127.0.0.1' and port '3121'.

15:38:18 INFO   : CPU Number not found for processor design_mb_1_wrapper_inst_design_mb_1_i_microblaze_0, defaulting to 0

15:38:18 INFO   : Bscan info not found for microblaze design_mb_1_wrapper_inst_design_mb_1_i_microblaze_0, defaulting to 2

15:38:18 INFO   : CPU Number not found for processor design_mb_2_wrapper_inst_design_mb_2_i_microblaze_0, defaulting to 0

15:38:18 INFO   : Bscan info not found for microblaze design_mb_2_wrapper_inst_design_mb_2_i_microblaze_0, defaulting to 2

15:38:18 INFO   : Jtag cable 'Digilent JTAG-SMT2 210251A4627A' is selected.

15:38:18 INFO   : 'jtag frequency' command is executed.

15:38:18 INFO   : Context for processor 'design_mb_1_wrapper_inst_design_mb_1_i_microblaze_0' is selected.

15:38:19 INFO   : The application 'C:/xprj/dual_mb_00/dual_mb.sdk/mb1_test/Debug/mb1_test.elf' is downloaded to processor 'design_mb_1_wrapper_inst_design_mb_1_i_microblaze_0'.

15:38:19 INFO   : Context for processor 'design_mb_2_wrapper_inst_design_mb_2_i_microblaze_0' is selected.

15:38:20 INFO   : The application 'C:/xprj/dual_mb_00/dual_mb.sdk/mb2_test/Debug/mb2_test.elf' is downloaded to processor 'design_mb_2_wrapper_inst_design_mb_2_i_microblaze_0'.

15:38:20 INFO   : ----------------XSDB Script----------------

connect -url tcp:127.0.0.1:3121

targets -set -nocase -filter {name =~ "microblaze*#0" && bscan=="USER2" && jtag_cable_name =~ "Digilent JTAG-SMT2 210251A4627A"} -index 0

dow C:/xprj/dual_mb_00/dual_mb.sdk/mb1_test/Debug/mb1_test.elf

targets -set -nocase -filter {name =~ "microblaze*#0" && bscan=="USER2" && jtag_cable_name =~ "Digilent JTAG-SMT2 210251A4627A"} -index 0

dow C:/xprj/dual_mb_00/dual_mb.sdk/mb2_test/Debug/mb2_test.elf

----------------End of Script----------------

 

15:38:20 ERROR  : XSCT server calls should not be made from TCF thread.

java.lang.RuntimeException: XSCT server calls should not be made from TCF thread.

        at com.xilinx.sdk.xsdb.XSDBCommandManager.issueAndWait(XSDBCommandManager.java:384)

        at com.xilinx.sdk.xsdb.XsdbCommandUtils.executeAndRespond(XsdbCommandUtils.java:307)

        at com.xilinx.sdk.hw.internal.HwPlatform.populateCpuInfo(HwPlatform.java:1671)

        at com.xilinx.sdk.hw.internal.HwPlatform.getCpuNumber(HwPlatform.java:1704)

        at com.xilinx.sdk.targetmanager.XsdbJtagDeviceHelper.getJavaProcFilter(XsdbJtagDeviceHelper.java:421)

        at com.xilinx.sdk.tcf.debug.DbRegisterLoader.isMbProcMatch(DbRegisterLoader.java:664)

        at com.xilinx.sdk.tcf.debug.DbRegisterLoader.run(DbRegisterLoader.java:563)

        at com.xilinx.sdk.tcf.debug.DbRegisterLoader$2$1.doneGetState(DbRegisterLoader.java:144)

        at org.eclipse.tcf.internal.services.remote.RunControlProxy$RunContext$1.done(RunControlProxy.java:140)

15:38:20 ERROR  : Failed to update registers information for 'design_mb_1_wrapper_inst_design_mb_1_i_microblaze_0'.

15:38:20 ERROR  : XSCT server calls should not be made from TCF thread.

java.lang.RuntimeException: XSCT server calls should not be made from TCF thread.

        at com.xilinx.sdk.xsdb.XSDBCommandManager.issueAndWait(XSDBCommandManager.java:384)

        at com.xilinx.sdk.xsdb.XsdbCommandUtils.executeAndRespond(XsdbCommandUtils.java:307)

        at com.xilinx.sdk.hw.internal.HwPlatform.populateCpuInfo(HwPlatform.java:1671)

        at com.xilinx.sdk.hw.internal.HwPlatform.getCpuNumber(HwPlatform.java:1704)

        at com.xilinx.sdk.targetmanager.XsdbJtagDeviceHelper.getJavaProcFilter(XsdbJtagDeviceHelper.java:421)

        at com.xilinx.sdk.tcf.debug.DbRegisterLoader.isMbProcMatch(DbRegisterLoader.java:664)

        at com.xilinx.sdk.tcf.debug.DbRegisterLoader.run(DbRegisterLoader.java:563)

        at org.eclipse.tcf.EventQueue.run(EventQueue.java:95)

        at java.lang.Thread.run(Thread.java:745)

15:38:20 ERROR  : Failed to update registers information for 'design_mb_2_wrapper_inst_design_mb_2_i_microblaze_0'.

15:38:20 INFO   : Context for processor 'design_mb_1_wrapper_inst_design_mb_1_i_microblaze_0' is selected.

15:38:20 INFO   : 'con' command is executed.

15:38:20 INFO   : Context for processor 'design_mb_2_wrapper_inst_design_mb_2_i_microblaze_0' is selected.

15:38:20 ERROR  : Already running

15:38:20 INFO   : Disconnected from the channel tcfchan#7.

 

 

Could you tell the way of correct run or configuration of SW or HW?

 

Thank you very much for the help!

0 Kudos
1 Solution

Accepted Solutions
Observer makarau1
Observer
701 Views
Registered: ‎06-26-2018

Re: Dual core Microblaze XSDK Run/Debug

Jump to solution

Hi  Sadanan,

 

sorry for the late reply :-)

 

We resolved the issue.

in a multicore debug/run the XSDK cannot/does not select the proper core before downloading the elf.

Namely, the targets are as follows:

 

xsct% targets

1 xcku040

     2 MicroBlaze Debug Module at USER2

       3* MicroBlaze #0 (Running)

       4 MicroBlaze #1 (Running)

 

The elf1 is loaded into the mb#0 (starred), which is OK.

Then the XSDK downloads elf2 into the mb#0 which is still starred !

 

So the XSDK dos not switch the second core.

 

We resolved this by creating a tcl like this:

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

connect -url tcp:127.0.0.1:3121

targets 2

targets -set -nocase -filter {name =~ "microblaze*#0" && bscan=="USER2"  && jtag_cable_name =~ "Digilent JTAG-SMT2 210251A4627A"} -index 0
dow C:/xprj/dual_mb_01/dual_mb.sdk/mb1_test/Debug/mb1_test.elf

 

targets -set -nocase -filter {name =~ "microblaze*#1" && bscan=="USER2"  && jtag_cable_name =~ "Digilent JTAG-SMT2 210251A4627A"} -index 0
dow C:/xprj/dual_mb_01/dual_mb.sdk/mb2_test/Debug/mb2_test.elf

 

rst -processor

 

con

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Here the second core is explicitly selected and downloaded the elf2.

 

Could you forward this to the Xilinx SW team?

Thank you!

0 Kudos
3 Replies
Xilinx Employee
Xilinx Employee
708 Views
Registered: ‎10-21-2010

Re: Dual core Microblaze XSDK Run/Debug

Jump to solution

Hi @makarau1,

 

Would it be possible to move to a more recent version of SDK? It seems like you're running into one of those internal errors that existed few releases back. The warnings should go away too

0 Kudos
Observer makarau1
Observer
702 Views
Registered: ‎06-26-2018

Re: Dual core Microblaze XSDK Run/Debug

Jump to solution

Hi  Sadanan,

 

sorry for the late reply :-)

 

We resolved the issue.

in a multicore debug/run the XSDK cannot/does not select the proper core before downloading the elf.

Namely, the targets are as follows:

 

xsct% targets

1 xcku040

     2 MicroBlaze Debug Module at USER2

       3* MicroBlaze #0 (Running)

       4 MicroBlaze #1 (Running)

 

The elf1 is loaded into the mb#0 (starred), which is OK.

Then the XSDK downloads elf2 into the mb#0 which is still starred !

 

So the XSDK dos not switch the second core.

 

We resolved this by creating a tcl like this:

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

connect -url tcp:127.0.0.1:3121

targets 2

targets -set -nocase -filter {name =~ "microblaze*#0" && bscan=="USER2"  && jtag_cable_name =~ "Digilent JTAG-SMT2 210251A4627A"} -index 0
dow C:/xprj/dual_mb_01/dual_mb.sdk/mb1_test/Debug/mb1_test.elf

 

targets -set -nocase -filter {name =~ "microblaze*#1" && bscan=="USER2"  && jtag_cable_name =~ "Digilent JTAG-SMT2 210251A4627A"} -index 0
dow C:/xprj/dual_mb_01/dual_mb.sdk/mb2_test/Debug/mb2_test.elf

 

rst -processor

 

con

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Here the second core is explicitly selected and downloaded the elf2.

 

Could you forward this to the Xilinx SW team?

Thank you!

0 Kudos
Xilinx Employee
Xilinx Employee
669 Views
Registered: ‎10-21-2010

Re: Dual core Microblaze XSDK Run/Debug

Jump to solution

Hi @makarau1,

 

Use a tcl script like this will work. However, the original issue is fixed in the newer versions of the tool, so you don't have to create the a script manually.

 

Couple of comments on your script.

 

'targets 2' is redundant, since you're selecting MB#0 immediately after that. Also, selecting a target by its id is not a good practice, while scripting. Targets are assigned IDs as they become available, so the IDs can change.

'rst -processor' should ideally be before dow. You need to run it for both the MB cores

'con' should be run for both the MB cores separately

 

Your script should look like something below

connect ;# -url is not needed for local boards

targets -set -filter {name =~ "microblaze*#0"} ;# other options are not needed if you have only one cable, jtag device, and MDM

rst -proc

dow mb1.elf

con

targets -set -filter {name =~ "microblaze*#1"} ;# other options are not needed if you have only one cable, jtag device, and MDM

rst -proc

dow mb2.elf

con

0 Kudos