Leinad89mlg 0 Posted July 10, 2015 Share Posted July 10, 2015 Hi, my name is Daniel and I have a problem when I try to interface an SD-Card with my MSP430. I have followed the tutorial "Interfacing An SD-Card To The Launchpad Quote Link to post Share on other sites
bluehash 1,581 Posted July 10, 2015 Share Posted July 10, 2015 Hi, my name is Daniel and I have a problem when I try to interface an SD-Card with my MSP430. I have followed the tutorial "Interfacing An SD-Card To The Launchpad Quote Link to post Share on other sites
Leinad89mlg 0 Posted July 12, 2015 Author Share Posted July 12, 2015 Thank you for yor reply. I watched this thread few weeks ago but i can Quote Link to post Share on other sites
Fmilburn 445 Posted July 13, 2015 Share Posted July 13, 2015 Hello @@Leinad89mlg In the thread @@bluehash gave above is a posting on 22 February 2014 - 03:47 AM by Thorvard. The post explains that for the F5529 you must rename all "DIR" references in the Petit-FATFS library and example for it to work. This is due to "DIR" already being defined in the F5529 version of Energia. I've renamed all references to DIR in my library and it compiles for me. I'm waiting for my SD to arrive so I can test it further. Hope this works for you.... Quote Link to post Share on other sites
Leinad89mlg 0 Posted July 13, 2015 Author Share Posted July 13, 2015 Thank you for your reply Fmilburn I've renamed all references to DIR but the code won't compile. The new error is as follows: SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::DLY100U()': pfatfs.cpp:(.text._ZN4PFFS7DLY100UEv+0x0): multiple definition of `PFFS::DLY100U()' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS7DLY100UEv+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::SPI_SEND(unsigned char)': pfatfs.cpp:(.text._ZN4PFFS8SPI_SENDEh+0x0): multiple definition of `PFFS::SPI_SEND(unsigned char)' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS8SPI_SENDEh+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::SPI_RECEIVE()': pfatfs.cpp:(.text._ZN4PFFS11SPI_RECEIVEEv+0x0): multiple definition of `PFFS::SPI_RECEIVE()' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS11SPI_RECEIVEEv+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::CS_READ()': pfatfs.cpp:(.text._ZN4PFFS7CS_READEv+0x0): multiple definition of `PFFS::CS_READ()' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS7CS_READEv+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o:(.bss._ZN4PFFS2CSE+0x0): multiple definition of `PFFS::CS' pfatfs.cpp.o:(.bss._ZN4PFFS2CSE+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::CS_HIGH()': pfatfs.cpp:(.text._ZN4PFFS7CS_HIGHEv+0x0): multiple definition of `PFFS::CS_HIGH()' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS7CS_HIGHEv+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::CS_LOW()': pfatfs.cpp:(.text._ZN4PFFS6CS_LOWEv+0x0): multiple definition of `PFFS::CS_LOW()' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS6CS_LOWEv+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::PFFS()': pfatfs.cpp:(.text._ZN4PFFSC2Ev+0x0): multiple definition of `PFFS::PFFS()' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFSC2Ev+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::SPI_SET_DIVIDER(unsigned char)': pfatfs.cpp:(.text._ZN4PFFS15SPI_SET_DIVIDEREh+0x0): multiple definition of `PFFS::SPI_SET_DIVIDER(unsigned char)' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS15SPI_SET_DIVIDEREh+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::disk_init()': pfatfs.cpp:(.text._ZN4PFFS9disk_initEv+0x0): multiple definition of `PFFS::disk_init()' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS9disk_initEv+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o:(.data._clkdivider+0x0): multiple definition of `_clkdivider' pfatfs.cpp.o:(.data._clkdivider+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::mount(FATFS*)': pfatfs.cpp:(.text._ZN4PFFS5mountEP5FATFS+0x0): multiple definition of `PFFS::mount(FATFS*)' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS5mountEP5FATFS+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::begin(unsigned char, unsigned char)': pfatfs.cpp:(.text._ZN4PFFS5beginEhh+0x0): multiple definition of `PFFS::begin(unsigned char, unsigned char)' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS5beginEhh+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o:(.bss._ZN4PFFS9fatfs_objE+0x0): multiple definition of `PFFS::fatfs_obj' pfatfs.cpp.o:(.bss._ZN4PFFS9fatfs_objE+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o:(.bss._ZN4PFFS7dir_objE+0x0): multiple definition of `PFFS::dir_obj' pfatfs.cpp.o:(.bss._ZN4PFFS7dir_objE+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::begin(unsigned char)': pfatfs.cpp:(.text._ZN4PFFS5beginEh+0x0): multiple definition of `PFFS::begin(unsigned char)' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS5beginEh+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::open(char const*)': pfatfs.cpp:(.text._ZN4PFFS4openEPKc+0x0): multiple definition of `PFFS::open(char const*)' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS4openEPKc+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::read(void*, unsigned short, unsigned short*)': pfatfs.cpp:(.text._ZN4PFFS4readEPvtPt+0x0): multiple definition of `PFFS::read(void*, unsigned short, unsigned short*)' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS4readEPvtPt+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::write(void const*, unsigned short, unsigned short*)': pfatfs.cpp:(.text._ZN4PFFS5writeEPKvtPt+0x0): multiple definition of `PFFS::write(void const*, unsigned short, unsigned short*)' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS5writeEPKvtPt+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::close()': pfatfs.cpp:(.text._ZN4PFFS5closeEv+0x0): multiple definition of `PFFS::close()' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS5closeEv+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::lseek(unsigned long)': pfatfs.cpp:(.text._ZN4PFFS5lseekEm+0x0): multiple definition of `PFFS::lseek(unsigned long)' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS5lseekEm+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::opendir(_DIR*, char const*)': pfatfs.cpp:(.text._ZN4PFFS7opendirEP4_DIRPKc+0x0): multiple definition of `PFFS::opendir(_DIR*, char const*)' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS7opendirEP4_DIRPKc+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::opendir(char const*)': pfatfs.cpp:(.text._ZN4PFFS7opendirEPKc+0x0): multiple definition of `PFFS::opendir(char const*)' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS7opendirEPKc+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::opendir()': pfatfs.cpp:(.text._ZN4PFFS7opendirEv+0x0): multiple definition of `PFFS::opendir()' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS7opendirEv+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::readdir(_DIR*, FILINFO*)': pfatfs.cpp:(.text._ZN4PFFS7readdirEP4_DIRP7FILINFO+0x0): multiple definition of `PFFS::readdir(_DIR*, FILINFO*)' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS7readdirEP4_DIRP7FILINFO+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::readdir(FILINFO*)': pfatfs.cpp:(.text._ZN4PFFS7readdirEP7FILINFO+0x0): multiple definition of `PFFS::readdir(FILINFO*)' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS7readdirEP7FILINFO+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::readdir()': pfatfs.cpp:(.text._ZN4PFFS7readdirEv+0x0): multiple definition of `PFFS::readdir()' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS7readdirEv+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::gets(char*, unsigned short)': pfatfs.cpp:(.text._ZN4PFFS4getsEPct+0x0): multiple definition of `PFFS::gets(char*, unsigned short)' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS4getsEPct+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::fputc(char)': pfatfs.cpp:(.text._ZN4PFFS5fputcEc+0x0): multiple definition of `PFFS::fputc(char)' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS5fputcEc+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::puts(char const*)': pfatfs.cpp:(.text._ZN4PFFS4putsEPKc+0x0): multiple definition of `PFFS::puts(char const*)' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS4putsEPKc+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::printf(char const*, ...)': pfatfs.cpp:(.text._ZN4PFFS6printfEPKcz+0x0): multiple definition of `PFFS::printf(char const*, ...)' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS6printfEPKcz+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o:(.bss.FatFs+0x0): multiple definition of `FatFs' pfatfs.cpp.o:(.bss.FatFs+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o:(.bss._ZN4PFFS3fnoE+0x0): multiple definition of `PFFS::fno' pfatfs.cpp.o:(.bss._ZN4PFFS3fnoE+0x0): first defined here SDCardTutorialWithEnergia\pfatfs.cpp.o: In function `PFFS::PFFS()': pfatfs.cpp:(.text._ZN4PFFSC2Ev+0x0): multiple definition of `PFFS::PFFS()' pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFSC2Ev+0x0): first defined here collect2: ld returned 1 exit status Can you send me your Petit-FATFS library please ?? I am desperate ... Quote Link to post Share on other sites
Fmilburn 445 Posted July 13, 2015 Share Posted July 13, 2015 @@Leinad89mlg Here is a link: https://github.com/fmilburn3/PFatFs - you should download and use all of the files here associated with PFatFs since I can't remember which ones I changed. I've not been able to test it but it compiles for me. The only thing I did was to change all instances of "DIR" to "DIRECT". So remember that when you instantiate something. It is a less than satisfactory fix but hopefully works - let me know if it does. bluehash and Leinad89mlg 2 Quote Link to post Share on other sites
Leinad89mlg 0 Posted July 20, 2015 Author Share Posted July 20, 2015 Thank you Fmilburn. I have downloaded your PFatFs library and it works very fine with my MSP430F5529 and the SD Card. The code compiles perfect. Quote Link to post Share on other sites
WilliamMacedo 0 Posted October 2, 2015 Share Posted October 2, 2015 Hi ! I download it noticed that using this library the code really compiles well. But I would like to know if you got succeed writing something in the SD Card. The Serial Monitor shows me an error message with rc = 6. I am using the same uC as you, MSP430F5529 - LaunchPad. Thank you very much ! Quote Link to post Share on other sites
Fmilburn 445 Posted October 2, 2015 Share Posted October 2, 2015 @@WilliamMacedo It has apparently worked for others - I never got a chance to test the code I posted above with the F5529. According to previous threads rc = 6 can result from different causes. Try reading through the thread from bluehash posted above and also this tutorial if you haven't already done so. Good luck... WilliamMacedo 1 Quote Link to post Share on other sites
WilliamMacedo 0 Posted October 6, 2015 Share Posted October 6, 2015 Thank you @@Fmilburn. I have already read this thread. I will keep looking for a solution. Thanks. 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.