Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Remote Compiler v1 *released* — Parallax Forums

Propeller Remote Compiler v1 *released*

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2009-06-06 04:45 in Propeller 1
Propeller Remote Compiler:
==================

Many thanks to the following people: BradC, Harrison, Mpark

If you are crazy enough to try this, here are the full instructions:

You will need:

* Propeller connected with SD, ENC28J60, TV, and keyboard.
(PropDOS is recommended for this project)

* A Windows PC running the usbWebserver which can be downloaded from:
USBwebserver (freeware)
www.usbwebserver.nl/ -*- translated

Grab the attached "webserver_addons.zip" file and overwrite the Root folder
of the webserver software with those file. This will properly configure the server.

Download both "remote_compiler" and "ed" from this thread. Make the required
changed for your configuration and compile them to "compiler.bin" and "ed.bin"
Copy both of these file to your SD card.

{Special note: If your webserver is running on the same network as your propeller,
you might need to change the gateway setting in "remote_compiler.spin" to
something that doesn't actually exist. In my case 192.168.0.0}


Once you have all the files in place, activate the web server. Double check
that it is answering with your PC browser.

Launch "ED" from propDOS and type some spin code!

Press [noparse][[/noparse]F1] from ED to launch the compiler. Once finished it will reboot and
you should have a new binary file on your SD.

This should keep everyone busy for now.
{I'm working on a public server & a bunch of new features.}

I'll save the rest for display at UPEW.

OBC

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?

Visit the: The Propeller Pages @ Warranty Void.

Post Edited (Oldbitcollector) : 5/27/2009 2:15:29 AM GMT
«13

Comments

  • heaterheater Posts: 3,370
    edited 2009-05-20 13:28
    OK. Interesting experiment.

    What's the point of YMODEM/XMODEM ? Telent is using TCP/IP which makes all the error checking and retries etc for you. The only issue is getting a binary reply back through the telnet session. Could you not just return the compiled file as Intel HEX or even just the output of hexdump? The Prop end can easily convert that to bin.

    Where does the source code come from. Is this integrated into PropDos and/or PrEditor?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-05-20 14:05
    Actually the error checking may be required. The simplified "telnet" connection is simply PERL running as a text server. I already have that part working. I'll intergrate this as a PropDOS application with the idea of being able to start the returned binary.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-05-20 14:19
    I like it. MIKEY LIKES IT!

    Seriously, I appreciate all of your work, OBC. This is a community project and there is no room for egos, especially mine yeah.gif .

    I have a spare unassembled Ybox kit laying around. Can I send it to you? You can do anything you want with it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH

    Post Edited (James Michael Huselton) : 5/20/2009 2:26:40 PM GMT
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-05-20 14:31
    @James: PM'd you. Yes that will help! Thanks.
    I was looking at ordering one.


    Really, most of the pieces are already in place. I was testing BSTC last night for the backend compile. It should work perfectly. All I need to do is alter "Coggyterm" a bit and glue it together with some PERL.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • Harrison.Harrison. Posts: 484
    edited 2009-05-20 14:38
    Why not just use HTTP for both uploading and downloading? You can easily upload files using HTTP POST and download them via HTTP GET, which saves a bunch of time since you don't have to develop your own application transport protocols.

    I can post more info later today if you're interested.

    EDIT: You might want to update to the latest TCP stack posted on my website: harrisonpham.com/dp/proptcp. There have been numerous bug fixes that should make it much more stable now.
  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-05-20 15:13
    Harrison, I was thinking the same thing.

    This is a project that requires taking a step back and seeing the whole picture.. The whole thing is really quite simple if we don't impose restrictions based on Propeller-centric concepts. The Propeller isn't the whole world.

    Also, I don't see this as taking up time better spent on Propeller programming. We tend to focus on the chip to the exclusion of everything else.
    I tend to take the larger view. This is a healthy exercise in shaking up the status quo. If the experiment fails, we still have the experince gained.
    Also, I approach this as a hobby and hobbies are supposed to be fun.

    As I mentioned in the original thread, we need to lighten up wink.gif .

    P.S. Harrison, I just checked your site. I wasn't aware of your progress before. Thanks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH

    Post Edited (James Michael Huselton) : 5/20/2009 3:50:15 PM GMT
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-05-20 17:42
    Harrison. said...
    Why not just use HTTP for both uploading and downloading? You can easily upload files using HTTP POST and download them via HTTP GET, which saves a bunch of time since you don't have to develop your own application transport protocols.

    I can post more info later today if you're interested.

    @Harrison:
    Yes, I agree. This would make the application something almost anyone
    could run on a standard web account instead of the serious server adjustments
    have made to security and the like.

    I'll start looking at your latest code base tonight. If you have some code
    which narrows down the POST and GET I'd appreciate it.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-05-21 02:31
    Just an update:

    I've been fiddling with the PC side of the problem tonight...
    I think I've got it worked out.

    1.. Use POST to send the file to the server (as per Harrison's suggestion)
    2.. Use POST to activate a Windows .BAT file containing the BSTC compile line.
    3.. Use GET to retrieve the file (as per Harrison's suggestion)

    I've got step two working perfectly. It's extremely ugly, because it's something
    that is not meant to happen, but it works and I can ignore the resulting output text.

    Tomorrow I'll break out the PropNIC and see if I can start tying it together.
    You'll be able to install a simple copy of a portable web server on your favorite PC
    and compile from the Propeller at will.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-05-21 02:56
    See how easy that was?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-05-21 02:57
    It aint done yet.. [noparse]:)[/noparse]

    I've got Harrison fishing out some GET/POST stuff. [noparse]:)[/noparse]

    Then I've got a little more work to do on the PC side. Done.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.

    Post Edited (Oldbitcollector) : 5/21/2009 3:29:49 AM GMT
  • BradCBradC Posts: 2,601
    edited 2009-05-21 03:05
    If its just PERL and bstc and a few bits of glue, I'll host it if you like.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "VOOM"?!? Mate, this bird wouldn't "voom" if you put four million volts through it! 'E's bleedin' demised!
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-05-21 03:29
    No need.

    It's a portable webserver, you could copy the thing to any windows box. (22MB)
    The upload script is a simple PHP script. If someone wants access to it,
    I'll open a hole in my firewall and "port forward" to it once it's stable.

    Edit
    Here's the package I'm using. USBwebserver (freeware)
    www.usbwebserver.nl/ -*- translated
    I'm using it's PHP and Apache server. (Don't worry there's an English switch) [noparse]:)[/noparse]

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.

    Post Edited (Oldbitcollector) : 5/21/2009 4:10:17 AM GMT
  • jazzedjazzed Posts: 11,803
    edited 2009-05-21 04:16
    Ain't PHP so cool [noparse]:)[/noparse] Makes lot's of things easy ... especially network send/receive. And it's very C like [noparse]:)[/noparse] <gulp/>

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-05-21 04:20
    Never did any PHP until tonight.

    The PHP upload script was so stink'n easy that I can't believe I ever bothered with PERL.

    I suspect I may have some basic upload/compile by the weekend. <fingers crossed>

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • jazzedjazzed Posts: 11,803
    edited 2009-05-21 05:09
    Have you met "system" and "exec" yet ?

    Make sure the program to run privledges are set to read only+execute and use escapeshellcmd for starting your program.
    Read escapeshellcmd at php.net to undestand some security implications of using system, etc...

    PHP's web page is a great reference: http://www.php.net/

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-05-21 05:52
    The way I envisioned it, this is the first baby step. Recoding to expose true SOAP API is more complicated. However, this is a Propeller community project. We can take this as far as we want.

    I am going to take steps 2, 3 .. (as yet undefined). I'll publish the code and results.
    But as far as I am concerned, mission accomplished. I just wanted to share this idea.

    OBC, you did a truly blazing job of getting the first step up and running. Thank you.
    You still want the YBox2 kit, right?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH

    Post Edited (James Michael Huselton) : 5/21/2009 6:00:06 AM GMT
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-05-21 12:24
    @jazzed: nice! There are PERL equivalents, but yes these will be used.

    @James: Yes, I'll still take you up on it. There is still work to be done on the Propeller side. Harrison is also working on some code in this direction. The Propeller side should use the SD routines for file storage making it compatible with PropDOS/PropCMD.

    Since you and Harrison have 1 & 3, I'm going to take a second look at Mparks ED program and glue Baggers' text driver to it.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.

    Post Edited (Oldbitcollector) : 5/21/2009 1:32:33 PM GMT
  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-05-21 14:20
    I am researching AJAX or SOAP based code editors and other utilities. Tools for purchase exist (such as tryit.adobe.com/us/cs4/contribute/?sdid=DVDPC, but I want code that we as a community can support. Since this concept seems to be attracting more support daily, this research effort seems justified to me.

    Transforming a stand-alone program from Spin or PC to AJAX or SOAP will be contigent on the authors' degree of component independence and programming techniques. Feel free to jump in if you have an editor and other tools (like GEAR, PASD, etc.) that you want to transform this way.
    I am available to answer architectural questions on how to go about this and estimates of difficulty. But, as you have seen, the concept is quite simple.

    And I won't use the "cloud" terminology again if you seem to have a hair-trigger emotional reaction to this yeah.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH
  • jazzedjazzed Posts: 11,803
    edited 2009-05-21 19:13
    An editor that allows shared editor interaction and Spin compiling would be cool.

    Also, is tftpboot possible using a dynamic ip address?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-05-21 22:10
    Attached is a copy of Michael Parks' ED program with Baggers' Half-Height font added.
    (I've switched to this text driver for the time being until PAL support can be added to AiGeneric)

    Edit: new version uploaded to top thread.. revisions will be posted there.

    I've left the ability to SPIN a binary by using [noparse][[/noparse]F1] from the editor for use with the
    code which will transmit data to the remote compiler. Desktop is saved as desktop.tmp

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.

    Post Edited (Oldbitcollector) : 5/26/2009 5:13:22 AM GMT
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2009-05-21 23:27
    I was thinking about a web based IDE last summer but didn't get too far because I was just starting to use Delphi for PHP and version 1.0 had it's problems. It's a PHP based rich text box with load capabilities.
    What I had at the time was very basic but fun at the time. Attached is two screen shots. smilewinkgrin.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Aka: CosmicBob
    770 x 627 - 64K
    1680 x 1050 - 155K
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-05-22 08:32
    Wow - I take 2 weeks off and I come back to find remote compiling - Congratulations smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-05-22 14:00
    @Cluso99:

    It isn't up yet, but all the pieces are there.
    Harrison is still making some refinements to his TCP/IP stuff.
    A little glue here and there and I think we'll have it.

    With such capable netbooks available it's a silly desire to
    write and compile code with a simple text editor on the
    Propeller. *yet* [noparse]:)[/noparse] What is wrong with us? <SMIRK>

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-05-22 14:23
    I just don't know, OBC, I just don't know... rolleyes.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH
  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-05-23 03:57
    OBC, Labor Day Weekend is not a great time for relying on the US Mail.
    Let me know if you received the PC board. I found some ENC28J60 parts from another project, including the magnetics and other sexy bits.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-05-23 04:10
    OBC & JMH: It is just because we can, not because we have to and not because we have to do it commercially. Therein lies the fun smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-05-23 04:12
    Cluso99, what are you talking about?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH
  • RossHRossH Posts: 5,512
    edited 2009-05-23 06:37
    JMH,

    Cluso was responding partly to you - but mostly to OBC - wondering what was wrong with us that we seem so willing to spend so many hours on projects that - at least to others - probably seem rather pointless and silly.

    Does the world really need a web-enabled Propeller? Of course not.

    Does the world really need the ability to develop software for the propeller on the propeller? Of course not.

    We do it because (a) we can, (b) we have the time, and (c) we enjoy doing it.

    Ross.

    P.S. Have you realized that both Cluso and yourself are really after the same thing (i.e. a self-hosted propeller development environment)? You are just taking different approaches.

    P.P.S. Does the world really need another C compiler for the Propeller? Absolutely! smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-05-23 06:42
    Oh.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH
  • Harrison.Harrison. Posts: 484
    edited 2009-05-23 17:48
    I've pretty much finished the http client routines. I spent last night implementing chunked encoding for POSTs so that you can add any number of files you want to a single HTTP request. I'll post the code and examples later today after I've had a chance to test it more.
Sign In or Register to comment.