Simple SD Card Bootstrap Loader
wjsteele
Posts: 697
I just uploaded a very simple object to the OBEX. It has only one function, to load a file called "Autoexec.bin" from the mounted SD Card's root directory and execute it.
I see here where there was a couple people working on such a loader, but I needed one asap, so I took the FemtoBasic FAT routines and trimmed them way down to the simplest loader.
If it doesn't find the autoexec.bin file, it will simply reboot and try again. You can change the SD IO ports and filename by following the notes in the document.
I use this on my PSM to change software based on which SD card is inserted. (Sort of like game cartridges.) I've also attached it here.
Cheers and Happy New Year!
Bill
Post Edited (wjsteele) : 12/31/2009 9:37:41 PM GMT
I see here where there was a couple people working on such a loader, but I needed one asap, so I took the FemtoBasic FAT routines and trimmed them way down to the simplest loader.
If it doesn't find the autoexec.bin file, it will simply reboot and try again. You can change the SD IO ports and filename by following the notes in the document.
I use this on my PSM to change software based on which SD card is inserted. (Sort of like game cartridges.) I've also attached it here.
Cheers and Happy New Year!
Bill
Post Edited (wjsteele) : 12/31/2009 9:37:41 PM GMT
Comments
If I am thinking correctly, this works with the existing 256kBit EEPROM, without hardware amendment?
T o n y
Bill
I will have to play with this...
But, yes, that is exactly what I needed it to do as well.
Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
24 bit LCD Breakout Board now in. $21.99 has backlight driver and touch sensitive decoder.
Happy New Year!
Bill
I did the same thing for a boot loader. The actual running code is on an SD, and the eeprom just has the load and restart code.
Mine has some other actions for it needs to do some basic operations before loading the running code. It's all pretty simple.
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
Still good to have different options.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
24 bit LCD Breakout Board now in. $21.99 has backlight driver and touch sensitive decoder.
Boot mechanism from SD card - ideas ?? http://forums.parallax.com/showthread.php?p=866715
Now, mctrivia is correct - the price differential between 32KB and 64KB eeproms is negligable. His version reflashes the upper 32KB, so if there is a error during reflashing, the original code in the lower 32KB remains untouched. His code is for when the SD is not usually present, so the code needs to live in flash.
My requirement always has an SD card. There are already other mechanisms, such as PropDos and PropCmd. I want to pass parameters and also be able to boot various binaries. I am also looking to replace the boot code (eeprom)·into a cheap micro (50c) - either PIC12F22x or MC9RS08 (sot23 or soic8) rather than the 24C256/512 (~$1.50). Actually, the reason is not for cost but the fact I share pins and want to disable the eeprom after booting.
I am proposing something like this... (using DOS similarities)
It was suggested we could use "CONFIG.SYS" for optional parameters. Things like...
This way, we can define the binary options to run at run time.
The boot code could also display a list of binaries to run and request an anwer.
I would also like to use the latest fsrw routines (fsrw26) for my loader, rather that the older fsrw (femto version).
QUESTION: Which default binary·name is preferred?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Post Edited (Cluso99) : 1/1/2010 4:38:13 AM GMT
I like the idea of the 64k eeprom really well, but I need to get something working on my existing platforms out there as well, so the 64k simply wasn't a choice for me. In the future, our v2 design will have that for sure.
Now, what I'd love to see is for Parallax to start shipping all of it's products with the 64k eeprom! That's be cool, since it doesn't cost that much anyway. Of course, I'd also love to see a lot more cog ram as well, but I guess I'll have to wait for that.
Cluso99, one other thing I'd love to see in yours is the ability to load a bin file and push it to a secondary prop. That way, when we have our multi-prop platforms, we only have one true boot.
Something like Autoexec.bin and autoexe2.bin, etc.
Having a single config.sys would work great with that as well.
Bill
I am just about to post a version which can program the eeprom lower and/or upper, does the autoexec.bat, bootprop.bin, and can continue with PropCmd/PropDos. It is not properly tested. I will post on my other thread to avoid being OT.
BTW I need to "push" the code to a secondary prop. RossH has done it, as has Chip.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm