LiviuM 43 Posted October 6, 2016 Share Posted October 6, 2016 Hi Spineless, 1. Downloaded the code and place the entire folder into the Energia folder. I think you should install it as a library. Liviu hemangjoshi37a 1 Quote Link to post Share on other sites
spineless 2 Posted October 6, 2016 Share Posted October 6, 2016 OK... I installed it as a library and compiled it. The same debug dump was the result. Quote Link to post Share on other sites
LiviuM 43 Posted October 6, 2016 Share Posted October 6, 2016 Hi, which board are you using? I've tested now the "PFatFsFileTest" (library) example and it compiles for the launchpads installed by default by Energia (+TivaC), except MSP-EXP430G5529LP. Regards, Liviu hemangjoshi37a 1 Quote Link to post Share on other sites
LiviuM 43 Posted October 6, 2016 Share Posted October 6, 2016 Hi, it seems the file energia-1.6.10E18/hardware/tools/msp430/msp430/include/msp430f5529.h has a problem in the USB definition part. I don't know exactly what for a problem, but I was able to compile the above mentioned sketch after commenting out the USB part in msp430f5529.h (between rows ~3430 and ~4227). Maybe it helps you. Regards, Liviu hemangjoshi37a 1 Quote Link to post Share on other sites
LiviuM 43 Posted October 6, 2016 Share Posted October 6, 2016 Hi, fount it. It seems, the DIR definition in energia-1.6.10E18/hardware/tools/msp430/msp430/include/msp430f5529.h /* USBCTL Control Bits */ #define DIR (0x0001) /* USB - Data Response Bit */ conflicts with the DIR in the energia-1.6.10E18/libraries/PFatFs/utility/pff.h: /* Directory object structure */ typedef struct { WORD index; /* Current read/write index number */ BYTE* fn; /* Pointer to the SFN (in/out) {file[8],ext[3],status[1]} */ CLUST sclust; /* Table start cluster (0:Static table) */ CLUST clust; /* Current cluster */ DWORD sect; /* Current sector */ } DIR; No idea where it will be better to change to remove the conflict, but probably in the PFatFs. Regards, Liviu hemangjoshi37a 1 Quote Link to post Share on other sites
spineless 2 Posted October 6, 2016 Share Posted October 6, 2016 Ok...So how do I change these files? Where are they? How do I change them when they are compiled inside energia. How do I uninstall a library? Silly questions....but if I cannot find the files on my machine I cannot fix them. Feeling.... Spineless Quote Link to post Share on other sites
LiviuM 43 Posted October 6, 2016 Share Posted October 6, 2016 I've changed the DIR with FSDIR in the PFatFs library; I'm attaching the changed library here. Just replace the one on your PC with the attached one.On my PC I've put it in ../energia-1.6.10E18/libraries/PFatFs/You should probably change your sketches too. Regards, Liviu EDIT: updated the library (fixed the examples too). PFatFs.zip hemangjoshi37a 1 Quote Link to post Share on other sites
spineless 2 Posted October 6, 2016 Share Posted October 6, 2016 I am not sure how to remove the old files. I am working with MAC OS X and I do not have a file structure to look at so I cannot simply replace files. Instead I reloaded PFatFs into Energia using the Include Library --> add .ZIP tool. I do not think this worked as I am getting the same error. I tried to delete Energia and redownload it but that did not work either. i guess the settings are saved someplace else. I do not know where. Any help would be great. Spineless Quote Link to post Share on other sites
LiviuM 43 Posted October 6, 2016 Share Posted October 6, 2016 Try to locate (I suppose even Macs have a search program ) the PFatFs directory and delete it. Unzip and put the content of the changed library in place of it. hemangjoshi37a 1 Quote Link to post Share on other sites
spineless 2 Posted October 6, 2016 Share Posted October 6, 2016 Weird thing happened. I just changed DIR to FSDIR...as you mentioned and it compiled. I guess the library got replaced when I copied. Thanks for your help. Spineless. Quote Link to post Share on other sites
LiviuM 43 Posted October 7, 2016 Share Posted October 7, 2016 Hi, Glad to hear it's working for you. Since the changed library seems to work (I've also updated the example and replaced the library in the post above), maybe Calin or a moderator can update the download on the first post of the topic. Liviu hemangjoshi37a 1 Quote Link to post Share on other sites
spineless 2 Posted October 8, 2016 Share Posted October 8, 2016 i am having some issues with the example file. I want to seperate the write and read functions, but I am getting a lot of errors when I attempt to seperate them. I want to write a string of data to the file in the SD card then later read the entire file back. Can you please update your example with this functionality? Subroutines are awesome! If you could simple call a subroutine to write data and then a seperate subrountine to read it that would be great. Spineless Quote Link to post Share on other sites
NaoCanZhiBuHao 0 Posted December 29, 2016 Share Posted December 29, 2016 Hello, This is a port of ChaN Petit FatFS SD library targeted to low RAM microcontrollers and offers a minimal FAT implementation, with limited write support. For more details see http://elm-chan.org/fsw/ff/00index_p.html A lot of credits goes to the main contributors to this topic http://forum.43oh.com/topic/1427-petitefs-fatfs-sdcard-usci-code/ Because this library makes use of the SPI library included in Energia it works for both MSP430 and Stellaris launchpads. With MSP430 I noticed some interference with Serial.print so before every call to the fat library I had to add a small delay. On Stellaris board these are not necessary. Unzip and copy in Energia\hardware\msp430\libraries or Energia\hardware\lm4f\libraries . [uPDATE] See post #15 http://forum.43oh.com/topic/3209-energia-library-petit-fatfs-sd-card-library/#entry30031 [DOWNLOAD LINK] http://forum.43oh.com/index.php?app=core&module=attach§ion=attach&attach_id=3019 Hello, I tried this library on MSP432, but it doesn't work. What changes should I make to make it work. Thanks! Marvin Quote Link to post Share on other sites
hemangjoshi37a 0 Posted May 10, 2017 Share Posted May 10, 2017 On 22/03/2014 at 3:53 AM, PTB said: @@bluehash Awesome. Thanks! I could not find that for the life of me. Cheers PTB how did it helped you man?? please help me from error rc=6... thax... Quote Link to post Share on other sites
hemangjoshi37a 0 Posted May 10, 2017 Share Posted May 10, 2017 I am getting error Quote Failed with rc=3 When i interchange MISO MOSI pins I get error Quote Failed with rc=6 what could be possibly wrong?? Thax in advance... Can someone give me your mobile number please I really want to solve this problem... I will pay 5 $ if anyone can solve my problem... Please help me... Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.