Shop OBEX P1 Docs P2 Docs Learn Events
Propeller file types — Parallax Forums

Propeller file types

James LongJames Long Posts: 1,181
edited 2007-02-27 14:39 in Propeller 1
Ok....say I want to access a file from a SD card (not using one of the methods on the forum....it's a complicated story). I would like to take this file and rewrite the boot eeprom.

What format would the file need to be?

I know the Propeller IDE can save a file as a bin....and an eeprom file.

Which would be appropriate for rewriting the boot eeprom?

I'm not sure the difference....so I don't want to ask a bunch of stupid questions.

The information will come through a serial interface with the SD card residing on a EZlcd. I would like to boot from it.(with a boot loader type program on the Propeller, but I don't see how this would be accomplished with full duplex serial communication. It would take to many resources....at least in my view.)

Suggestions or comments?

James L

Comments

  • rokickirokicki Posts: 1,000
    edited 2007-02-27 04:59
    The only diff is the eeprom file is padded out, with zeros, to 32K. So either will work, but make sure to zero anything after
    the end of the file if you read just a binary.
  • James LongJames Long Posts: 1,181
    edited 2007-02-27 05:03
    That is the exact answer I needed.



    Thanks rokicki,



    James L
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-02-27 05:32
    James, it is possible to do a psuedo-boot from the SD card directly by loading the 32k into RAM and initiating a soft-reboot. The information on how to do this was posted to the forums quite a while ago.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-02-27 07:41
    The assembly I2C/SPI routines in FemtoBasic can boot directly from a file on an SD card (and from a 32K EEPROM "page" other than the 1st on pins 28/29). The file is just a copy of the *.binary file from the Propeller Tool.
  • rokickirokicki Posts: 1,000
    edited 2007-02-27 08:22
    Oops, I wasn't 100% accurate. The eeprom file has two longwords of $FFFFF9FF before the zeros.

    I'd build them both and compare them there just to be sure.

    Sorry for the bad info.
  • James LongJames Long Posts: 1,181
    edited 2007-02-27 14:06
    Paul,

    I looked for the code that was posted for doing just that....but couldn't find it. I didn't know exactly how to search.....


    Mike,

    My problem.....the SD card is actually part of the EZlcd...and the file must come by full duplex serial. ( this is because of my design....not the limitation of the EZ item.) But thanks for the information.


    Rokicki,
    That is not a problem.....I could just look for that value and strip it out. It may work just as well either way. The program loaded would most likely be bigger than the one previously stored on the eeprom, so using a bin file may work just as good.



    James L
  • bambinobambino Posts: 789
    edited 2007-02-27 14:09
    James,

    Have you an idea of loading the prop from the SD card, or loading from a second prop that is reading the SD card. I know at one time you thought the prior was impossible.
    I have no need of loading from the SD, but I'm curious just the same?
  • James LongJames Long Posts: 1,181
    edited 2007-02-27 14:25
    Bambino,

    I think if you were communicating with SPI ...it may be possible. I'm using serial....as I think you are as well.

    Since I'm using full duplex (which uses one cog by itself) I figure it would be impossible to load the program image into memory and do a soft boot. I may be wrong.

    I'm just planning on using the SD card to update the program for the single Propeller. Pop in an SD card....and the Prop will check to see if the date(separate file) is the same as stored in the eeprom (bigger than 32K) ....if the date is newer(SD card) the propeller copies the data from the card on to it's eeprom and ask's for a reboot.

    Not hard so far.....just a little complicated.

    I would love to do a ram load and soft boot, but not sure how to accomplish this with full duplex serial. I also haven't found the softboot code.



    James L


    Post Edited (James Long) : 2/27/2007 2:31:46 PM GMT
  • bambinobambino Posts: 789
    edited 2007-02-27 14:34
    At the moment I am not using either. The uart quit transmiting touch data back to the prop. I wrote an SPI routine using the BS2 functions object. It worked, but not being asynchronous it put to many strains on my program having to poll for data instead of using the duplex buffer. I could have made a buffer I suppose, but they agreed to replace the unit. So I am without at the moment.

    Should be back on the ball soon though.
  • bambinobambino Posts: 789
    edited 2007-02-27 14:39
    That softboot stuff has had me scrathing my head for 6 months now.

    Somehow it uses the bitstream as its clock because the internal oscillator is to slow to run115200 baud.

    Anyway I'm glad my app will be a one time load and ship it on to China.
    Good Luck and Keep us Posted, that is an interesting use of the Card.
Sign In or Register to comment.