[SOLVED] J-Link GDBserver RISC-V custom CSRs

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] J-Link GDBserver RISC-V custom CSRs

    Hello,

    I am doing some development work on a RISC-V 32-bit core. My core does not implement all of the standard CSRs, but it does implement some custom ones which I would like to be able to see in GDB. Is there a way to describe to the GDB server these new CSRs so that they are available to GDB?

    Andrew.
  • Hi,

    Currently, there is no possibility to user-extend the register description send by GDBServer to GDB at debug session start.
    This is also way more tricky than it sounds because some registers need to be read different from others etc.
    What we could do is adding a monitor command for CSR access.
    Would that help?

    We already have this for J-Link Commander:
    ReadCSR <RegIndex>[,<RegSize>]
    WriteCSR <RegIndex>,<Value>[,<RegSize>]
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi Alex,

    Adding a monitor command for CSR access would help. I should then be able to write some commands in Python that use my new CSR names, convert to/from the CSR index and set them or display them.

    I notice that the GDBServer does not attempt to use the Access Register abstract command to read CSRs, it always uses code written into the programme buffer.
  • Hi Andrew,
    Alex asked me to come back to you regarding this.

    The functionality is implemented and is currently in QA.
    A release with this feature is planned within the next 2 weeks (most likely as part of a beta version).

    Stay up-to-date regarding J-Link:
    segger.com/notification/subscribe.php?prodid=7,94

    We will consider this thread as closed now.

    Best regards,
    Fabian
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.