SD loader
Filip S
Posts: 54
Hello everyone
I wonder if there is anyone who has made an object to load a pre-compilied eeprom-file from an SD card to the propeller and then run it. Otherwise a fat-filesystem reader in assembler could be rewritten to do this. I'm doing a project with the propeller that could really use this function.
Thanks
Filip
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my game page: http://fgames.110mb.com
I wonder if there is anyone who has made an object to load a pre-compilied eeprom-file from an SD card to the propeller and then run it. Otherwise a fat-filesystem reader in assembler could be rewritten to do this. I'm doing a project with the propeller that could really use this function.
Thanks
Filip
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my game page: http://fgames.110mb.com
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
SD card is installed on PINs: 0..3 and uses the TV-Text object, on pins 12..15, to display errors. Should be enough comments in the 'top' file to get you going.
Most/All of the work is biased on Mike Green's & Tom Rokicki's efforts with FemtoBasic & fsrw-and-friends programs.
Have fun, if it's not useful to you please delete!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
It'll surley be very usefull for the project I'm working on right now. It's a propeller based thing with a built-in keyboard and a small serial display. I've only got one or two EEPROM-packs, and soon I'll have more than two applications for it. So a SD with all the apps will come very handy.
I haven't been able to try it yet, the link doesn't work right now, trying again soon.
Filip
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my game page: http://fgames.110mb.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my game page: http://fgames.110mb.com
But I've got a small problem, the card doesn't mount correctly (on my hommade board). I've hooked the card up to pins 19-22 with 10K resistors (i've tried with 20K too) and I get the error -972, wich is the negative pointer to the string "InitSDCard mount". I've changed pin numbers in the code too.
Filip
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my game page: http://fgames.110mb.com
Post Edited (Filip S) : 6/18/2007 9:46:01 AM GMT
You might try downloading FemtoBasic from the Propeller Object exchange and try that on your home made board. The 'boot loader' I made is basically that, I·just pulled out what I did not need as a base for a new file.
However I would suspect that the SD pins will need to be groups of 4 (at multiples of 4), such as:
0..3
4..7
8..11
12..15
16..19
20..23
24..27
I have not tested it with the SD mounted on other sets of PINs.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my game page: http://fgames.110mb.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my game page: http://fgames.110mb.com
http://forums.parallax.com/showthread.php?p=622673
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike
Filip
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my game page: http://fgames.110mb.com
In the above archive, only the 'Top file' was modified, objects:
fsrwFemto.spin
sdspiFemto.spin
TV-Text.spin
TV.spin
were left in their original state.
This basically was a test, next step in it's evolution is to rip out the TV object, replace it with the serial object, so I can connect it to a PC running a terminal program. Then add the Xmodem protocol so I can up/download files to the 'boot loader' via a serial connection. This is a future wireless project, PC terminal will be replaced with some type of wireless technology, probably a GSM/GPRS modem or Xbee.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike
Post Edited (Mike Cook) : 6/18/2007 1:16:02 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my game page: http://fgames.110mb.com
FemtoBasic is pretty flexible in terms of a display. There is a variation (also in the Object Exchange) called BoeBotBasic that uses a serial port for the "console" and will even work with the programming port and your PC.
Is there anyway of getting more specific error messages out of BoeBotBasic?(not just Can't mount SD-card, it also says a possible reason why it can't)
Is there an easy way to see wich pin(s) are wrong (I assume there is a hardware error, even if I can't find it, even if i've searched for it)
Filip
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my game page: http://fgames.110mb.com
Post Edited (Filip S) : 6/18/2007 9:01:43 PM GMT
Just grep abort *.spin and you'll see the codes. For debugging, you should definitely just use sdspi.spin (the
spin versions) and not the assembly versions since they do have more information available. If you get a
mount failure in BoeBASIC it should report the error code which you can look up in the source. If you need to
you can add that code (it should be pretty easy to do; just look for backslashes; those are where the abort
codes are being collected.)
On the other hand, if the initialization sequence isn't even working (that is, the wires are not hooked up right)
then you'll essentially get no response from the card at all which is just a timeout condition on waiting for a
response, and this is very tough to debug from the software end. Here there's not much more you can do
than verifying the connections and/or slapping a scope on the pins. Just run mount in a loop and start looking
at the wires and check the responses.
Post Edited (rokicki) : 6/18/2007 9:28:48 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my game page: http://fgames.110mb.com
I found out that it was my SD-reader holder·that was bad. I'm trying to fix it.
Filip
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my game page: http://fgames.110mb.com
Post Edited (Filip S) : 6/19/2007 12:24:00 PM GMT