Shop OBEX P1 Docs P2 Docs Learn Events
tokenizer.dll code to download to a BS2SX chip from a C program using VC++ — Parallax Forums

tokenizer.dll code to download to a BS2SX chip from a C program using VC++

ArchiverArchiver Posts: 46,084
edited 2003-11-23 04:56 in General Discussion
Hello,

I am attempting to program a BS2SX chip using VC++ under Windows
2000. I am using the tokenizer.dll and having a heck of time. The
chip runs fine if I load it using the windows API, but operationally
it isn't convenient to do that. What is happening is, is that if
power is lost or the PC is rebooted, the chip loses the program. So,
I am attempting to reload the chip program during app startup so that
the user doesn't have to hassle with it.

In the kit that I got form Parallex there was a tokenizer.h file
under the Linux directory that I hacked to compile under windows.
Right now, I am getting unresolved externs for Compile() and
TestRecAlignment() functions.

Does anyone have a sample project for VC++ under windows that they
could share with me that invokes the Compile() and TestRecAlignment()
functions?

The tokenizer.h file did not include prototypes for the two
functions, so I guessed from the documentation. I tried to declare
them as both C++ functinons and as C functions and got unresolved
externs in both cases.

Any points in the right direction would be appreciated.

Regards,

Clint
=====

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-11-22 01:33
    Hello Clint,

    You can find sample for VC++ 6 for tokenizer.dll at the "Files"
    section of this group:
    http://groups.yahoo.com/group/basicstamps/files/

    Direct link to sample is:
    http://groups.yahoo.com/group/basicstamps/files/vbSampleTok.zip
    The archive contain working version of tokenizer.h file for VC++.

    Good luck,
    Alexey.

    --- In basicstamps@yahoogroups.com, "cljensen" <diverClint@e...>
    wrote:
    > Hello,
    >
    > I am attempting to program a BS2SX chip using VC++ under Windows
    > 2000. I am using the tokenizer.dll and having a heck of time. The
    > chip runs fine if I load it using the windows API, but
    operationally
    > it isn't convenient to do that. What is happening is, is that if
    > power is lost or the PC is rebooted, the chip loses the program.
    So,
    > I am attempting to reload the chip program during app startup so
    that
    > the user doesn't have to hassle with it.
    >
    > In the kit that I got form Parallex there was a tokenizer.h file
    > under the Linux directory that I hacked to compile under windows.
    > Right now, I am getting unresolved externs for Compile() and
    > TestRecAlignment() functions.
    >
    > Does anyone have a sample project for VC++ under windows that they
    > could share with me that invokes the Compile() and TestRecAlignment
    ()
    > functions?
    >
    > The tokenizer.h file did not include prototypes for the two
    > functions, so I guessed from the documentation. I tried to declare
    > them as both C++ functinons and as C functions and got unresolved
    > externs in both cases.
    >
    > Any points in the right direction would be appreciated.
    >
    > Regards,
    >
    > Clint
    > =====
  • ArchiverArchiver Posts: 46,084
    edited 2003-11-22 12:18
    Alexey,

    Thanks. the example was very useful and I succesfully compiled the
    program..

    I am now trying to download the compiled program to the chip and am having
    difficulty. I suspect that I am
    not signaling BREAK correctly as I am not getting acks as the documentation
    says.

    Are there are any code samples out there that go through through the
    programming sequence?

    Clint
    ====
    Original Message
    From: "alexeyroo" <aerokhin@h...>
    To: <basicstamps@yahoogroups.com>
    Sent: Friday, November 21, 2003 8:33 PM
    Subject: [noparse][[/noparse]basicstamps] Re: tokenizer.dll code to download to a BS2SX chip
    from a C program using VC++


    > Hello Clint,
    >
    > You can find sample for VC++ 6 for tokenizer.dll at the "Files"
    > section of this group:
    > http://groups.yahoo.com/group/basicstamps/files/
    >
    > Direct link to sample is:
    > http://groups.yahoo.com/group/basicstamps/files/vbSampleTok.zip
    > The archive contain working version of tokenizer.h file for VC++.
    >
    > Good luck,
    > Alexey.
    >
    > --- In basicstamps@yahoogroups.com, "cljensen" <diverClint@e...>
    > wrote:
    > > Hello,
    > >
    > > I am attempting to program a BS2SX chip using VC++ under Windows
    > > 2000. I am using the tokenizer.dll and having a heck of time. The
    > > chip runs fine if I load it using the windows API, but
    > operationally
    > > it isn't convenient to do that. What is happening is, is that if
    > > power is lost or the PC is rebooted, the chip loses the program.
    > So,
    > > I am attempting to reload the chip program during app startup so
    > that
    > > the user doesn't have to hassle with it.
    > >
    > > In the kit that I got form Parallex there was a tokenizer.h file
    > > under the Linux directory that I hacked to compile under windows.
    > > Right now, I am getting unresolved externs for Compile() and
    > > TestRecAlignment() functions.
    > >
    > > Does anyone have a sample project for VC++ under windows that they
    > > could share with me that invokes the Compile() and TestRecAlignment
    > ()
    > > functions?
    > >
    > > The tokenizer.h file did not include prototypes for the two
    > > functions, so I guessed from the documentation. I tried to declare
    > > them as both C++ functinons and as C functions and got unresolved
    > > externs in both cases.
    > >
    > > Any points in the right direction would be appreciated.
    > >
    > > Regards,
    > >
    > > Clint
    > > =====
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-11-23 04:56
    Hello Clint,

    >Are there are any code samples out there that go through
    through the
    >programming sequence?

    As I know, there are no public examples for VC++ for downloading
    code into Basic Stamp.

    But there are several examples for VB.
    Best is demo from Curtis Desselles (cenlasoft) -
    http://groups.yahoo.com/group/basicstamps/files/VBCommVer1.1.zip

    Good luck,
    Alexey.

    --- In basicstamps@yahoogroups.com, "Clinton Jensen" wrote:
    > Alexey,
    >
    > Thanks. the example was very useful and I succesfully
    compiled the
    > program..
    >
    > I am now trying to download the compiled program to the chip
    and am having
    > difficulty. I suspect that I am
    > not signaling BREAK correctly as I am not getting acks as the
    documentation
    > says.
    >
    > Are there are any code samples out there that go through
    through the
    > programming sequence?
    >
    > Clint
    > ====
Sign In or Register to comment.