[SOLVED] Can I use J-Link Scriptfiles with J-Flash?

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

  • [SOLVED] Can I use J-Link Scriptfiles with J-Flash?

    I read how to use Scriptfiles with J-Link, but can they be used with J-Flash? I don't find anything in J-Flash docs. In particular, when running "Start Application" from J-Flash pulldown menus, in logfile there are a sequence of events that occur, one of which is (J-Link defined) Scriptfile fn afterResetTarget() is called. I am assuming this fn may live in a DLL or J-Flash .exe.


    After poking around, I see one possibility, but is not working for us.

    In J-Flash project file, there are two fields:

    - UseScriptFile = 0
    - ScriptFile = ""

    I changed the fields to:

    - UseScriptFile = 1
    - ScriptFile = "<path>\afterResetTarget.txt"

    My afterResetTarget.txt file just introduces a delay:

    void afterResetTarget(void) {

    Report("Introduce 5 Sec delay after Soft Reset");
    JLINK_SYS_Sleep(5000);
    }

    The delay does not occur when afterResetTarget() is displayed in J-Flash logfile output while executing "Start Application".

    Thinking was these two parameters must exist in J-Flash project file for a reason. In all examples included with J-Flash, I have not seen the two params being used.

    I saw a 2nd method of using scriptfiles where "-scriptfile <filename>" was used as a parameter when invoking GDB server. This must be used when debugging via gdb cmd line?


    Lastly, where (what tool) are Scriptfiles typically used? Is it with Segger Embedded Studio IDE? Somewhere else?

    thanks,

    Dan

    The post was edited 2 times, last by Dan Phillips ().

  • Hi Dan,

    Instead of hacking around in the J-Flash project file in a text editor (which can easily brick your project),
    you could have simply used the GUI to activate the J-Link script file usage...


    Dan Phillips wrote:


    Lastly, where (what tool) are Scriptfiles typically used? Is it with Segger Embedded Studio IDE? Somewhere else?
    It has nothing to do with the IDE etc. directly.
    They exist to allow customers to add support new devices on their own, in case they need custom connect sequences, custom reset sequences, ...
    wiki.segger.com/J-Link_script_files
    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.