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