Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Tool v1.1 — Parallax Forums

Propeller Tool v1.1

Jeff MartinJeff Martin Posts: 760
edited 2008-04-01 23:00 in Propeller 1
Today we are releasing Propeller Tool v1.1.·

Its serial routines have been "nearly" completely rewritten in order to increase its reliability on systems suffering from too much CPU load.

YES!· For those wondering, this version should get rid of the "Propeller lost on COMx" error when downloading from certain computers under certain load.

In our tests on a number of computers (single-, dual-, and quad-core processors) that were intentionally put at 100% CPU load, it is nearly always able to download a complete Propeller Application to the Propeller Chip!

In addition, some extra work was done to·alleviate a Propeller Tool lock-up when accessing certain ports that are misbehaving, misconfigured, or otherwise not compatible with the Propeller Tool download protocol.· So far, with known problematic devices, we have not been able to get the tool to lock-up when accessing these ports (like the Lynksys USBBT100 Bluetooth adapter's virtual COM ports).

Also, all the included library files have been updated to include the Propeller Object Exchange's MIT License and the License.spin file has been added to the library for a convenient template for those of you wishing to post and/or update your objects to the exchange.

The download for Propeller Tool v1.1 is·available at:

http://www.parallax.com/tabid/442/Default.aspx

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Jeff Martin

· Sr. Software Engineer
· Parallax, Inc.

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-03-26 19:35
    Jeff,

    What spectacular timing! I ran into the "lost on COMx" for the first time last week. I've got a program running 24/7 that's a 99% CPU hog and have been having to shift it to low priority during the day just to get any work done. When the error occurred, I thought, "Well, the upload timing is pretty tight, so that's to be expected." I didn't really consider it a shortcoming of the IDE but, rather, of my computer; nor did I have an inkling it was even on your radar.

    Thanks for the new version! I'll give it the acid test. smile.gif

    BTW, how did you pull it off? Do you have a way of boosting the IDE's task priority temporarily?

    -Phil
  • Jeff MartinJeff Martin Posts: 760
    edited 2008-03-26 20:10
    Hi Phil,

    It's been a source of headache for a quite a few users and I've been exploring ways to solve it for a while.· Even on some systems that don't "appear" burdened, the old software would fail to download many times.· It seems certain apps (like MS Outlook and WinAmp) tend to cause the Propeller Tool to be partially CPU staved.



    How did I pull it off?

    I tried boosting task priority, to no avail.· I tried a few other solutions as well, no luck.· In the end, the solution took about three major changes in the way the tool handles the application image and download protocol.

    The main problem is that the v1.06 (and previous) software uses just one thread to process everything.· So when communication is occurring, it's possible for Windows to send messages to the thread for things like repainting the screen, resizing the window, and many, many other possibilities, all of which it tries to handle as quickly as possible, but, in doing so, would sometimes not get enough CPU time to keep up with the data it was trying to transmit... so the Propeller chip would actually time-out.

    The solution in v1.1 is as follows:
    • The entire application image to be downloaded (11 bytes per long) is generated in a buffer all at once (instead of on the fly).· This way, large chunks of the transmission are initiated and completed with a single WriteFile API call (ie: transmit this "entire" buffer of data),
    • The ReadFile and WriteFile API calls now use OverlappedIO mode (instead of synchronous "blocking" mode) with WaitForEvent calls to put the process to sleep while the kernal busily transmits the data,
    • A separate thread is launched (when it's time to communicate) that handles every aspect·of the communication.· This thread is completely unencumbered by any Windows messages, thus, it can focus on it's very timing-critical task.· In addition, it uses APC (Asynchronous Procedure Calls) to a global routine to effectively queue up integer-based status messages that the main GUI thread looks for in order to update the Progress window with the current status.

    So, the end result is like having two people working side-by-side; one focused on dealing with Windows GUI messages and updating the Progress window, and the other focused on communication with the Propeller chip... and between them is a scratch pad that the communication guy occasionally scribbles status notes on, and the GUI guy monitors to determine where in the communication process the application currently is.

    Very much like the principle of the Propeller chip itself! (except multi-tasking (Windows/PC), instead of true multi-processing (Propeller chip)).


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Jeff Martin

    · Sr. Software Engineer
    · Parallax, Inc.

    Post Edited (Jeff Martin (Parallax)) : 3/26/2008 8:55:51 PM GMT
  • RaymanRayman Posts: 14,768
    edited 2008-03-26 20:19
    Yeah!
  • Jeff MartinJeff Martin Posts: 760
    edited 2008-03-26 20:50
    Rayman... I was hoping you'd see this posting soon. [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Jeff Martin

    · Sr. Software Engineer
    · Parallax, Inc.
  • jazzedjazzed Posts: 11,803
    edited 2008-03-26 21:33
    Thanks for your effort to fix this horrible problem.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    jazzed·... about·living in·http://en.wikipedia.org/wiki/Silicon_Valley

    Traffic is slow at times, but Parallax orders·always get here fast 8)
  • Chuck RiceChuck Rice Posts: 210
    edited 2008-03-26 21:50
    Well, it did not fix it for me. Running Windows XP under Parallels on a Intel Core Duo Powerbook Pro (MacOSV10.5.2) If I disconnect the USB, then reconnect it. the first try always works. The second time I try, it says that it cannot find the propeller on com1 or com12 (it is on com12). If I unplug the USB and replug it, I am good for one more load.

    It is a horrible problem.

    If I switch to using the python loader (Loader.py) it works every time. -Chuck-
  • RaymanRayman Posts: 14,768
    edited 2008-03-26 22:02
    I just tried it on my computer that has problems and it worked 3 for 3 times. But, it did give a "No Prop chip found" error a couple times. But, I think that's because the program being loaded is using pins 30&31 for serial comms.(?) But, it always worked the second time and loaded completely. So, I think this is a vast improvement. I used to to take 3 or 4 tries before it would load successfully.
  • jazzedjazzed Posts: 11,803
    edited 2008-03-26 22:21
    My biggest headache was not being able to do other things like switch windows,
    watch flash video, open a web-browser, etc... during download.

    This all works fine for me now
    XP SP2 single core 3.4GHz with Windows LiveOneCare.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    jazzed·... about·living in·http://en.wikipedia.org/wiki/Silicon_Valley

    Traffic is slow at times, but Parallax orders·always get here fast 8)
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-03-26 22:41
    Timely! I'm setting up a somewhat dated laptop for propeller use today.

    There's dancing on workshop desks over here!

    OBC

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

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • hinvhinv Posts: 1,255
    edited 2008-03-26 22:52
    Wow, that is great. Now maybe I will try it under wine. I have heard so many problems before that that I didn't even try.
    I have a notebook that has WinXPpro on it that I haven't booted into windows for months, but it is accessible under /windows/c. If someone is using wine, and could help me through it, or point me to a better thread for this(I know it has been covered before), I would appreciate it.

    Thanks,
    Doug
  • dnaddordnaddor Posts: 26
    edited 2008-03-27 01:47
    Big thumbs up for 1.1!

    I run Windows XP under VirtualBox under Mepis Linux. The larger the program, the more tries I used to need to get it loaded. It now works flawlessly.

    I was surprised that "occurances" is still spelled wrong (when you use Replace All). I know we engineers aren't supposed to be able to spell, and I guess no one pointed it out.
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-03-27 01:54
    dnaddor said...
    I know we engineers aren't supposed to be able to spell, and I guess no one pointed it out.

    That's why engineers invented spell checkerssmile.gif. Its just a pity that they don't know to do spell checking in various IDEs...

    For interested people. It runs under crossover on a mac but its still not detecting the serial ports though. I'll have to try with the ftdi drivers installed later. The line numbers and hex dump still don't work properly and the object tree view in the side bar sometimes doesn't work without hiding and unhiding the side bar. Still useable though.
  • Jeff MartinJeff Martin Posts: 760
    edited 2008-03-27 02:16
    jazzed said...
    My biggest headache was not being able to do other things like switch windows,
    watch flash video, open a web-browser, etc... during download.

    This all works fine for me now
    XP SP2 single core 3.4GHz with Windows LiveOneCare.

    That was the common situation I heard of and I figured this would solve that situation totally (but only user trial on the myriad of machines out there will tell).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Jeff Martin

    · Sr. Software Engineer
    · Parallax, Inc.
  • SapiehaSapieha Posts: 2,964
    edited 2008-03-27 04:17
    Hi Jeff.

    I run 3 props simultaneity and have fine suport with prop tool 1.06 Manual Com Ports seting.

    Why it is not on Prop Tool 1.1 ????????????????

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.

    Sapieha

    Post Edited (Sapieha) : 3/27/2008 4:24:48 AM GMT
  • JavalinJavalin Posts: 892
    edited 2008-03-27 08:56
    Cool stuff - thanks Jeff!
  • BaggersBaggers Posts: 3,019
    edited 2008-03-27 09:25
    Thanks Jeff, works a treat [noparse]:)[/noparse]
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-03-27 11:11
    Wiki page for the Propeller tool has been upgraded. It is here propeller.wikispaces.com/Prop+Tool
  • steve_bsteve_b Posts: 1,563
    edited 2008-03-27 15:58
    I'm slowly moving in to the propellor forum (been lurking for the past year!).

    A small gripe only semi-related to this post....is there an option to post the date on new software on the parallax website? (it's much easier to see that something came out last week as opposed to loading an IDE to see what version it is....sorry if this results in a hijacked thread!)

    cheers

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <FONT>Steve



    What's the best thing to do in a lightning storm? "take a one iron out the bag and hold it straight up above your head, even God cant hit a one iron!"
    Lee Travino after the second time being hit by lightning!
  • hippyhippy Posts: 1,981
    edited 2008-03-27 17:03
    Sapieha said...
    I run 3 props simultaneity and have fine suport with prop tool 1.06 Manual Com Ports seting.

    Why it is not on Prop Tool 1.1 ????????????????

    Is it not the options under Edit, Preferences, Operation(tab), Edit Ports (button) ?
  • SapiehaSapieha Posts: 2,964
    edited 2008-03-27 19:18
    Hi Jeff and hippy.

    Sorry my miss.
    I don know why I wanted it on F7 funktion?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.

    Sapieha
  • JavalinJavalin Posts: 892
    edited 2008-04-01 13:13
    Jeff,

    A minor one or two·for you - whilst running 1.1.

    Got the attached messages when after opening a read-only file, then closing without saving. Attached. Seems to be (I guess) because there is no "document" window open.

    The "List index is out of bounds (-1)" is when you press ALT or try to exit

    The "Access voilation" seems quite common.....· A thread shutdown perhaps?
    The IDE had to have its process killed to exit.

    Cheers,

    James

    Post Edited (Javalin) : 4/1/2008 1:20:46 PM GMT
    1280 x 1024 - 87K
    1280 x 1024 - 92K
  • QuattroRS4QuattroRS4 Posts: 916
    edited 2008-04-01 14:07
    Javelin,
    I can confirm similar .. read the attached link ... http://forums.parallax.com/showthread.php?p=718969
    I didn't get much feedback though .. perhaps I posted to the wrong thread..

    Regards,
    John

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Necessity is the mother of invention'
  • JavalinJavalin Posts: 892
    edited 2008-04-01 15:41
    Well maybe Jeff will see this one!

    James
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-04-01 23:00
    QuattroRS4 said...
    Javelin,
    I can confirm similar .. read the attached link ... http://forums.parallax.com/showthread.php?p=718969
    I didn't get much feedback though .. perhaps I posted to the wrong thread..

    Regards,
    John

    I alerted Jeff to the feedback yesterday.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
Sign In or Register to comment.