Parentheses in path for command-line execution

Started by FlashMagicUser, May 07, 2019, 02:20:25 AM

Previous topic - Next topic

FlashMagicUser

Referring to this post: 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?

Andy Ayre

Embedded Systems Academy, Inc.
support at esacademy dot com

FlashMagicUser

I already tried with

  • Double slashes
  • Quotes around the path
  • Double quotes around the path
  • Replacing spaces with slashes (i.e.: "C:\Program\Files\(x86)\...")
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.

Andy Ayre

Export the command line directives from the GUI version (File menu). That will show you the valid syntax.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

FlashMagicUser

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.

Andy Ayre

Please post the entire HEXFILE directive you are using.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

FlashMagicUser

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.

Andy Ayre

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
Embedded Systems Academy, Inc.
support at esacademy dot com

FlashMagicUser

Thank you for your answers.

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