Sd card loader - fat 32
max72
Posts: 1,155
in Propeller 1
In the past I used an SD program loader that resides in the lower eeprom memory. It was posted on the forum.
It checks the SD for an eeprom image, in that case it loads it in the upper eeprom space (you need a 64+ eeprom).
It then deletes the program from sd and runs the program from upper memory.
If sd has not an image file it simply runs from upper memory.
It works perfectly but only with fat16 file systems. The current cheapest memory cards use fat 32, so I’m wondering if there is a fat32 version.
Thanks in advance,
Massimo
It checks the SD for an eeprom image, in that case it loads it in the upper eeprom space (you need a 64+ eeprom).
It then deletes the program from sd and runs the program from upper memory.
If sd has not an image file it simply runs from upper memory.
It works perfectly but only with fat16 file systems. The current cheapest memory cards use fat 32, so I’m wondering if there is a fat32 version.
Thanks in advance,
Massimo
Comments
The original thread is this one:
https://forums.parallax.com/discussion/122313/sdloader100-an-sd-card-bootloader
Massimo
I would suggest renaming sdspiFemto.spin to eeprom.spin, and remove the SPI routines from it. Replace fsrwFemto.spin with fsrw.spin from the FSRW 2.6 repository, and also add the SPI driver from FSRW 2.6.
I'll try to follow your suggestion.
I hoped there already was an updated version.
I'l let you know how it goes.
Thanks again,
Massimo
Tomorrow I’ll give it a whirl.
Thanks,
Massimo
Thanks,
Massimo
note: run method is not working (for my understanding in the former version used the I2C driver to access the SD during the run method, stopping all the other cogs, now it's not possible).
Thanks again,
Massimo
I was considering Tachyon + bluetooth too, but besides my limited (read null) forth programming skills it would be too complex for them to reprogram via terminal.
Saving a file on an SD card and plugging it in the box is probably the simplest option.
Massimo
Alternatively, you can reload it via the serial port with one of the simple command line loaders that work in Windows or Linux or Mac.
But if they can't program the Prop, how can you send them a card when you need to program the Prop?
The board already has the SD slot and a card in it.
I can send them an eeprom image via mail, they simply have to move the SD from the board to the pc, copy the file on the SD, and plug it back in the board.
During the next boot the system will update and delete the image form the SD.
Massimo
The bootloader then checks the SD, and in case there is an image file it copies it to the upper 32k of the eeprom, and then deletes the image file (optional).
During normal operation the bootloader checks the SD, and then it runs the main program that resides in the upper part of the memory.
Massimo
However it's not just that the old version was FAT16, but it is also because it used standard SD cards that addressed memory in bytes and has a slightly different initialization. The newer cards than those, but still old, are the SDHC cards that addressed memory in blocks.
So you want to get the new SDHC FAT32 version of your bootloader onto an old SD FAT16 card to then upgrade the units in the field? If you have a solution then good, but let me know if you are stuck, I am sure I can whip up a bootloader to suit easily enough.
Nowadays it's difficult and expensive to find 2Gb cards.
The bootloader is also able to upgrade itself (depending on the file name you write in the lower or upper eeprom), so in theory older units on the wild should be upgradable if the 2Gb SD is still usable.
Anyway the question is academic because older projects are all dead.
Thanks,
Massimo