Shop OBEX P1 Docs P2 Docs Learn Events
Linux tokenizer 1.23 help — Parallax Forums

Linux tokenizer 1.23 help

gregdgregd Posts: 3
edited 2005-09-13 14:05 in BASIC Stamp
I'm trying to move off Windows, onto Linux. I must be doing something stupidly wrong, but I can't get the Linux 1.23 tokenizer to work. It seems to be mashing all the lines together, so the first two lines become one '{STAMP BS2}'{PBASIC 2.5} and naturally it doesn't recognize the directive (I get an error 154). I went to version 1.16, removed the PBASIC directive, and that sort of worked, but the source was written in PBASIC 2.5, so I get lots of other errors (e.g. PIN is now illegal).

To set things initially, I downloaded the most recent Linux package from SourceForge, compiled it (make). Downloaded the tokenizer.so (1.23), put that in /usr/lib, and then ran the bstamp_tokenize program against some test source.

I've tried adding spaces, extra lines, etc between the two directives, no joy. Tried changing the character code from unicode utf8 to western european iso 8859-1, and Unix to DOS end of line; no change.

The system is a homebrew Pentium 3/733, running SuSE Linux 9.3 Professional.

I'd really like to stick with PBASIC 2.5. Any idea what's wrong?

Thanks,

Greg.

p.s. The contributed IDE package displays its splash screen and then just hangs, so no luck there, either.

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-09-09 07:07
    gregd -

    This is strictly a guess, since I claim no expertise with Linux, nor with the Linux tokenizer. It's based on work I did years and years ago, converting some Dartmouth Basic programs to work on a CP/M based operating system.

    If the source files you are using (PBASIC program files) were created on a Windows Operating System, or something other than Linux, your problem may be stemming from an unrecognized end-of-line character. Perhaps the files could just be opened and then saved with a simple Linux text editor which recognizes and replaces Windows (ASCII) end of line characters with whatever it is that Linux recognizes as a valid end-of-line characters, presuming it's different.

    I hope the problem turns out to be something just that simple.

    Regards,

    Bruce Bates
  • Adrian SchneiderAdrian Schneider Posts: 92
    edited 2005-09-09 10:04
    You also may try the following:
    Go to the Projects section of this forum and locate the article (probalbly on page 2):
    "new version of stampbc: v2.1"

    Adrian
  • gregdgregd Posts: 3
    edited 2005-09-10 17:52
    Bingo! Stampbc v2.1 did it. Compiles just fine. Thanks!

    But, on to the next step - downloading. Running 'stampbc -j' does identify the stamp (BS2sx), but when I try to download (stampbc -d test.o) it claims there's no stamp there or it's not a BS2 (which I guess it isn't; it's an sx, but the STAMP directive does say BS2sx).

    I ran showtty, and gave it the bs command, but that didn't help. It did help enable my second serial port, so I know it actually did something, but the same download problem happens there too.

    I know the stamp, cable, etc. are working, because I can attach them to a different machine that's running windows 98, and those tools work ok.

    Any ideas?

    Thaks for your help,

    Greg.
  • gregdgregd Posts: 3
    edited 2005-09-11 17:47
    ok, an update...

    It seems that if I compile and download all in one step it works. So,

    stampbc -p /dev/ttyS1 test.bsx -s 0

    works, but if I just do the download (-d), it does not.

    Also, I needed to specify the slot (-s 0), but on the Windows tool set I didn't (or at least I don't remember telling it to do so). Not a big deal, but it was a surprise.

    Anyway, I seem to be up, barely. I'd really rather use the IDE system, because the command-line operation is really poor about telling you about syntax errors and the like, and I haven't even considered trying to run the debugger. Anybody have luck with it? (This is the PBasic tool that was written in Kylix.) I'm assuming it works like the Windows tools from Parallax.

    Thanks,

    Greg
  • Adrian SchneiderAdrian Schneider Posts: 92
    edited 2005-09-13 14:05
    When using the -d (download o-File) option you have to specify the slotnumber using -s because
    stampbc cannot determine it from the o-File.

    when compiling *and* downloading, stampbc knows from the compiler options in the source file which object file goes
    to which slot on the stamp, thus the -s option is ignored.

    Regards
    Adrian
Sign In or Register to comment.