Shop OBEX P1 Docs P2 Docs Learn Events
TACHYON 5.4 for IoT5500 SD CARD format — Parallax Forums

TACHYON 5.4 for IoT5500 SD CARD format


Hello ParalaxForum,

First of all we are completely new to this forum and to Propeller and Tachyon so please don't judge for stupid questions or missing informations in this thread.



We're using the IoT5500 from Wiznet like in the dokumentation in hardware on our own PCB.

We've been loading TACHYON5r4.SPIN to the EEPROM of the Propeller chip with the Propeller Tool and the Propplug as recommended.
Afterwards we started the TeraTerminal, opend our COM-PORT and loaded EXTEND.FTH to the Propeller, as well as EASYFILE.FTH.

We did a reboot and after using the word 'MOUNT' we get the information about the mounted SD Card as expected.
(We were using two different SD Cards from SanDisk each with 8GB)

Our first aim is now to open any file (a textfile named TEST.TXT or a Forth-File e.g. EXTEND.FTH loaded with Windows) from the SD Card.
Against our expectations there is no answer from the propeller when we use the word 'FOPEN <here our filename>'.

We also tryed to read the memory of the SD Card with the word '<any adress> SD DUMP'. This worked, so we were able to see the memory of the SD CARD.


But still it seems like we're having a problem with the format of the SD CARDS, we formated them in FAT32 with Windows.
(We used fast formating and the complete formating with 4096 and 512 byte blocks, like the standart settings.)

Our Question is now:
Are there any recommendations about the expected format for the SD CARD or which formats and files TACHYON is able to read from SD CARDs with EASYFILE.FTH?



Thank you all in advance for helping, if you need any further informations feel free to ask. :)

Best regards from Germany

Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2019-09-12 12:07
    Welcome to the Parallax forum @nascma - There is a little glitch in the command line operations that was supposed to be an improvement in 5.4 in that you need to hit enter twice following an FOPEN operation. Hopefully this will get fixed very soon, but it does not affect the operation otherwise.

    If you want to dump the contents of the file rather than the first 4GB of the SD card then use FS instead.
    ...  FOPEN HOME.HTM --> ...opened at 01D4.A100 for 68037 
    ...  0 $40 FS DUMP --> 
    0000.0000:   3C 21 44 4F  43 54 59 50  45 20 68 74  6D 6C 20 50    <!DOCTYPE html P
    0000.0010:   55 42 4C 49  43 20 22 2D  2F 2F 57 33  43 2F 2F 44    UBLIC "-//W3C//D
    0000.0020:   54 44 20 48  54 4D 4C 20  34 2E 30 31  2F 2F 45 4E    TD HTML 4.01//EN
    0000.0030:   22 20 22 68  74 74 70 3A  2F 2F 77 77  77 2E 77 33    " "http://www.w3 ok
    ...  16 FOR FGET EMIT NEXT --> <!DOCTYPE html P ok
    ...  $1E FSC@ .BYTE --> 2F ok
    
    Then you can use FGET or FPUT for sequential access (if you really must) or just address it as virtual memory up to 4GB in size using the FSC@ FS@ FSC! FS! words to directly fetch or store to it. Alternatively you can use FSADR to return the physical address of a location that gets buffered in hub RAM.
    ...  $32 FSADR 32 CTYPE --> "http://www.w3.org/TR/html4/stri ok
    
    Note that this method only holds a single sector at a time of 512 bytes. If you write to the file using FSC! or FS! or FPUT etc then Tachyon will automatically flush it to the card when it needs to.


    As for the matter of formatting there shouldn't be any problems although for some reason Microsoft do not properly implement formatting for Flash devices despite knowing that there should be a difference. If you want to do it properly just as it was formatted in the factory, then try using this formatter from the SD card association itself.

    Peter
  • Thanks a lot for your fast answer @"Peter Jakacki" .

    Formating the SD Card with your recommended tool fixed our problem.
    At least we were able to use the Tachyon Words from EASYFILE.FTH as expected.

    Best regards!
  • I found the bug that required enter to be hit twice and fixed it. Just reload the kernel + EXTEND + EASYFILE although I will update the binaries for this today.
    ...  FOPEN HOME.HTM --> ...opened at 01D4.A100 for 68037 
    ...  0 $40 FS DUMP --> 
    0000.0000:   3C 21 44 4F  43 54 59 50  45 20 68 74  6D 6C 20 50    <!DOCTYPE html P
    0000.0010:   55 42 4C 49  43 20 22 2D  2F 2F 57 33  43 2F 2F 44    UBLIC "-//W3C//D
    0000.0020:   54 44 20 48  54 4D 4C 20  34 2E 30 31  2F 2F 45 4E    TD HTML 4.01//EN
    0000.0030:   22 20 22 68  74 74 70 3A  2F 2F 77 77  77 2E 77 33    " "http://www.w3 ok
    ...  $33 FSADR 17 CTYPE --> http://www.w3.org ok
    ...  
    
Sign In or Register to comment.