Shop OBEX P1 Docs P2 Docs Learn Events
Command Line Programing of SX — Parallax Forums

Command Line Programing of SX

wasswass Posts: 151
edited 2011-08-21 17:44 in General Discussion
I'd like to distribute new firmware without having end-users go into the the SX-Key IDE GUI.
So, I'm trying to figure out how to program the SX using the command line of the IDE, but don't know what switches are available. I've looked around but only found this reference that mentions a bug fix for this function:

http://forums.parallax.com/showthread.php?96105-SX-Key-IDE-Beta-v.3.2.7&highlight=command+line%3A

I've only found a few of the command line switches (/r, /1, /2 etc.) is there a document describing all of them?

Thanks,
Katie

Comments

  • wasswass Posts: 151
    edited 2011-07-07 14:08
    It turns out (from PM's with Parallax staff members) that there are no such options to do this in the released code. The notes and bug fixes were for a beta version of the IDE that was never released.

    -Katie
  • PJMontyPJMonty Posts: 983
    edited 2011-08-20 16:26
    Katie,

    Actually, the most recent version of the software on the Parallax site (v 3.3.0) should have full working support for the command line switches. This is a feature I added years ago that never got properly documented because the much discussed "next version of the manual" never got written. I wasn't writing the manual, so don't look at me.

    Anyway, here's the only known documentation on the planet for the command lines switches:

    NOTES ON COMMAND LINES AND SWITCHES:

    Any command line must have any switches first and then be followed by
    the name of the file to load. The order of the switches is unimportant
    as the SXKey parses and executes them in the order necessary to achieve
    the desired goal.

    This new version of the SXKey implements the following CASE SENSITIVE
    switches:

    /b = ByteCraft mode. This is the old method of loading and debugging a

    .COD file. It is present for legacy support ONLY and should NOT be used
    as the new switches provide much more control.

    /r = Treat the loaded file as read only. Not needed for .COD files as

    they are automatically considered read only.

    /d = Use passed file name to program the chip for debugging and then

    start the debugger.

    /da = Assume the passed file is already burned into the chip and just

    start the debugger.

    /p = Use passed file name to program the chip for standalone operation.

    After programming, the SXKey must be removed and any necessary
    external oscillator attached as needed.

    /h = Hide the editor so we only see any programming status boxes as

    needed and the debugging GUI.

    /cd = Debug the command line. Displays a dialog showing what it is going to execute and in what order based on the switches on the command line. When you press "OK" it then executes what was on the dialog.

    So, if you wanted to simply update the program on the SX chip, you would have a command line like this:

    sxkey.exe /p "c:\some file path\ThisSxSourceFile.src"


    If you wanted to do the same thing, but hide the IDE and only display the programming status dialog, you would do this:

    sxkey.exe /p /h "c:\some file path\ThisSxSourceFile.src"

    If you wanted to see how the SX key IDE is interpreting your command line, add a /cd and it will display a dialog that shows how it parsed your command line.

    If you want to run the debugger, use /d or /da instead of /p. Read the notes above for teh difference between /d and /da.

    I recommend not using the /h switch until you know your command line is working.

    Don't forget to surround any path containing spaces with quotes or else the command line parsing will fall apart. This is a function of path parsing, and not specific to the SX-Key IDE.

    Thanks,
    PeterM
  • wasswass Posts: 151
    edited 2011-08-21 17:44
    Peter,

    This is GREAT!

    I will put this to use very soon.

    Thank you so much!!!
    -Katie
Sign In or Register to comment.