|
From: Peter T. <pe...@tu...> - 2012-10-24 14:37:25
|
Hi list, while getting started using openocd I experience some strange problems debugging a Freescale I.MX28 based board. What I want to do is run the destination hardware and let it boot from its internal NAND using the u-boot and set a breakpoint into a certain linux drivers initialization routine. GDB is used for debugging and should be able to load the kernel into the board. I would like to run uboot because it already contains the necessary platform init code which i otherwise would have to port to openocd again. What happens is: - When "continue"ing in gdb, the uboot launches and the autoboot can be interrupted by keypresses. But there is no chance to enter anything on the uboot command line, which would be helpful to e.g. manually fetch the kernel from my machine using tftp. - When trying to load the kernel from gdb, I get strange DCC errors when using DCC: $ openocd -f openocd.cfg Open On-Chip Debugger 0.6.0-rc2 (2012-09-13-16:35) Licensed under GNU GPL v2 For bug reports, read http://openocd.sourceforge.net/doc/doxygen/bugs.html Info : only one transport option; autoselect 'jtag' adapter speed: 4000 kHz trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain adapter_nsrst_delay: 100 jtag_ntrst_delay: 100 dcc downloads are enabled 1 Info : clock speed 3000 kHz Info : JTAG tap: imx28.cpu tap/device found: 0x079264f3 (mfg: 0x279, part: 0x7926, ver: 0x0) Info : Embedded ICE version 6 Info : imx28.cpu: hardware has 2 breakpoint/watchpoint units Info : accepting 'gdb' connection from 3333 Warn : negative reply, retrying Warn : acknowledgment received, but no packet pending Warn : acknowledgment received, but no packet pending Error: DCC write failed, expected end address 0xc0008200 got 0xc0008000 Error: DCC write failed, expected end address 0xc000c2c0 got 0xc0008400 Error: DCC write failed, expected end address 0xc0008200 got 0xc0008000 - When trying to load a kernel with DCC disabled i get: $ openocd -f openocd.cfg Open On-Chip Debugger 0.6.1 (2012-10-24-14:34) Licensed under GNU GPL v2 For bug reports, read http://openocd.sourceforge.net/doc/doxygen/bugs.html Info : only one transport option; autoselect 'jtag' adapter speed: 4000 kHz trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain adapter_nsrst_delay: 100 jtag_ntrst_delay: 100 dcc downloads are enabled dcc downloads are disabled Info : clock speed 3000 kHz Info : JTAG tap: imx28.cpu tap/device found: 0x079264f3 (mfg: 0x279, part: 0x7926, ver: 0x0) Info : Embedded ICE version 6 Info : imx28.cpu: hardware has 2 breakpoint/watchpoint units Info : accepting 'gdb' connection from 3333 Warn : negative reply, retrying Warn : acknowledgment received, but no packet pending Warn : acknowledgment received, but no packet pending Warn : memory write caused data abort (address: 0xc0008000, size: 0x4, count: 0x80) Warn : memory write caused data abort (address: 0xc0008400, size: 0x4, count: 0xfb0) ========================= In any case gcc goes like: ========================= $ arm-fsl-linux-gnueabi-gdb GNU gdb (GDB) 7.1 Copyright (C) 2010 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=i686-build_pc-linux-gnu --target=arm-fsl-linux-gnueabi". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. (gdb) target remote 192.168.0.210:3333 Remote debugging using 192.168.0.210:3333 0x4102989c in ?? () (gdb) load vmlinux Loading section .head.text, size 0x200 lma 0xc0008000 Loading section .text, size 0x3f53e0 lma 0xc0008400 Load failed (gdb) ========================= My setup is: IMX28 based board, not the eval board but rather close. An FTDI2232 based simple jtag adapter. Laptop running OS X with a VM running Ubuntu and the gdb for the kernel development. OpenOCD versions 0.6.0-rc2 up to 0.6.1. See my configs, sometimes alternatives i tried are commented out. Tried all possible combinations of these to no avail. ======================= source [find interface/openocd-usb.cfg] adapter_khz 4000 ft2232_latency 10 #source [find target/imx28.cfg] source [find board/imx28evk.cfg] #$_TARGETNAME configure -work-area-virt 0x0 -work-area-phys 0x0 -work-area-size 0x8000 -work-area-backup 1 #$_TARGETNAME configure -work-area-virt 0xffff4c00 -work-area-phys 0x0 -work-area-size 0x8000 -work-area-backup 0 #$_TARGETNAME configure -work-area-virt 0xffff4c00 -work-area-phys 0x0 -work-area-size 0x8000 -work-area-backup 1 #$_TARGETNAME configure -work-area-virt 0xffff4c00 -work-area-phys 0xffff4c00 -work-area-size 0x8000 -work-area-backup 1 $_TARGETNAME configure -work-area-virt 0x0 -work-area-phys 0x0 -work-area-size 0x8000 -work-area-backup 1 #arm7_9 dcc_downloads enable arm7_9 dcc_downloads disable ======================= I tried guessing the virtual address of the internal SRAM from the MMU description, especially there i'm really unsure. Sorry for the lengthy post, but maybe someone has an idea how to get this configuration to work. Thanks in advance, Peter |