IMX6 GDB debugging

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

IMX6 GDB debugging

2,179件の閲覧回数
john_smith
Contributor II

Hello!

I'm using GDB to debug programs in such a way:

1. Establish ethernet connection between the board and the PC.

2. Run command

gdbserver :1234 myApp

on board

3. Run

arm-none-eabi-gdb myApp

on PC

4.  Run

target remote board_IP:1234

on PC

After that the debugging session is started.

Now I'm intersted - is there a way to debug running linux kernel with GDB?

I can use command:

arm-none-eabi-gdb vmlinux

at step 3.

But what command should be executed in order to start gdbserver on board?

Thank you in advance!

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

1,295件の閲覧回数
Carlos_Musich
NXP Employee
NXP Employee

Hi John,

it is not necessary you just need to build kernel with CONFIG_DEBUG_INFO=y  option

======================= GDB ==================

cd /sys/devices/system/cpu/cpu0/cpuidle/state1

echo 1 > /sys/devices/system/cpu/cpu0/cpuidle/state1/disable

 

sudo JLinkGDBServer -if JTAG -endian little -device MCIMX6L8 -select USB -noir -noreset

 

CONFIG_DEBUG_INFO=y # this will compile in debugging symbols and info

 

$ gdb-[CROSS-COMPILE] /path/to/linux/build/vmlinux


Regards,
Carlos

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信