Flash Magic Forum

In-System Programming Support => General => Topic started by: FlashMagicUser on May 07, 2019, 02:20:25 AM

Title: Parentheses in path for command-line execution
Post by: FlashMagicUser on May 07, 2019, 02:20:25 AM
Referring to this post: http://forum.flashmagictool.com/index.php?topic=4338.0 (http://forum.flashmagictool.com/index.php?topic=4338.0).

I am using command-line v11.00 but with a path containing "C:\Program Files (x86)\..." I still cannot make the command work.

Is there any way to run this command? Has something been done to improve that?
Title: Re: Parentheses in path for command-line execution
Post by: Andy Ayre on May 07, 2019, 04:03:21 AM
Try double backslashes, \\

Andy
Title: Re: Parentheses in path for command-line execution
Post by: FlashMagicUser on May 07, 2019, 06:30:55 AM
I already tried with
And I always get the same error.


I also just noticed that I get the error:
ERROR: Invalid parameters for HEXFILE directive: HEXFILE(C:\Program
Files
(x86)


But the exit code is 0

It would be great if we could at least catch the error via exit code.
Title: Re: Parentheses in path for command-line execution
Post by: Andy Ayre on May 07, 2019, 06:39:10 AM
Export the command line directives from the GUI version (File menu). That will show you the valid syntax.

Andy
Title: Re: Parentheses in path for command-line execution
Post by: FlashMagicUser on May 07, 2019, 07:08:37 AM
Oh, the irony.
I setup via GUI my desired function and it works fine.
But if I export the command line directives, I see that the string is exactly the same  as the one that gives me the error.
Title: Re: Parentheses in path for command-line execution
Post by: Andy Ayre on May 07, 2019, 07:16:11 AM
Please post the entire HEXFILE directive you are using.

Andy
Title: Re: Parentheses in path for command-line execution
Post by: FlashMagicUser on May 07, 2019, 07:24:30 AM
This is the entire command line directive:
COM(6, 115200)
DEVICE(LPC2368, 4.000000, 0)
HARDWARE(BOOTEXEC, 50, 100)
ERASE(DEVICE, PROTECTISP)
HEXFILE(C:\Program Files (x86)\My Company\My Software\myfile.hex, NOCHECKSUMS, NOFILL, PROTECTISP)


Just to clarify: this is the exact same string I get if I export Command Line Directive from the Flash Magic GUI software.
Just to clarify more: if I use any other path without parentheses (even with spaces, but no parentheses), the command executes fine.
Title: Re: Parentheses in path for command-line execution
Post by: Andy Ayre on May 07, 2019, 07:29:27 AM
Parentheses are not allowed inside path names. Page 57 of the manual lists what is allowed. The V12 command line is all-new and doesn't have this restriction.

Andy
Title: Re: Parentheses in path for command-line execution
Post by: FlashMagicUser on May 07, 2019, 07:47:43 AM
Thank you for your answers.

Is it possible to export the command line directive from GUI V12?