Shop OBEX P1 Docs P2 Docs Learn Events
What is save binary for? — Parallax Forums

What is save binary for?

KyeKye Posts: 2,200
edited 2009-03-26 15:09 in Propeller 1
Anyone know?

And, yes using the propeller tool.


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-03-25 21:12
    So you can copy them to an SD card and launch them with PropDOS [noparse]:)[/noparse]

    <SMIRK>

    Honestly, that is my one use for the function, but I'm sure there are more.

    OBC

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

    Visit the: The Propeller Pages @ Warranty Void.
  • SapiehaSapieha Posts: 2,964
    edited 2009-03-25 21:16
    Hi Kye


    One of uses is if You run .. Gear .. Prop simulator.
    It only accept bin files else You wil update program to customer but not give him Program code
    And many more

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
  • KyeKye Posts: 2,200
    edited 2009-03-25 21:33
    Question can you access the spin functions inside the binary file?

    Like use the binary with other objects? And compile them to an eeprom file to load on the propeller chip?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • SapiehaSapieha Posts: 2,964
    edited 2009-03-25 21:39
    Hi Kye.

    I work on it .. But only PASM. To have standart Drivers that communicate between COG and HUB Ram with no spin involved

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-03-25 21:51
    As far as I understood Chips webinair, reloading/replacing spin code is not so easy. Because the Spin compiler optimizes the bytecode. This means when you don't use a pub-function of an object in your program, it won't be part of the compiled bytecode.

    Maybe a workaround would be to have a dummy function, which simply calls each pub function of the object.

    Or maybe I missunderstood this. But I think there might be an issue with adressing. You would have to use relative adressing to find your variables. But I think things are a bit more static in the propeller.

    Post Edited (MagIO2) : 3/25/2009 10:05:46 PM GMT
  • SapiehaSapieha Posts: 2,964
    edited 2009-03-25 22:00
    Hi MagIO2

    It is not posible with Propeler Tool but very isy with BSTC compiler to compile PASM and edit binary file to only have PASM code with placeholders of variable adresses in HUB
    It is only structure of that Placeholder I kurently thinking on.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
  • SapiehaSapieha Posts: 2,964
    edited 2009-03-25 22:02
    Hi Kye.

    Sorry for litle of topic info on Yours thread

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
  • jazzedjazzed Posts: 11,803
    edited 2009-03-25 22:07
    To produce a binary so you can extract PASM with an application I produced and make ASCII-HEX array "micro-code" for launching on a cog in a C program. I'm sure there are even more agendas [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-03-25 22:18
    Hmmm ... Kye ... why don't you simply try it out?

    You can use @ to find any adress of a label inside of your code. So, with a little program that moves the code from it's original place to another would proove if it is possible to start this code then. Maybe you can output content of a variable. But you should change the value of the original variable to see if the variable access is done relative or with an absolute adress. If access is absolute the copied code would output the changed value.
  • BradCBradC Posts: 2,601
    edited 2009-03-25 22:36
    MagIO2 said...
    As far as I understood Chips webinair, reloading/replacing spin code is not so easy. Because the Spin compiler optimizes the bytecode. This means when you don't use a pub-function of an object in your program, it won't be part of the compiled bytecode.

    I have not watched the webinars and I can't participate as there is no linux client (and my mac is too old and slow)... but... this is not correct. The Parallax compiler compiles the entire object whether all methods are used or not. There is no optimisation of the compiled objects down to this level. At least one of the other spin compilers can do this however.

    Relocating entire objects or even entire binary images is not particularly difficult, but breaking things up to the method or section is considerably harder.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cardinal Fang! Fetch the comfy chair.
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-03-25 22:46
    Hi Sapieha,

    why would you need external tools to store such PASM binaries? I'd wrap the PASM library in a Spin-Program that stores the PASM on a SD-card. For HUB RAM access you can tell the COG with the PAR where to find the variables. It should be possible to do this with a very little footprint.

    E.G.:
    ir_sense mov ir_com1, par ' copy parameter which holds the adress of communication buffer
    ir_0_max add ir_com2, par
    ir_1_max add ir_com3, par
    ir_0_min add ir_com4, par
    ir_1_min add ir_com5, par
    ir_bit_cnt add ir_com6, par
    ....
    some code
    ....
    wrlong ir_1_max, ir_com2 ' done, so write result to HUB RAM
    wrlong ir_1_min, ir_com3
    wrlong ir_0_max, ir_com4
    wrlong ir_0_min, ir_com5
    wrlong ir_bit_cnt, ir_com6
    ....
    some code
    ....
    ir_com1 long 0
    ir_com2 long 4
    ir_com3 long 8
    ir_com4 long 12
    ir_com5 long 16
    ir_com6 long 20


    You did not waste space with that. The ir_comX store the adress of HUB RAM. This can be used anywhere in the COG. And the original "add"s are afterwards used by the code as COG variables that hold the data to be stored in HUB RAM when needed.
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-03-25 22:54
    @BradC:
    Are you interested in the webinar? Should be possible to convert it to MP3. The video-part of the 1 hour I watched so far is not to interesting. Could do that tomorrow if you'd like to have it (Now it's to late and I have to sleep - in 5 hours night is over for me ;o)
  • BradCBradC Posts: 2,601
    edited 2009-03-25 23:15
    MagIO2 said...
    @BradC:
    Are you interested in the webinar? Should be possible to convert it to MP3. The video-part of the 1 hour I watched so far is not to interesting. Could do that tomorrow if you'd like to have it (Now it's to late and I have to sleep - in 5 hours night is over for me ;o)

    Oh, I should be able to watch them in either the wmv or mp4 format, it's just that I can't participate in the webinar as the software required is either for Windows or Macs but my mac is too old and slow to run it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cardinal Fang! Fetch the comfy chair.
  • KyeKye Posts: 2,200
    edited 2009-03-26 00:12
    So, its not really good for anything with spin then.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • mctriviamctrivia Posts: 3,772
    edited 2009-03-26 00:16
    very useful for autoupdate use. you can save the binary and upload via network or serial comunication to prop to overwrite eeprom with it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-03-26 00:33
    Anytime you want to distrubute an app (Spin, asm, or both) without including any source code, object files are the way to do it. The .binary files are shorter than the .eeprom image files, lacking the zero padding of the latter.

    -Phil
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-03-26 08:05
    Kye,

    I didn't want to hi-jack your thread and I thought you might be interested in this ...
    http://forums.parallax.com/showthread.php?p=794696

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • KyeKye Posts: 2,200
    edited 2009-03-26 13:51
    Mmm, well what I was looking for was a was to distribute objects that would not be human readable but still be able to be included with other human readable objects to be compiled.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-03-26 15:09
    That, I'm afraid, would not work, since the symbol table is not included with the binary. What you are after are linkable object modules, which the Spin compiler does not produce.

    -Phil
Sign In or Register to comment.