Shop OBEX P1 Docs P2 Docs Learn Events
Loading Code from SD Card — Parallax Forums

Loading Code from SD Card

dermotdermot Posts: 26
edited 2012-06-20 12:10 in Propeller 1
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
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

  • Daniel HarrisDaniel Harris Posts: 207
    edited 2012-06-19 10:49
    Hi dermot,

    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".
  • KyeKye Posts: 2,200
    edited 2012-06-19 16:58
    You need to follow the 8.3 file naming convention. Testing.binary is way to long of a name.

    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.
  • dermotdermot Posts: 26
    edited 2012-06-20 12:10
    Correct file name format worked a treat, thanks guys
Sign In or Register to comment.