Shop OBEX P1 Docs P2 Docs Learn Events
Allowing an end user to select the program that runs on a sealed project (bootl — Parallax Forums

Allowing an end user to select the program that runs on a sealed project (bootl

WBA ConsultingWBA Consulting Posts: 2,935
edited 2009-10-14 19:29 in Propeller 1
My project outline:: Upon power up or reset, an LED goes solid. The user holds a button down and the program slowly cycles through a single blink, double blink, and triple blink and the user releases during one of those cycles. If the LED was in it's double-blink cycle when the button was released, the program "2.bin" from the SD card is started on the prop as the active program and while running, the double blink becomes the "power on" LED status.

Where's the best place for me to start to create a "bootloader"?

I am currently looking into:
PropDOS
PROPCMD

Any other ideas? Recommendations for this venture? Things to avoid?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Williams
WBA Consulting
WBA-TH1M Sensirion SHT11 Module
Special Olympics Polar Bear Plunge, Mar 20, 2010

Post Edited (WBA Consulting) : 10/14/2009 6:42:45 PM GMT

Comments

  • StefanL38StefanL38 Posts: 2,292
    edited 2009-10-14 18:47
    If all the three programs fit all together into the EEPROM just branch to different Main-methods and avoid using an SD-card.
    another idea is to place the EEPROM into a plug: plug-in the right EEPROM and there we go.

    If you would like the user to load a lot of different programs the SD-card is a good way to go.
    I haven't tested any bootloaders yet so I can't give advice on that. But if I remember right femto-basic has some kind of a bootloader

    best regards

    Stefan
  • WBA ConsultingWBA Consulting Posts: 2,935
    edited 2009-10-14 19:18
    The number of actual programs that could be used is infinite, so I want the end user to be able to copy whichever programs onto the SD card and just rename them 1., 2., and 3. bin for the three active options. The current layout for the device does not have a display of any sort, so that's my catch. Even with a small display, I could just use two buttons to scroll through a list.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andrew Williams
    WBA Consulting
    WBA-TH1M Sensirion SHT11 Module
    Special Olympics Polar Bear Plunge, Mar 20, 2010
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-10-14 19:29
    Bootloader means that you load the whole 32kB from an EEPROM. Then your startup-procedure runs and then you load again - worst case again 32kB.
    What I did a while ago is using 2 EEPROMs and switch the adress pins of the EEPROM. In that way you can select the program that's been booted. Of course you can also have an additional EEPROM and a rotary switch to select the EEPROM used for booting.

    If you insist on selecting a program from SD-card, the SD-card driver (fsrwFemto from ObjectExchange) includes a function to boot an image from SD-card.
Sign In or Register to comment.