energia / Energia

Fork of Arduino for the Texas Instruments LaunchPad's
http://energia.nu
Other
794 stars 672 forks source link

TM4C: gdb requested a non-existing register #399

Closed rei-vilo closed 10 years ago

rei-vilo commented 10 years ago

Debugging used to work with previous version of Energia but no longer works.

I don't understand the Error: gdb requested a non-existing register message.

LaunchPad LM4F120 and TM4C123 Energia 0101E0012 Sketch blink.ino Open On-Chip Debugger 0.8.0 GNU gdb (GNU Tools for ARM Embedded Processors) 7.4.1 Mac OS X 10.9.3 Unchanged ek_lm4f120xl.cfg and ek_lm4f120xl.xml files

$ openocd --file /Users/ReiVilo/Documents/Projets/Xcode/embed2/embed2/Utilities/ek_lm4f120xl.cfg
Open On-Chip Debugger 0.8.0 (2014-05-10-14:22)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : This adapter doesn't support configurable speed
Info : ICDI Firmware version: 9270
Info : lm4f120h5qr.cpu: hardware has 6 breakpoints, 4 watchpoints
$ /Applications/Energia.app/Contents/Resources/Java/hardware/tools/lm4f/bin/arm-none-eabi-gdb
GNU gdb (GNU Tools for ARM Embedded Processors) 7.4.1.20130312-cvs
Copyright (C) 2012 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-apple-darwin10 --target=arm-none-eabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) 

Commands on second window = arm-none-eabi-gdb

Answers from first window = openocd

(gdb) file '/var/folders/5d/dky9xc691m32kztqnhkn8bhw0000gn/T/build667309560293890230.tmp/Blink.cpp.elf
(gdb) set tdesc filename /Users/ReiVilo/Documents/Projets/Xcode/embed2/embed2/Utilities/ek_lm4f120xl.xml
(gdb) set remotetimeout 2000
(gdb) target extended :3333

Info : accepting 'gdb' connection from 3333 undefined debug reason 7 - target needs reset

(gdb) monitor reset halt

target state: halted target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x000002b4 msp: 0x20008000

(gdb) load

target state: halted target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x000002b4 msp: 0x20008000 target state: halted target halted due to breakpoint, current mode: Thread xPSR: 0x61000000 pc: 0x20000042 msp: 0x20008000 target state: halted target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x000002b4 msp: 0x20008000 Error: gdb requested a non-existing register Info : dropped 'gdb' connection

(gdb) monitor reset init
# TI Stellaris Launchpad ek-lm4f120xl Evaluation Kits
#
# http://www.ti.com/tool/ek-lm4f120xl
#
#
# NOTE: using the bundled ICDI interface is optional!
# This interface is not ftdi based as previous board were
#
#
source [find interface/ti-icdi.cfg]
set WORKAREASIZE 0x8000
#set WORKAREASIZE 0x4000
set CHIPNAME lm4f120h5qr
source [find target/stellaris_icdi.cfg]
<?xml version="1.0"?>
<!DOCTYPE target SYSTEM "gdb-target.dtd">
<target>
  <feature name="org.gnu.gdb.arm.core">
    <reg name="r0" bitsize="32" type="uint32"/>
    <reg name="r1" bitsize="32" type="uint32"/>
    <reg name="r2" bitsize="32" type="uint32"/>
    <reg name="r3" bitsize="32" type="uint32"/>
    <reg name="r4" bitsize="32" type="uint32"/>
    <reg name="r5" bitsize="32" type="uint32"/>
    <reg name="r6" bitsize="32" type="uint32"/>
    <reg name="r7" bitsize="32" type="uint32"/>
    <reg name="r8" bitsize="32" type="uint32"/>
    <reg name="r9" bitsize="32" type="uint32"/>
    <reg name="r10" bitsize="32" type="uint32"/>
    <reg name="r11" bitsize="32" type="uint32"/>
    <reg name="r12" bitsize="32" type="uint32"/>
    <reg name="sp" bitsize="32" type="data_ptr"/>
    <reg name="lr" bitsize="32"/>
    <reg name="pc" bitsize="32" type="code_ptr"/>
    <reg name="cpsr" bitsize="32" regnum="25"/>
  </feature>
  <feature name="org.gnu.gdb.arm.fpa">
    <reg name="f0" bitsize="96" type="arm_fpa_ext" regnum="16"/>
    <reg name="f1" bitsize="96" type="arm_fpa_ext"/>
    <reg name="f2" bitsize="96" type="arm_fpa_ext"/>
    <reg name="f3" bitsize="96" type="arm_fpa_ext"/>
    <reg name="f4" bitsize="96" type="arm_fpa_ext"/>
    <reg name="f5" bitsize="96" type="arm_fpa_ext"/>
    <reg name="f6" bitsize="96" type="arm_fpa_ext"/>
    <reg name="f7" bitsize="96" type="arm_fpa_ext"/>
    <reg name="fps" bitsize="32"/>
  </feature>
</target>
rei-vilo commented 10 years ago

According to daymoon at the [solved] openocd 0.8.0-rc1 compiled without ft2232 support thread at ArchLinux forum, the following line should no longer be called.

set tdesc filename ek_lm4f120xl.xml

rei-vilo commented 10 years ago

Case solved and closed.