1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Opensource Debugging Model Question

Discussion in 'Embedded' started by Randy Yates, May 23, 2014.

  1. Randy Yates

    Randy Yates Guest

    I am curious how this works at the register level. I am going by the
    description here, especially the graphic showing the flow and interfaces
    of the debugging model.

    http://mcuoneclipse.com/2013/07/22/...art-3-debugger-gdb-server-with-pe-and-segger/

    So my question is, when you're in debugging mode, how does Eclipse
    "know" what registers comprise the target? Is this information somehow
    provided by the GDB server?

    Related: how does an Eclipse debugging session "know" what peripherals
    are on the specific target chip you're debugging? For example, would it
    be able to know that one version of Freescale Kinetis has 2 I2C
    interfaces while another has 3 (hypothetically)?
     
    Randy Yates, May 23, 2014
    #1
    1. Advertisements

  2. Randy Yates

    Randy Yates Guest

    And to know, e.g., what the base addresses of those peripherals are and
    to be able to display in "decoded" form the peripheral registers (e.g.,
    the Master/Slave bit in an I2C peripheral)?
     
    Randy Yates, May 23, 2014
    #2
    1. Advertisements

  3. Randy Yates

    Tauno Voipio Guest

    The target (core) processor registers are known by GDB.
    Eclipse works here as a polished front-end to GDB.

    In the setup of the link, the peripherals and the board around
    the core processor are known by the P&E debugger interface module.

    There are many similarly functioning modules for Eclipse around,
    for several different chips and even boards.

    P&E have provided debuggers for Motorola/Freescale for a long
    time. I may still have somewhere a P&E dongle for MC68332.
     
    Tauno Voipio, May 23, 2014
    #3
  4. Randy Yates

    Randy Yates Guest

    Thanks Tauno. Actually I was planning on going with Segger's J-Link
    Pro and their corresponding GDB server,

    http://www.segger.com/jlink-gdb-server.html

    but I guess the answer is the same.

    So you're saying it is somehow dynamically defined by the GDB
    client/server interface, which is what I thought.
     
    Randy Yates, May 23, 2014
    #4
  5. Randy Yates

    Tauno Voipio Guest


    The GDB is run from Eclipse, instead of the console.

    The Segger box (or some other similar tool, P&E, OpenOCD etc)
    runs as a GDB remote processor agent, and it is able to feed
    information to the GDB. It is a private matter of the interface
    box and the target processor / board how the communication
    in the last leg is handled.

    Both the console control protocols and the remote agent
    protocol are well described in the GDB documentation.

    Another way to describe the interface registers to the
    debugger is to write a struct of the registers of a peripheral,
    and make its address public to the linker. There are two ways:
    either to use an assembler module with the absolute addresses
    as public symbols, or feeding the addresses via the linker
    script.

    I'm using the assembly language module method with GCC, GDB
    and OpenOCD, for ARM7TDMI, Cortex-M3 and Cortex-M4.
     
    Tauno Voipio, May 24, 2014
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.