[SOLVED] Access to handel_trap

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

  • [SOLVED] Access to handel_trap

    Hello

    Segger Embedded Studio for RISC-V helps me to debug a RISC-V processor. The debugging works great. Unfortunately, I have now run into a problem that I don't know how to solve.

    I have built a buffer memory that is filled by UART. As soon as this is full, an interrupt signal is generated and jumped into trap_entry. From this trap_entry follows the jump into handel_trap. The handel_trap always jumps back to itself with the command J. Unfortunately, I don't know how to change the command to handel_trap.

    I hope you can help me.

    I have attached a photo showing the program code and the assembler code in trap_entry and handel_trap. In addition, the program main.c contains some examples of how I thought to change the content of handel_trap but non works.
  • Hello,

    Thank you for your inquiry.
    Essentially all you need to do is to implement your own version of handle_trap as it is defined as weak.

    See the following Wiki page for more information:
    wiki.segger.com/How_to_impleme…rrupt_handlers_for_RISC-V

    Best regards,
    Nino
    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.