Flash Magic Forum

In-System Programming Support => LPC2xxx => Topic started by: Torben W. Hansen on May 12, 2010, 04:52:47 AM

Title: Command line version FM.EXE and JIT-module
Post by: Torben W. Hansen on May 12, 2010, 04:52:47 AM
Hi

The GUI-version of Flash Magic supports JIT-modules specified in the menu: Option->Advanced Options->Just In Time Code tab. Here one can type in the JIT-Module path and Options.

How can JIT-modules be called when using the command line version (FM.EXE) of Flash Magic ?

With thanks in forward...
Kind regards
Torben W. Hansen



Title: Re: Command line version FM.EXE and JIT-module
Post by: Andy Ayre on May 12, 2010, 08:47:32 AM
The command line interface doesn't have direct support for JIT modules. Instead you could run your JIT module in a batch file then run FM.EXE a second time using the HEXFILE directive again to program the output of the JIT module.

Andy
Title: Re: Command line version FM.EXE and JIT-module
Post by: Torben W. Hansen on May 12, 2010, 12:24:53 PM
Dear Andy,

Thanks for your fast reply.

Probably you remember I modified the Simple Serial Number JIT-module example to work with LPC2378 in february 2009. This JIT example is working with the Flash Magic GUI version.

As I understand you recommend to make a batch job using FM.EXE twice, downloading in two steps - first the application and second the data produced by the JIT-module.

In this case I have rewrite the JIT-module to a stand-alone version right ?

Kind regards
Torben W. Hansen



Title: Re: Command line version FM.EXE and JIT-module
Post by: Andy Ayre on May 12, 2010, 12:27:17 PM
No. The JIT module already is a standalone executable. You should be able to run it on the command line as that is essentially what Flash Magic does.

Andy
Title: Re: Command line version FM.EXE and JIT-module
Post by: Torben W. Hansen on May 12, 2010, 12:44:56 PM
Yes the JIT module is a standalone excuteable, but what about the interface below:

  FILE *commandfile;
  FILE *datafile;
  FILE *userfile;
  char datafilepath[2000];
  char userfilepath[2000];

Do you mean that I could make commandfile with a text editor and call the JIT module with the commandfilepath ?

Kind regards
Torben W. Hansen
Title: Re: Command line version FM.EXE and JIT-module
Post by: Andy Ayre on May 12, 2010, 01:02:58 PM
Details of how to call a JIT module from the command line, include the format of the command file is described in section 7.5 of the Flash Magic manual.
Title: Re: Command line version FM.EXE and JIT-module
Post by: Torben W. Hansen on May 12, 2010, 03:46:37 PM
OK - and thanks for your assistance.

As far as I remember the JIT-module expects the commandfile in the specified format.
I guess I have to go back and re-study the project.

Kind regards
Torben W. Hansen