Note that there are some explanatory texts on larger screens.

plurals
  1. POarm-none-eabi-gdb and openocd: Malformed response to offset query, qOffsets?
    primarykey
    data
    text
    <p>I am attempting to use GDB to debug a Stellaris LM3S8962 Evaluation board using OpenOCD and the GNU ARM toolchain (installed with MacPorts), whenever I set the remote target in GDB it always returns "Malfomred response to offset query, qOffsets". Any ideas on what could be going wrong? Is there anything that I am missing?</p> <pre><code>[bcochran@narada arm]$ arm-none-eabi-gdb GNU gdb (GDB) 7.3 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt; 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-apple-darwin10.7.0 --target=arm-none-eabi". For bug reporting instructions, please see: &lt;http://www.gnu.org/software/gdb/bugs/&gt;. (gdb) set remotebaud 115200 (gdb) set debug remote 1 (gdb) file ~/dev/eclipse_workspace/hello_world_arm/bin/main.axf Reading symbols from /Users/bcochran/dev/eclipse_workspace/hello_world_arm/bin/main.axf...(no debugging symbols found)...done. (gdb) target remote localhost:4444 Remote debugging using localhost:4444 Sending packet: $qSupported:qRelocInsn+#9a...putpkt: Junk: {{}~Open On Nak Sending packet: $qSupported:qRelocInsn+#9a...putpkt: Junk: Chip Debugger &gt; Ack Packet received: qSupported:qRelocInsn+ Packet qSupported (supported-packets) is supported ... Packet qAttached (query-attached) is supported Sending packet: $qOffsets#4b...Ack Packet received: qOffsets Malformed response to offset query, qOffsets </code></pre> <p>Here is the openocd output... as soon as the malformed response comes across openocd drops the telnet connection...</p> <pre><code>[bcochran@narada bin]$ openocd -f ../openocd/luminary.cfg -f ../openocd/stellaris.cfg Open On-Chip Debugger 0.6.0-dev-00014-g827057f (2011-08-09-22:02) Licensed under GNU GPL v2 For bug reports, read http://openocd.berlios.de/doc/doxygen/bugs.html Info : only one transport option; autoselect 'jtag' 500 kHz Info : clock speed 500 kHz Info : JTAG tap: lm3s.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3) Info : lm3s.cpu: hardware has 6 breakpoints, 4 watchpoints Info : accepting 'telnet' connection from 4444 Error: error during read: Connection reset by peer Info : dropped 'telnet' connection </code></pre> <p>Here are the version outputs of my arm-none-eabi-* toolchain...</p> <pre><code>[bcochran@narada tcl]$ arm-none-eabi-gcc -v Using built-in specs. COLLECT_GCC=arm-none-eabi-gcc COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/arm-none-eabi/4.6.1/lto-wrapper Target: arm-none-eabi Configured with: ../gcc-4.6.1/configure --prefix=/opt/local --target=arm-none-eabi --enable-languages=c,objc,c++,obj-c++ --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/arm-none-eabi-gcc --with-system-zlib --disable-nls --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --enable-stage1-checking --enable-multilib --with-newlib --enable-interwork Thread model: single gcc version 4.6.1 (GCC) [bcochran@narada tcl]$ arm-none-eabi-gdb -v GNU gdb (GDB) 7.3 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt; 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-apple-darwin10.7.0 --target=arm-none-eabi". For bug reporting instructions, please see: &lt;http://www.gnu.org/software/gdb/bugs/&gt;. </code></pre> <p>I am able to compile using the toolchain, and flash the resultant .bin file using OpenOCD. I have been unable to find a solution to the "malformed response" issue just by searching the web.</p> <p>Thanks in advance for any advice or assistance!</p> <p>UPDATES</p> <p>Thanks to answers from @turbo-j and @guy-sirton, I was able to progress a bit further... The most helpful thus far was that I was indeed using the wrong port (4444 instead of 3333) but now I am getting the following whether I add <code>-c "init" -c "halt" -c "reset halt"</code> to my openocd command string or not:</p> <pre><code>(gdb) target remote localhost:3333 Remote debugging using localhost:3333 Remote 'g' packet reply is too long: 0080004000000000040000220f0000002833405451332abc009600a4d2b86092c0c118c03040d6f0284dbb93204b40c2000000000c010020ffffffff550400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000001 </code></pre> <p>(this is right after the qOffsets req/resp, which now passes)</p> <p>On the OpenOCD side:</p> <pre><code>Info : accepting 'gdb' connection from 3333 Warn : acknowledgment received, but no packet pending Info : dropped 'gdb' connection </code></pre> <p>With sometimes a <code>undefined debug reason 6 - target needs reset</code> on the OpenOCD console...not sure what is going on now but it seems closer to functioning</p> <p>UPDATES 2</p> <p>It seems if I do not load the file 'main.axf' or 'main.o' I do not run into the <code>Remote 'g' packet reply is too long</code> but I get no symbols... I've noticed other websites deal primarily with the .elf extension. What is the difference? I'm using the "Hello World" example from StellarisWare which it generates main.axf, main.bin (flash writes and runs fine), main.d, main.o from the <code>make</code> command. Something odd about my Makefile?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload