Is there anyone who knows how to debug(J-TAG) IMX6DL based on 3.14.28 Kernel?

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

Is there anyone who knows how to debug(J-TAG) IMX6DL based on 3.14.28 Kernel?

1,032件の閲覧回数
seonghoonyoo
Contributor I

Hello. I have something to ask you.

Nowadays I try to analyze 3.14.28 Kernel in IMX6DL.

by using J-TAG debugger, i'd like to repeat "break" and "continue" where i want.

It was successful on 3.10 Kernel.

But it always stopped whenever i tried to do.

Look at the following picture.

M2.jpg

there is one weird thing. without J-TAG attached, it went through well by ramdisk.

Also, J-TAG debugging worked well before the message saying "random: nonblocking pool is initialized" when i tried to attach J-TAG.

But it didn't work after the message whenever i debugged by using J-TAG.

I found one more thing.

M3.jpg

after "arch_hw_breakpoint_init", program never stopped even though i made break point.

on 3.10 Kernel, break point worked well. i did trace the stream of Kernel booting well.

But i don't know why it doesn't work. so  i guess there is any funtions or option that makes debug disabled.

when i compile 3.10 Kernel, i do following steps.

unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE

make -j 4 distclean  CC="arm-poky-linux-gnueabi-gcc  -mno-thumb-interwork -marm" LD="arm-poky-linux-gnueabi-ld.bfd  "  LOADADDR=0x10008000

make -j 4 imx_v7_defconfig CC="arm-poky-linux-gnueabi-gcc  -mno-thumb-interwork -marm" LD="arm-poky-linux-gnueabi-ld.bfd  "  LOADADDR=0x10008000

make -j 4 uImage  CC="arm-poky-linux-gnueabi-gcc  -mno-thumb-interwork -marm" LD="arm-poky-linux-gnueabi-ld.bfd  "  LOADADDR=0x10008000

At that time, i can debug this kernel(uImage).

when i compile 3.14 Kernel, i do following steps.

source /opt/poky/1.5.1/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi

unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE

make -j 8 distclean CC="arm-poky-linux-gnueabi-gcc  -mno-thumb-interwork -marm" LD="arm-poky-linux-gnueabi-ld.bfd" LOADADDR=0x10008000

make -j 8 imx_v7_defconfig CC="arm-poky-linux-gnueabi-gcc  -mno-thumb-interwork -marm" LD="arm-poky-linux-gnueabi-ld.bfd" LOADADDR=0x10008000

make -j 8 zImage CC="arm-poky-linux-gnueabi-gcc  -mno-thumb-interwork -marm" LD="arm-poky-linux-gnueabi-ld.bfd" LOADADDR=0x10008000

At the time, i cannot debug the kernel(zImage).

is there something special option included in compile command?

Could you let me know how to debug IMX6DL based on 3.14 Kernel?

I'm looking forward to receiving solution. Thanks.

ラベル(4)
0 件の賞賛
返信
2 返答(返信)

757件の閲覧回数
remingtonfurman
Contributor II

after "arch_hw_breakpoint_init", program never stopped even though i made break point.

I ran into this problem as well, building 4.9.9.  That function resets the hardware breakpoints that the JTAG is using, so after that function runs they are all gone and the debugger will miss them.  Stepping through that function you might notice that it interacts with the debugger using "mrc p14" (ARM Information Center).  Due to optimizations I couldn't figure out exactly what instruction was clearing the breakpoints.

You can disable that function by disabling CONFIG_PERF_EVENTS in `make menuconfig`, which uses the hardware breakpoints for performance monitoring.  That probably isn't necessary while you're debugging.

CONFIG_DEBUG_INFO=y and CONFIG_GDB_SCRIPTS=y are also useful during kernel debugging.

0 件の賞賛
返信

757件の閲覧回数
alejandrolozan1
NXP Employee
NXP Employee

Hi,

I have not tried it with kernel 3.14.28 but I have seen that sometimes the symbols need to be relocated (apply an offset)

I think that the below link can be useful:

Software Development Tools: Porting Linux made ... | ARM Connected Community

I hope that helps,

Alejandro

0 件の賞賛
返信