Shop OBEX P1 Docs P2 Docs Learn Events
Stampw.exe and Command Line Execution — Parallax Forums

Stampw.exe and Command Line Execution

AvilinAvilin Posts: 2
edited 2008-11-13 02:25 in BASIC Stamp
Ok So I understand that you can use Stampw.exe to tokenize source code and then download it to the the basic stamp ala USB cable. But can you then use it to execute this command on the stamp?

Is this what the /PIPE flag is for? Nothing in any of the documentation seems to indicate that you can execute downloaded files from a command line interface. Does anyone know how to do this. It seems like there *was* a Linux application that let you do this, is there something like the bstamp_run for Windows?

I'd really like to have an program that loads the up different Basic Stamp applications and runs them while the USB cable is connected to my "Board of Education". Am I over thinking this?

Thanks in advance for your help!

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2008-11-07 14:13
    As soon as a program is downloaded into the BS2 it executes. And every time you toggle the DTR line (ATN line) the program resets and begins to execute again.

    I think you can use the "compile to downloadable code" option to create several applications that reside on the PC that can be downloaded on-the-fly to the BS2 from Perl or a batch file that "shells" out a PC executable.
  • Carl HayesCarl Hayes Posts: 841
    edited 2008-11-07 14:19
    Forgive me -- the question is a little difficult to understand. Once the tokenized code has been downloaded to the Stamp, it executes, and it stays there. You can execute it again by powering the Stamp on, or by resetting the Stamp. What exactly is it that you want to do from the command line?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-11-07 14:53
    Just tried this. In the IDE, select File, "Generate object code". This brings up a dialog, where you can select "Object Code and Stamp Loader".

    This creates the program "stamploader.exe", and a .obj version of your file.

    Now, from your PC program, you can 'shell' a command line:
    stamploader myfile.obj /NoInfo /COM3

    This will download your compiled "myfile.bs2" program "myfile.obj" into the BS2 attached at COM3, and start the BS2 code executing.

    I'm not sure what the "/Pipe" option does on this one.
  • AvilinAvilin Posts: 2
    edited 2008-11-13 02:25
    I think Carl answered my question, here.
    Carl Hayes said...
    Once the tokenized code has been downloaded to the Stamp, it executes...

    I was asking originally if the code executes ON the basic stamp once it is put there. The answer is "Yes". However this was not immediately apparent from the documentation (to me). After playing around with it some this weekend, I did find this to be the case. Seems like I was over-thinking it a bit this weekend. Thanks a ton!
Sign In or Register to comment.