PDA

View Full Version : What is save binary for?



Kye
03-26-2009, 05:07 AM
Anyone know?

And, yes using the propeller tool.


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

Oldbitcollector (Jeff)
03-26-2009, 05:12 AM
So you can copy them to an SD card and launch them with PropDOS (http://www.orrtech.us/propdos) :)

<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 (http://www.warrantyvoid.us/tiki-index.php?page=Propeller) @ Warranty Void.

Sapieha
03-26-2009, 05:16 AM
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

Kye
03-26-2009, 05:33 AM
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,

Sapieha
03-26-2009, 05:39 AM
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

MagIO2
03-26-2009, 05:51 AM
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

Sapieha
03-26-2009, 06:00 AM
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

Sapieha
03-26-2009, 06:02 AM
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

jazzed
03-26-2009, 06:07 AM
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 :)

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


Propalyzer: Propeller PC Logic Analyzer (http://www.brouhaha.com/~sdenson/Propalyzer)
http://forums.parallax.com/showthread.php?p=788230 (http://forums.parallax.com/showthread.php?p=788230)

MagIO2
03-26-2009, 06:18 AM
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.

BradC
03-26-2009, 06:36 AM
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.

MagIO2
03-26-2009, 06:46 AM
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.

MagIO2
03-26-2009, 06:54 AM
@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)

BradC
03-26-2009, 07:15 AM
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.

Kye
03-26-2009, 08:12 AM
So, its not really good for anything with spin then.

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

mctrivia
03-26-2009, 08:16 AM
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 (http://propmodule.com) has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.

Phil Pilgrim (PhiPi)
03-26-2009, 08:33 AM
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 Schwabe
03-26-2009, 04:05 PM
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 (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

Kye
03-26-2009, 09:51 PM
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)
03-26-2009, 11:09 PM
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