Author Topic: Command line version FM.EXE and JIT-module  (Read 6940 times)

Torben W. Hansen

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Command line version FM.EXE and JIT-module
« 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




Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2156
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Command line version FM.EXE and JIT-module
« Reply #1 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
Embedded Systems Academy, Inc.
support at esacademy dot com

Torben W. Hansen

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Command line version FM.EXE and JIT-module
« Reply #2 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




Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2156
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Command line version FM.EXE and JIT-module
« Reply #3 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
Embedded Systems Academy, Inc.
support at esacademy dot com

Torben W. Hansen

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Command line version FM.EXE and JIT-module
« Reply #4 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

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2156
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Command line version FM.EXE and JIT-module
« Reply #5 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.
Embedded Systems Academy, Inc.
support at esacademy dot com

Torben W. Hansen

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Command line version FM.EXE and JIT-module
« Reply #6 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