Loading Code from SD Card
dermot
Posts: 26
Hi,
I am having trouble loading code from the SD Card into the propellor RAM. I am using Kwabena W. Agyeman, SD-MMC File Allocation Table Engine, object from obex.
This is what I have done in the main program
I have a Testing.binary file in a Firmware folder on the SD card.
When I enter this Pub the program crashes!!!
The testing.binary code will work perfect if loaded directly onto the RAM using the Propellor Tool and ctrl+F10
Can anyone offer assistance on the cause of my issue??
I am having trouble loading code from the SD Card into the propellor RAM. I am using Kwabena W. Agyeman, SD-MMC File Allocation Table Engine, object from obex.
This is what I have done in the main program
Pub Test sd.bootPartition(\Firmware\Testing.binary)
I have a Testing.binary file in a Firmware folder on the SD card.
When I enter this Pub the program crashes!!!
The testing.binary code will work perfect if loaded directly onto the RAM using the Propellor Tool and ctrl+F10
Can anyone offer assistance on the cause of my issue??
Comments
For troubleshooting, you may try moving Testing.binary up one level to the root directory of the SD card. Of course this means you will have to modify your code loaded into the Propeller to not try to go into the Firmware folder. Also, come to think of it, Kwabena's SD card drivers only support the 8.3 convention. That is to say that it does not support long names so the filename can be up to 8 characters long and have a 3 character file extension (separated by a "."). You might try renaming that file to "testing.bin".
This means you can 8 capital letters for the name of the file and 3 capital letters for the extension.
Your program crashes because you do not abort trap the function. So, when it cannot find the file it causes the interpreter to stop running. Please read the documentation on the driver here: http://www.parallaxsemiconductor.com/an006.
When you give the file a long name like Testing.binary... Windows translates it into a short 8.3 file name like Testin~1.bin. This is what my driver sees on the SD card.