[SOLVED] JLinkExe's RSetType stopped working

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

  • [SOLVED] JLinkExe's RSetType stopped working

    It seems after I installed v 6.20i, the JLinkExe's internal command RSetType stopped working.
    E.g. RSetType 1 (or 2, 3, 4 ... )
    will print that the reset type was changed, however , in my script
    if (0 == MAIN_ResetType){

    always evaluates to true.

    The RSetType and my script used to work in version(s) before 6.20i
  • Hi,

    Thank you for your inquiry.
    Such an issue is not known to us.
    Did you try the latest J-Link software version?
    Does that solve the issue?

    What target device are you using and what are the exact reproduction steps?

    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.
  • I just tried latest version, and no the issue is there. (JLink_V622c)


    JLinkExe -device Cortex-M4 -autoconnect 1 -if JTAG -speed 4000 -JTAGConf -1,-1 -JLinkScriptFile my_NXP_iMX7D_Connect_CortexM4.JLinkScript




    the my_xx script is Segger's script with this addition:




    Source Code

    1. void ResetTarget(void) { // In case cores 1-3 are reset, we do nothing, // as we would lose connection to these cores, when resetting the device // as a reset disables the clock to them. Report(" ***** Custom ResetTarget called *****" ); Report("" ); if (0 == MAIN_ResetType){ Report(" Performing customized ResetType 0 *** " ); } else if (1 == MAIN_ResetType) { Report(" Performing customized ResetType 1 *** " ); } else { Report1(" WARNING: will NOT do any resets at all for ResetType = ", MAIN_ResetType); }}





    In JLinkExe, do 'r'


    See trace


    " .... Performing customized ResetType 0 "


    In JLinkExe, do 'RSetType 1"
    do 'r'


    Observe again same trace, while should be ResetType 1 (MAIN_ResetType should be different)
  • Hi,

    The issue was reproducible with your sample.
    The statement: if (0 == MAIN_ResetType) can't be parsed correctly. Instead use MAIN_ResetType == 0.
    Then everything should be working as expected.
    We discuss internally if the parser will be expanded to support that order as well.

    The RSetType and my script used to work in version(s) before 6.20i

    Could you specify with what version it worked how you posted it?
    Because the script file parser has not been changed for quite some time.

    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.
  • SEGGER - Nino wrote:

    Hi,

    The issue was reproducible with your sample.
    The statement: if (0 == MAIN_ResetType) can't be parsed correctly. Instead use MAIN_ResetType == 0.
    Then everything should be working as expected.
    We discuss internally if the parser will be expanded to support that order as well.

    The RSetType and my script used to work in version(s) before 6.20i

    Could you specify with what version it worked how you posted it?
    Because the script file parser has not been changed for quite some time.

    Best regards,
    Nino
    Hi,

    Thank you for help, I will test the fix asap.
    Could you specify with what version it worked how you posted it?
    Not straight away. If you certain that never could have worked, I won't waste time.


    Otherwise I need to find from which version I've used before, and then downgrade, and then retest ... Sorry as I don't follow every Segger release unfortunately.

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