JLink feed back upon reaching a breakpoint

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

  • JLink feed back upon reaching a breakpoint

    Hi,

    SetBP is used to set a break point in my program.

    I want to know whether the PC reaches the break point without polling using a command like 'moe'.

    At the moment i use 'moe' to check whether the target is halted.

    I want to get rid of the polling method and I am wondering whether there is a method to know the break point is hit asynchronously.

    Thanks,
    Ushan
  • Hi Ushan,

    No, currently not.
    The J-Link DLL only performs a minimum of communication with the target during a debug session and usually only requests the IsHalted() state when the debugger tells it to do so.
    Where is the problem with polling via IsHalted()?


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

    In fact, I am using JLinkExe in a Ubuntu machine with a command script.

    A QSPI flash is used in my hardware and the processor manufacturer does not provide a config file that is capable of flashing the QSPIflash via JTAG.
    what I am doing is that I load a small program long with the target binary to the RAM using JLinkExe. Then the RAM program downloads the binaries to the QSPI flash. Once the programming is completed, it stops at a break point.

    In order to know whether it reaches the break point I use 'moe' (mode of entry).

    If there is command like WaitHalt, that waits until the break point is reached, I would be able use it to know whether the flashing is completed. This is necessary to automate the process.

    Thanks,
    Ushan

    The post was edited 1 time, last by Ushan ().

  • Hi Ushan,

    I agree, there should be a command like "WaitHalt", ideally with optional timeout.
    Also J-Link Commander should in non-batch mode instead of just waiting for the key press
    wait for either key-press or halt event.
    This would make it possible/easier to use it as a command line debugger.

    It would be a great addition of value to an otherwise great product.

    Does not sound like a big change, so maybe Alex & team can add this to the next Beta ...?
  • Hi,

    We will add a "WaitHalt" command in one of the next versions.

    Also J-Link Commander should in non-batch mode instead of just waiting for the key press wait for either key-press or halt event.

    I would not say *should*... a matter of taste.
    But there is a larger re-design of the J-Link Commander planned anyhow, so I will add this to the discussion.


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