Debugging in MPC5777M

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Debugging in MPC5777M

1,813 Views
yalamandadosaky
Contributor V

Hi All , I have an existing project for MPC 5777M which consists Z4_2 and Z7_0 cores. Then how to debug both using launch group.Martin Kovar

Labels (2)
0 Kudos
4 Replies

1,192 Views
yalamandadosaky
Contributor V

I got stuck when I am trying to debug the above

GNU gdb (GDB) 7.8.2
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=powerpc-eabivle".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".

0 Kudos

1,192 Views
stanish
NXP Employee
NXP Employee

Hello Yalmanda,

In order to debug multicore project you have to run a launch group configuration:

pastedImage_1.png

When you press "Debug" button it starts programming flash and loading all information for the cores. At the end of loading process (which might take several minutes) you should see something like this:

pastedImage_3.png

Now If you click on a specific thread in Debug View you switch the debug context/core.

If you are still not able to connect:

1) reset/Power On Reset your board

2) make sure debug interface cable is connected properly and your board is powered up.

3) check if there is a running instance of debugger server/client service. If so please terminate it first(Click on "End Process").

pastedImage_4.png

4) create a new single-core project for MPC5777M (z4 only) build it and debug it. Does it work?

5) now create a new multi-core project for MPC5777M (z4, z7, z7) and build it and run the launch group configuration.

Could please post here a debugger snapshot if you still observe any error?

Also please attach the debugger console log  (gdb traces console) for the main core (z4_2). It might help us to resolve this issue much faster:

pastedImage_5.png

Thanks!

Stan

0 Kudos

1,192 Views
yalamandadosaky
Contributor V

Hi Stan,Thank you for reply.

We have imported an existing project into workspace , consists only Z4_2 and  Z7_0, Z7_0 does not consists any initialization code like vector.c,initswhandler.c etc.... .

and the debug console is

GNU gdb (GDB) 7.8.2
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=powerpc-eabivle".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
monitor preserve0 0
load /home/yalamanda/MPC5777M_Doc/sdsc/Z7_0/Debug/OS3-TCPIP_Z7_0.elf
Loading section .startup, size 0x29e lma 0x1000000
Loading section .core_exceptions_table, size 0xf4 lma 0x1001000
Loading section .text, size 0x236bc lma 0x10010f4
Loading section .rodata, size 0x3944 lma 0x10247b0
Loading section .eh_frame_hdr, size 0x14 lma 0x10280f4
Loading section .eh_frame, size 0x48 lma 0x1028108
Loading section .data, size 0x14 lma 0x1028150
Loading section .sdata, size 0x68 lma 0x1028164
Start address 0x1000000, load size 160874
Transfer rate: 167 KB/sec, 1051 bytes/write.
load /home/yalamanda/MPC5777M_Doc/sdsc/Z4_2/Debug/OS3-TCPIP_Z4_2.elf
Loading section .rchw, size 0x4 lma 0xfc0000
Loading section .cpu2_reset_vector, size 0x4 lma 0xfc0004
Loading section .cpu0_reset_vector, size 0x4 lma 0xfc0010
Loading section .cpuc_reset_vector, size 0x4 lma 0xfc0018
Loading section .startup, size 0x26c lma 0x1500000
Loading section .core_exceptions_table, size 0xf4 lma 0x1501000
Loading section .intc_vector_table, size 0xf08 lma 0x1502000
Loading section .text, size 0x250 lma 0x1502f10
Start address 0x1500000, load size 5320
Transfer rate: 52 KB/sec, 443 bytes/write.
monitor endmultiload
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
monitor selectcore 0
Warning: the current language does not match this frame.
continue
Continuing.
Note: automatically using hardware breakpoints for read-only addresses.

Temporary breakpoint 1, main () at ../src/main_Z4_2.c:49
49        int counter = 0;
No breakpoint number 2.
Remote connection closed

pastedImage_1.png

0 Kudos

1,193 Views
yalamandadosaky
Contributor V

And the error I am getting while trying to debug the code is

Error in final launch sequence
Failed to execute MI command:
-target-select remote localhost:7226
Error message from debugger back end:
localhost:7226: Connection timed out.
localhost:7226: Connection timed out.

0 Kudos