Shop OBEX P1 Docs P2 Docs Learn Events
Generated object code loader can't find Stamp. — Parallax Forums

Generated object code loader can't find Stamp.

Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
edited 2007-09-19 20:33 in BASIC Stamp
I've got a problem with a standalone object code loader generated under the Editor v.2.3.1 for a BS2pe v1.5. Although the editor can upload programs to this Stamp, the standalone executable generated by File->Generate Object Code->Single Executable cannot find the Stamp, even though it recognizes both the Loopback and Echo on the port. Has the standalone loader code been upgraded to handle the v.1.5 BS2pe?

Thanks,
Phil

Comments

  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-09-18 19:58
    Hi Phil,

    I'm not sure about the BS2pe1.5 and editor v.2.3.1 specifically, but I think the problem may go deeper and further back than that. It is something I've been meaning to look into and take up with Jeff. I use the loader generator quite a bit for far away program updates, and people have been complaining that the loader doesn't work except as a workaround on one or two computers when we generate the loader in a particular way.

    Here is an observation. Create loader on an old Fujitsu running WIN98 and having a real serial port. The loader works fine for programming a BS2pe of either version 1.3 or 1.1 or the Stache. What is more, I can take that loader to a new Toshiba running XP and that has a USB-keyspan pda adapter serial port. The loader created on the Fujitsu will program both chips and the Stache just fine. But now, if I take the source code and create the loader on the new Toshiba, that loader will program neither the two BS2pe revisions nor the Stache. Same source code, same USB-keyspan adapter. The Stamp IDE itself has no problem, as you observed. Now, I take that loader created on that new Toshiba back to the old Fujitsu, and, what do you know, it works fine to program both chips and the Stache. Go figure.

    So the upshot is that I have been creating all my loaders on the old Fujitsu and asking my customers to keep around an old PC, because some of them are also having USB-adapter problems (that is a different issue!). The point is weirdness, that the loader created on the old Fujitsu behaves differently than the one created on the new Toshiba.

    I don't have a BS2pe rev 1.5 to try, but my guess is that is not the issue. Do you have an older one you could try? (Note to readers: Phil and I have special numbered OEM versions of the BS2pe that have the brownout set at 2.6 instead of 4.2 volts.) I do have a rev 1.6 BS2p that I could try. Also, I might mention that this problem as I see it goes back to at least version 2.5.5 of the IDE. Not new in 2.3.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-09-18 20:38
    Oh, that's frustrating to hear. I would have expected the loader code to be a derivative of the code used in the IDE, but apparently it isn't. In any event, it doesn't look like a solution is at hand, and time is of the essence, so I'll just have to send out source code.

    Thanks for the feedback, Tracy!

    -Phil
  • Jeff MartinJeff Martin Posts: 760
    edited 2007-09-18 22:29
    I hope I caught this before you sent out your souce code, Phil. [noparse];)[/noparse]· Oh...· and sorry, Tracy (see bottom).

    Object code (or rather, a Stamp Loader.exe) generated from Stamp Editor Version 2.3.3 should correct the problem.

    The code in the Stamp Loader is a derivative of that of the Stamp Editor, however, they have to be maintained separately.· As it turned out, someone <sheepish grin here> forgot to make one tiny change to the code in the Stamp Loader when that same person noted and fixed a problem in the Stamp Editor that dealt with serial ports.

    ----Ugly details here----

    Specificially, some USB-to-Serial devices will process a Break condition and DTR sequence out-of-order.· For example, on a standard serial port, setting DTR high, then setting a break condition, pause, setting DTR low,·pause,·then end break will cause the port to do exactly that, in that order.· However, some USB-to-Serial devices will, with the same sequence of events, effectively generate the break first, then will wait until the break is completely over before setting and clearing the DTR pulse.· Ugh!

    The fix (that I found quite by mistake while losing a pile of hair in front of the 'oscope) is to set DTR first, then break, pause, clear DTR, break, end break... this causes normal serial ports to faithfully reproduce what I instructed (which, luckily, works okay for the Stamp) and the USB-to-serial ports in question to start a break, then set DTR, pause, clear DTR, pause, then clear break (which is what I was trying to do in the first place).

    ----End of ugly details----

    The editor v2.3.3 includes Stamp Loader v3.2, which swaps those two lines of code to match that of the Stamp Editor to support these devices.



    Oddly enough, the code has been this way in the Stamp Loader for many, many months (years perhaps) and I hadn't heard people say that it wouldn't work.·

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

    · Sr. Software Engineer
    · Parallax, Inc.

    Post Edited (Jeff Martin (Parallax)) : 9/18/2007 10:38:49 PM GMT
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-09-18 22:39
    The new loader works! Thanks, Jeff!

    -Phil
  • Jeff MartinJeff Martin Posts: 760
    edited 2007-09-18 23:09
    You're welcome, Phil.

    Tracy, when you get a chance, can you try it on the systems you've been struggling with?

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

    · Sr. Software Engineer
    · Parallax, Inc.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-09-19 06:09
    Yes indeed, thanks Jeff. The loader created on either of the test computers will now program a BS2pe. I'll try it with a few more combinations in the next couple of weeks. Sorry for not squeaking more about it earlier! rolleyes.gif That USB driver/Windows stuff must drive you crazy.

    By the way, the version 2.3.3 IDE and loader continues to run perfectly fine on the ol' Fujitsu running Windows 98. The Parallax downloads page only mentions 2K/XP/Vista.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-09-19 15:52
    Tracy Allen said...(trimmed)
    By the way, the version 2.3.3 IDE and loader continues to run perfectly fine on the ol' Fujitsu running Windows 98. The Parallax downloads page only mentions 2K/XP/Vista.
    Tracy,

    ·· And the Editor may work under Windows 98 for quite some time.· We don't list it for two reasons...One is that we cannot support it on that O/S.· The second is related to the first, which is that we don't have a Windows 98 PC to test/verify compatibility on.· But, I am sure your feedback will help the forum members who continue to use Windows 98 and were wondering about compatibility.· As a side-note the newest version of the BASIC Stamp Editor is required for current versions of the BASIC Stamp Models listed in the firmware updates on our website.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Jeff MartinJeff Martin Posts: 760
    edited 2007-09-19 19:26
    Tracy Allen said...
    That USB driver/Windows stuff must drive you crazy.
    Absolutely.· shakehead.gif

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

    · Sr. Software Engineer
    · Parallax, Inc.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-09-19 19:40
    I've run into similar issues. Last week, I couldn't figure out why a PC host program I was working on wouldn't open a serial port numbered COM10 or above. It kept reporting "port not found" even though the Stamp Editor had just uploaded a program there. My program worked fine with COM1-COM9. After some sleuthing on the web, I found out I had to prepend "\\.\" to higher-numbered port names to get them to work, so "COM15" became "\\.\COM15". It's Smile like this that makes Windows insufferable at times.

    -Phil
  • Jeff MartinJeff Martin Posts: 760
    edited 2007-09-19 19:43
    Phil Pilgrim (PhiPi) said...
    I've run into similar issues. Last week, I couldn't figure out why a PC host program I was working on wouldn't open a serial port numbered COM10 or above. It kept reporting "port not found" even though the Stamp Editor had just uploaded a program there. My program worked fine with COM1-COM9. After some sleuthing on the web, I found out I had to prepend "\\.\" to higher-numbered port names to get them to work, so "COM15" became "\\.\COM15". It's Smile like this that makes Windows insufferable at times.

    -Phil
    Exactly.· Windows and the PC is a moving target... we're always having to adjust code here and there for reasons like this one.

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

    · Sr. Software Engineer
    · Parallax, Inc.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-09-19 20:33
    A minor side issue: In the dialog for creating an object loader, is it possible to turn off the tool-tip help? It soon becomes annoying when editing custom templates.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
Sign In or Register to comment.