[SOLVED] Flash BR not working with JLink Codesourcery ARM EABI

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

  • [SOLVED] Flash BR not working with JLink Codesourcery ARM EABI

    Flash BR not working with JLink Codesourcery ARM EABI

    I have noticed in the log that

    JLINK_SetBPEx(Addr = 0x08000040, Type = 0xFFFFFF12) returns 0x00000000 (0000ms, 7096ms total)


    When I compare this to IAR's tools

    IAR tools use
    0xFFFFFFF2 or
    0xF2
    for type and can set FlashBPs
    the arm-none-eabi-sprite uses
    0xFFFFFF12 or
    0xFFFFFF02



    What are the definition of the Type used in the
    JLINK_SetBPEx call?




  • Hi,

    This is not a support forum where you have any claim to get support in a defined timeframe, so it sometimes may take some time until you get an answer here (depending on our workload)...

    What are the definition of the Type used in the JLINK_SetBPEx call?

    They are explained in the J-Link SDK because for other people it is mostly not of interest.
    You can always look up the implementation type of a specific breakpoint in the Breakpoints tab in the control panel.

    Anyhow... for the breakpoint at 0x08000040 (your example from below) the following is specified:
    0xFFFFFF12
    - Breakpoint in thumb mode
    - Only allowed implementation: Hardware breakpoint or software breakpoint in RAM (no Flash breakpoint possible)

    0xFFFFFF02
    - Breakpoint in thumb mode
    - Only allowed implementation: Hardware breakpoint (no Flash breakpoint possible)

    0xFFFFFFF2
    - Breakpoint in thumb mode
    - Software and hardware breakpoint allowed. (Flash breakpoint allowed also)

    As you can also see on our website, flash breakpoints are not available for Mentor CodeBench (formerly CodeSourcery)
    due to limited J-Link support from their side: segger.com/jlink-ide-integration.html

    Workaround: Use GDB implementation instead of native J-Link implementation in Mentor CodeBench. This way, J-Link has a chance to use Flash breakpoints.


    - Alex
    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.

  • Thanks Alex!


    With the GDB server option I gain the Flash BP but loose the ability to display the stm32 peripheral register. Even if I add a Target Description with
    set tdesc filename
    and sucessfuly loaded and XML file. I was getting an error
    somthing to the fact that the read:feature was not supported
    :(



    So it look like the SEGGER GDB server does not support the read field which is a real bummer.



    Would CodeBench only have to change the values they pass to 0xFFFFFFF2 to make this all work? Is it that simple?
  • SEGGER - Alex wrote:

    Hi,

    This is not a support forum where you have any claim to get support in a defined timeframe, so it sometimes may take some time until you get an answer here (depending on our workload)...

    What are the definition of the Type used in the JLINK_SetBPEx call?

    They are explained in the J-Link SDK because for other people it is mostly not of interest.
    You can always look up the implementation type of a specific breakpoint in the Breakpoints tab in the control panel.

    Anyhow... for the breakpoint at 0x08000040 (your example from below) the following is specified:
    0xFFFFFF12
    - Breakpoint in thumb mode
    - Only allowed implementation: Hardware breakpoint or software breakpoint in RAM (no Flash breakpoint possible)

    0xFFFFFF02
    - Breakpoint in thumb mode
    - Only allowed implementation: Hardware breakpoint (no Flash breakpoint possible)

    0xFFFFFFF2
    - Breakpoint in thumb mode
    - Software and hardware breakpoint allowed. (Flash breakpoint allowed also)

    As you can also see on our website, flash breakpoints are not available for Mentor CodeBench (formerly CodeSourcery)
    due to limited J-Link support from their side: segger.com/jlink-ide-integration.html

    Workaround: Use GDB implementation instead of native J-Link implementation in Mentor CodeBench. This way, J-Link has a chance to use Flash breakpoints.


    - Alex
    What does the value of 0x000000f2 mean?
  • Hi,

    Would CodeBench only have to change the values they pass to 0xFFFFFFF2 to make this all work? Is it that simple?

    Best case, they would use 0xFFFFFFF0 to leave it up to J-Link how to implement the breakpoint, leaving it all options.
    Yes, it is that simple and believe me, we have tried to get that into CodeBench.

    So it look like the SEGGER GDB server does not support the read field which is a real bummer.

    We will have a look. Should not be to hard to implement...

    Edit: This looks more complicated than I thought because this file would also need to cover the CPU registers and GDBServer would need to know which CPU register from the file is which in the J-Link DLL.
    Could you please post the XML file you were setting?


    Best regards
    Alex
    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.
  • SEGGER - Alex wrote:

    Hi,

    Would CodeBench only have to change the values they pass to 0xFFFFFFF2 to make this all work? Is it that simple?

    Best case, they would use 0xFFFFFFF0 to leave it up to J-Link how to implement the breakpoint, leaving it all options.
    Yes, it is that simple and believe me, we have tried to get that into CodeBench.

    So it look like the SEGGER GDB server does not support the read field which is a real bummer.

    We will have a look. Should not be to hard to implement...

    Edit: This looks more complicated than I thought because this file would also need to cover the CPU registers and GDBServer would need to know which CPU register from the file is which in the J-Link DLL.
    Could you please post the XML file you were setting?


    Best regards
    Alex
    Hi Alex,

    Sorry for the late reply I am not getting notifications of posts.


    The File is attached.




    Thank you
    Files
    • target.xml.txt

      (222.77 kB, downloaded 723 times, last: )
  • Hi,

    No, not so far.
    There are currently a lot of other more high-priority things on the ToDo, so there has not been assigned priority to this.
    Sorry for not having better news right now.


    Best regards
    Alex
    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 David,

    Not really. There are a lot of other high-priority project open right now.
    Easiest way would be to ask the guys from Mentor to change this one line of code which does not set the breakpoint type to "any" and thus prevents you from using unlimited flash breakpoints when using ...
    Would be a lot easier than implement this extra stuff for the registers view etc. into GDBServer...


    Best regards
    Alex
    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,

    We have implemented a workaround in the DLL, to be able to use unlimited flash breakpoints also in Mentor CodeBench.
    This is supported for J-Link software version V4.85d and later.
    Download-Link: segger.com/jlink-software-beta-version.html

    How to use the workaround: Please refer to UM08001, chapter "Flash download", section "6.4.3 Mentor Sourcery CodeBench"

    Hope it helps.


    Best regards
    Alex
    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.