Shop OBEX P1 Docs P2 Docs Learn Events
Generate Object Code. Why? — Parallax Forums

Generate Object Code. Why?

ArchiverArchiver Posts: 46,084
edited 2003-06-05 22:16 in General Discussion
Hello,

I'm not always the sharpest tool in the shed... [noparse]:)[/noparse]

I'm interested to know exactly what is the purpose of saving
and later loading an object file? Can't seem to find any details
in the included help or pdf files that came with my BOE kit.

I've generated an object file, examined it's contents and compared it
to a tokenized file, seems very similar, but what is it used for?

This object file seems to mean something different then what we
already know about object files in assembly or C code.

Thank you for your help in advance!

Best Regards,
Jules Marchildon

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-06-04 01:19
    Okay, a little more investigation. I see now you can create
    a stand alone or w/object executable file. I did that, and ran
    both of them, -they both asked to load an object file (one I saved
    earlier) and comes back with a message box that says...

    ---
    #012
    Checksum Error
    Data is corrupt in file "c:\test.obj"
    ---

    Okay, I see now this is used to download a program without the IDE.
    But don't understand the error code? The "Generate object file"
    dialog says I was successful!

    Here is the simple test code...

    '{$STAMP BS2}

    Counter VAR BYTE ' Counter for LED blinks

    FOR Counter = 1 to 20 'Loop 20 times
    PULSOUT 0,50000 'Blink LED on and off for 1/10 second
    PAUSE 250 'Pause 1/4 second
    NEXT
    STOP
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-04 01:41
    The idea behind the object file format is to be able to share a program with
    others without divulging the source code. The stand-alone executable option
    makes it particularly easy for developers to send updates to customers.

    We're scheduled to start revising the manual next month ... the creation of
    object files will be covered.

    -- Jon Williams
    -- Parallax


    In a message dated 6/3/2003 6:35:10 PM Central Standard Time,
    jmarchildon@l... writes:

    > Hello,
    >
    > I'm not always the sharpest tool in the shed... [noparse]:)[/noparse]
    >
    > I'm interested to know exactly what is the purpose of saving
    > and later loading an object file? Can't seem to find any details
    > in the included help or pdf files that came with my BOE kit.
    >
    > I've generated an object file, examined it's contents and compared it
    > to a tokenized file, seems very similar, but what is it used for?
    >
    > This object file seems to mean something different then what we
    > already know about object files in assembly or C code.
    >
    > Thank you for your help in advance!
    >
    > Best Regards,
    > Jules Marchildon



    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-05 22:16
    Hi,

    I'm not sure which version of the BASIC Stamp Editor you are running, but the
    problem you reported occurred only in Version 2.0 Beta 1, that I know of.

    This was an error caused by recompiling the code in a new version of our
    development environment, which has different default preferences for certain
    compile-time structures; this was unknown by us at the time. In essence, it
    would think it created the object code file/executable properly, however, the
    structure of the file was somewhat different, causing a checksum error upon
    loading.

    This bug has been fixed in Version 2.0 Beta 2. If you find that the new version
    still causes the same problem, please let me know.

    Thank you.

    --Jeff Martin
    Engineering Manager
    Parallax, Inc.


    >
    Original Message
    > From: gem2jules [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=8BVVkrxFWL8_1Gg9uI1Br8zhdVx4blz6Dgmh0T6BOeb1gYgGdo03j3nXVo-U5E1gc-NUlq6BZ9uy]jmarchildon@l...[/url
    > Sent: Tuesday, June 03, 2003 5:19 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Re: Generate Object Code. Why?
    >
    >
    > Okay, a little more investigation. I see now you can create
    > a stand alone or w/object executable file. I did that, and ran
    > both of them, -they both asked to load an object file (one I saved
    > earlier) and comes back with a message box that says...
    >
    > ---
    > #012
    > Checksum Error
    > Data is corrupt in file "c:\test.obj"
    > ---
    >
    > Okay, I see now this is used to download a program without the IDE.
    > But don't understand the error code? The "Generate object file"
    > dialog says I was successful!
    >
    > Here is the simple test code...
    >
    > '{$STAMP BS2}
    >
    > Counter VAR BYTE ' Counter for LED blinks
    >
    > FOR Counter = 1 to 20 'Loop 20 times
    > PULSOUT 0,50000 'Blink LED on and off for 1/10 second
    > PAUSE 250 'Pause 1/4 second
    > NEXT
    > STOP
    >
    >
    >
    >
    > 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/
    >
    >
    >
Sign In or Register to comment.