Shop OBEX P1 Docs P2 Docs Learn Events
Open Propeller Project #7: Programming Propellers from a Chromebook - Page 4 — Parallax Forums

Open Propeller Project #7: Programming Propellers from a Chromebook

124»

Comments

  • prof_brainoprof_braino Posts: 4,313
    edited 2014-10-26 06:45
    I followed Martins suggestion from post 86.

    http://arnoldthebat.co.uk/wordpress/chromium-os/
    http://www.chromium.org/chromium-os/developer-guide#TOC-Getting-to-a-command-prompt-on-Chro
    http://www.chromium.org/chromium-os/quick-start-guide
    http://dev.chromium.org/developers/how-tos/install-depot-tools
    http://www.chromium.org/chromium-os/tips-and-tricks-for-chromium-os-developers#TOC-Making-sudo-a-little-more-permissive

    When I finally bounced back to the chromium-os/quick-start-guide,

    I got to this line
    cros_sdk -- ./build_packages --board=${BOARD}
    

    and got
    cros_sdk: command not found
    

    I can't find any line that load cros_sdk.

    Any hints?
  • prof_brainoprof_braino Posts: 4,313
    edited 2014-10-26 10:41
    I tried heaters suggestion for 87 and 89.

    Chrome insttalled and runs! Whee!

    I don't like that it searches from the address bar, if you put in an erro it tries to go directly to the site right? And then start loading all the malware from whatever site it ends up on? Creepy.

    But at least I'm started.


    So which post in this thread tells us how to load spin from the chrome browser to the prop?
  • Heater.Heater. Posts: 21,230
    edited 2014-10-26 12:14
    I like the way Chrome searches from the address bar. As fas a I know it will not load pages you don't ask for. It will auto-complete URLs as you type them but it is still up to you to hit return.
    So which post in this thread tells us how to load spin from the chrome browser to the prop?
    I don't recall that there is one. Probably because there is no way to do it just yet.

    Attached is msrobots editor17 web IDE for Spin tweaked to work as a Chrome extension. You can try it out as follows.

    1) Unpack it some place. You will get a directory called editor17 full of goodies.

    2) Install it into your Chrome browser by selecting "Tools" tools from the control menu and then "Extensions".

    3) In the resulting extensions tab check the little "developer mode" box.

    4) Click the "load unpacked extensions" button.

    5) In the resulting file navigator select the editor17 directory,

    6 ) Hit the launch button to run it. You will also have an icon for it in the Apps page.


    Now. Sadly pretty much none of editor17 works properly as a chrome app at this moment, apart from the editor itself. I was hoping to find time to have a look at it.

    Even if it all worked as well as it does when served up from a web page it lacks any way to program the Prop apart from sending the binary to the server and having the server do the loading into the Prop.

    What we need is to add serial port loader support. This requires:

    1) Creating a loader program, probably by converting the loader from PropellerIDE into Javascript using the Emscripten compiler.

    2) Integrating that into the app.
  • prof_brainoprof_braino Posts: 4,313
    edited 2014-10-27 09:23
    Excellent, I will try this when I get my chores done.

    "the server" - Can the server be my local machine? Could It be on my linux box in the classroom, or could it be on the chrome book itself? I don't know if a chromebook even has a USB port at this point.
  • Heater.Heater. Posts: 21,230
    edited 2014-10-27 09:43
    Sure the server can be on the local machine or some other machine on your local network. It could be a Raspberry Pi or a 20 dollar WIFI router with OpenWRT installed, for example.

    I have no idea how you would a server running on a Chrome book.

    I don't know if Chrome Books have USB ports either. I just kind of assumed they did.

    I don't recall how msrobots did this exactly but I seem to recall his server was some kind of Propeller based machine with a WIFI adapter or some such.
  • Don MDon M Posts: 1,652
    edited 2014-10-27 10:02
    Yes. Chromebooks have a USB port.

    Here are the specs for the original Chromebooks (CR-48) that Google gave out back in December 2010 http://cr-48.wikispaces.com/Specifications


    Edit: Added specs link
  • prof_brainoprof_braino Posts: 4,313
    edited 2014-10-27 20:08
    My daughter did not let me examine her school chromebook, (she was in a very important text chat with 7 of her class mates about Jenny's new boyfriend Billy), but I did get close enough to find that there are at least two USB on one side.

    Could we use a USB Flashdrive and live boot to plain old Linux?

    Anyway, I starrted collecting the notes on a page on the propforth wiki.

    http://code.google.com/p/propforth/wiki/ChromeBook
  • Heater.Heater. Posts: 21,230
    edited 2014-10-27 21:29
    Sure,

    http://www.itworld.com/article/2831260/open-source-tools/how-to-run-linux-on-a-chromebook.html

    Google has thousands of links to ways to run Linux on a Chrome Book.

    For the purposes of this thread I think the idea is out of scope.
  • KeithEKeithE Posts: 957
    edited 2014-10-27 21:56
    I've heard of people installing crouton and getting everything nicely setup, and then somebody presses the spacebar and wipes out all of their work. Search for "OS verification is OFF Press SPACE to re-enable" and see what you think.

    I was going to install Crouton on a 14" HP Chromebook, but gave up for various reasons. You can get 200 MB of T-mobile a month for free with this one, and it has an x86 processor. It also has a SD slot. They may come out with an ARM version, so beware. People interested in running Linux might want to stick to x86 for compatibility reasons. (Of course the T-Mobile deal holds for any T-mobile compatible laptop/tablet. I just paid $10 to get a SIM for a first generation iPad, and it worked. Not a bad deal depending on how you use it.)

    Anyways the USB works, and as I previously mentioned to Heater it comes with FTDI drivers installed at least on the x86 version. I was able to program a micromite via beagle term, and that would probably work for espruino as well. Unfortunately it has a lot of limitations - e.g. no file transfer via x-term,...
  • ValeTValeT Posts: 308
    edited 2014-11-27 15:56
    Any news on how this is progressing?

    Been almost a month since the last post.
  • Heater.Heater. Posts: 21,230
    edited 2014-11-27 22:05
    It isn't progressing as far as I can tell. I don't recall anyone stepping up to the plate to have a go at this.

    Meanwhile Jazzed has put out his web IDE for C that programs a Propeller via an intermediate server.

    That IDE uses the CodeMirror editor library for which msrobots has a Spin syntax highlighting plugin already.

    It only works with one source file at a time. Which is a great start. We can always make other objects available to use even if they are not editable.

    One could imagine dropping the JS version of OpenSpin into Jazzed's web IDE page so that compilation does not need server support. Like we do for Spine and msrobot's Editor17. Follow the links from my "lab" page to see them working online http://the.linuxd.org/lab/

    That just leaves compiling propeller-load into JS and fixing it up to use the serial port API of a Chrome Book/Chrome Extension.

    I might have a go at that last part at some point. Problem is propeller-load expects a normal synchronous (blocking) read interface to the serial port but JavaScript only provides an asynchronous API. This makes things tricky as you can't just loop round a read call as propeller-load does. The code needs majorly reorganizing there.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-11-28 04:42
    Heater. wrote: »
    It isn't progressing as far as I can tell. I don't recall anyone stepping up to the plate to have a go at this.

    Meanwhile Jazzed has put out his web IDE for C that programs a Propeller via an intermediate server.

    That IDE uses the CodeMirror editor library for which msrobots has a Spin syntax highlighting plugin already.

    It only works with one source file at a time. Which is a great start. We can always make other objects available to use even if they are not editable.

    One could imagine dropping the JS version of OpenSpin into Jazzed's web IDE page so that compilation does not need server support. Like we do for Spine and msrobot's Editor17. Follow the links from my "lab" page to see them working online http://the.linuxd.org/lab/

    That just leaves compiling propeller-load into JS and fixing it up to use the serial port API of a Chrome Book/Chrome Extension.

    I might have a go at that last part at some point. Problem is propeller-load expects a normal synchronous (blocking) read interface to the serial port but JavaScript only provides an asynchronous API. This makes things tricky as you can't just loop round a read call as propeller-load does. The code needs majorly reorganizing there.
    Sounds like it's time to recode the loader as a simple state machine. Shouldn't be too difficult. You don't really need propeller-load. All you really need is the PLoadLib part or the pload program that I wrote a while ago based on Chip's Pascal loader. The rest of propeller-load is mostly there to support the XMM memory models which don't get used much if at all.
  • Martin_HMartin_H Posts: 4,051
    edited 2014-11-28 10:40
    The good news for Parallax is that it doesn't look like their AVR based competition can't do this either. At least that's what I found when I looked around to see if any other MCU's worked on Chromebooks.
  • Heater.Heater. Posts: 21,230
    edited 2014-11-28 10:47
    Martin.

    The AVR guys have the disadvantage that to use their IDE for AVR on a Chrome book they need to get GCC for the AVR working in JavaScript as a Chrome Book App.

    I'm sure that is not easy.

    The Propeller IDE only need the relatively small and simple Spin compiler to work.

    Hey, we have done that already!

    Watch this space.....
Sign In or Register to comment.