birla 0 Posted January 2, 2018 Share Posted January 2, 2018 I'm trying to interface sd card module to msp430f5529 using Energia. I tried these methods https://43oh.com/2013/12/interfacing-the-launchpad-to-an-sd-card-a-walkthrough/ and download sd library from GitHub. both are giving errors. can anyone help me out with this errors? Quote Link to post Share on other sites
bluehash 1,581 Posted January 2, 2018 Share Posted January 2, 2018 @birla, welcome to 43oh. Can you also look through the below post and make sure to post your errors. Saying "Giving me errors" is hard to debug. Quote Link to post Share on other sites
energia 485 Posted January 2, 2018 Share Posted January 2, 2018 It happens to be that DIR is defined in a driverlib header file for the F5529 in msp430f5xx_6xxgeneric.h. The library was originally tested on the G2553 which did not have this define. The work around is to edit the file pff.h in the libraries utility folder. Look for: #define _FATFS The just underneath that add: #ifdef DIR #undef DIR #endif There is one other file which unfortunately has a hardcoded path to SPI.h. Edit the file pfatfs.h and then change the include of SPI.h to #include <SPI.h> like the below: #if _SoftSPI < 1 #include <SPI.h> #endif With those changes it compiles for me but don't have the hardware right now to test it on the F5529. Robert birla 1 Quote Link to post Share on other sites
birla 0 Posted January 3, 2018 Author Share Posted January 3, 2018 Files are compiled alright. Should need to change the pins of spi port of msp430f5529 Quote Link to post Share on other sites
birla 0 Posted January 3, 2018 Author Share Posted January 3, 2018 I'm getting the output on the serial monitor. but the values are not storing in the memory card. log file remains same Quote Link to post Share on other sites
energia 485 Posted January 3, 2018 Share Posted January 3, 2018 How do you have the SD card connected to the LaunchPad? Through the SD Card BoosterPack or wired to some other SD Card breakout board? Can you list the connections from the LaunchPad headers to the SD card? Robert Quote Link to post Share on other sites
birla 0 Posted January 9, 2018 Author Share Posted January 9, 2018 I cleared all error and it was working for 2-3 days. Again some errors coming like that Energia: 1.6.10E18 (Windows 7), Board: "MSP-EXP430F5529LP" libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::DLY100U()': pfatfs.cpp:(.text._ZN4PFFS7DLY100UEv+0x0): multiple definition of `PFFS::DLY100U()' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS7DLY100UEv+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::SPI_SEND(unsigned char)': pfatfs.cpp:(.text._ZN4PFFS8SPI_SENDEh+0x0): multiple definition of `PFFS::SPI_SEND(unsigned char)' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS8SPI_SENDEh+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::SPI_RECEIVE()': pfatfs.cpp:(.text._ZN4PFFS11SPI_RECEIVEEv+0x0): multiple definition of `PFFS::SPI_RECEIVE()' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS11SPI_RECEIVEEv+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::CS_READ()': pfatfs.cpp:(.text._ZN4PFFS7CS_READEv+0x0): multiple definition of `PFFS::CS_READ()' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS7CS_READEv+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o:(.bss._ZN4PFFS2CSE+0x0): multiple definition of `PFFS::CS' sketch\pfatfs.cpp.o:(.bss._ZN4PFFS2CSE+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::CS_HIGH()': pfatfs.cpp:(.text._ZN4PFFS7CS_HIGHEv+0x0): multiple definition of `PFFS::CS_HIGH()' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS7CS_HIGHEv+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::CS_LOW()': pfatfs.cpp:(.text._ZN4PFFS6CS_LOWEv+0x0): multiple definition of `PFFS::CS_LOW()' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS6CS_LOWEv+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::PFFS()': pfatfs.cpp:(.text._ZN4PFFSC2Ev+0x0): multiple definition of `PFFS::PFFS()' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFSC2Ev+0x0): first defined here libraries\PFatFs\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)' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS15SPI_SET_DIVIDEREh+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::disk_init()': pfatfs.cpp:(.text._ZN4PFFS9disk_initEv+0x0): multiple definition of `PFFS::disk_init()' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS9disk_initEv+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o:(.data._clkdivider+0x0): multiple definition of `_clkdivider' sketch\pfatfs.cpp.o:(.data._clkdivider+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::mount(FATFS*)': pfatfs.cpp:(.text._ZN4PFFS5mountEP5FATFS+0x0): multiple definition of `PFFS::mount(FATFS*)' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS5mountEP5FATFS+0x0): first defined here libraries\PFatFs\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)' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS5beginEhh+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o:(.bss._ZN4PFFS9fatfs_objE+0x0): multiple definition of `PFFS::fatfs_obj' sketch\pfatfs.cpp.o:(.bss._ZN4PFFS9fatfs_objE+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o:(.bss._ZN4PFFS7dir_objE+0x0): multiple definition of `PFFS::dir_obj' sketch\pfatfs.cpp.o:(.bss._ZN4PFFS7dir_objE+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::begin(unsigned char)': pfatfs.cpp:(.text._ZN4PFFS5beginEh+0x0): multiple definition of `PFFS::begin(unsigned char)' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS5beginEh+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::open(char const*)': pfatfs.cpp:(.text._ZN4PFFS4openEPKc+0x0): multiple definition of `PFFS::open(char const*)' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS4openEPKc+0x0): first defined here libraries\PFatFs\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*)' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS4readEPvtPt+0x0): first defined here libraries\PFatFs\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*)' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS5writeEPKvtPt+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::close()': pfatfs.cpp:(.text._ZN4PFFS5closeEv+0x0): multiple definition of `PFFS::close()' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS5closeEv+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::lseek(unsigned long)': pfatfs.cpp:(.text._ZN4PFFS5lseekEm+0x0): multiple definition of `PFFS::lseek(unsigned long)' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS5lseekEm+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::opendir(DIR*, char const*)': pfatfs.cpp:(.text._ZN4PFFS7opendirEP3DIRPKc+0x0): multiple definition of `PFFS::opendir(DIR*, char const*)' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS7opendirEP3DIRPKc+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::opendir(char const*)': pfatfs.cpp:(.text._ZN4PFFS7opendirEPKc+0x0): multiple definition of `PFFS::opendir(char const*)' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS7opendirEPKc+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::opendir()': pfatfs.cpp:(.text._ZN4PFFS7opendirEv+0x0): multiple definition of `PFFS::opendir()' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS7opendirEv+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::readdir(DIR*, FILINFO*)': pfatfs.cpp:(.text._ZN4PFFS7readdirEP3DIRP7FILINFO+0x0): multiple definition of `PFFS::readdir(DIR*, FILINFO*)' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS7readdirEP3DIRP7FILINFO+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::readdir(FILINFO*)': pfatfs.cpp:(.text._ZN4PFFS7readdirEP7FILINFO+0x0): multiple definition of `PFFS::readdir(FILINFO*)' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS7readdirEP7FILINFO+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::readdir()': pfatfs.cpp:(.text._ZN4PFFS7readdirEv+0x0): multiple definition of `PFFS::readdir()' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS7readdirEv+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::gets(char*, unsigned short)': pfatfs.cpp:(.text._ZN4PFFS4getsEPct+0x0): multiple definition of `PFFS::gets(char*, unsigned short)' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS4getsEPct+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::fputc(char)': pfatfs.cpp:(.text._ZN4PFFS5fputcEc+0x0): multiple definition of `PFFS::fputc(char)' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS5fputcEc+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::puts(char const*)': pfatfs.cpp:(.text._ZN4PFFS4putsEPKc+0x0): multiple definition of `PFFS::puts(char const*)' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS4putsEPKc+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::printf(char const*, ...)': pfatfs.cpp:(.text._ZN4PFFS6printfEPKcz+0x0): multiple definition of `PFFS::printf(char const*, ...)' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFS6printfEPKcz+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o:(.bss.FatFs+0x0): multiple definition of `FatFs' sketch\pfatfs.cpp.o:(.bss.FatFs+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o:(.bss._ZN4PFFS3fnoE+0x0): multiple definition of `PFFS::fno' sketch\pfatfs.cpp.o:(.bss._ZN4PFFS3fnoE+0x0): first defined here libraries\PFatFs\pfatfs.cpp.o: In function `PFFS::PFFS()': pfatfs.cpp:(.text._ZN4PFFSC2Ev+0x0): multiple definition of `PFFS::PFFS()' sketch\pfatfs.cpp.o:pfatfs.cpp:(.text._ZN4PFFSC2Ev+0x0): first defined here collect2: ld returned 1 exit status exit status 1 Error compiling for board MSP-EXP430F5529LP. This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. Quote Link to post Share on other sites
LiviuM 43 Posted January 9, 2018 Share Posted January 9, 2018 You have the PFatFs library files twice in the Energia's searching path, once in the library/PFatFs folder and once in the sketch folder. energia 1 Quote Link to post Share on other sites
birla 0 Posted January 9, 2018 Author Share Posted January 9, 2018 Yea solved the working perfectly. Can we access the sd card using USB interface through serial port(UART)? I want it like pen drive interface while connecting to pc Quote Link to post Share on other sites
NurseBob 111 Posted January 10, 2018 Share Posted January 10, 2018 On 1/9/2018 at 12:51 AM, birla said: ...Can we access the sd card using USB interface through serial port(UART)? I want it like pen drive interface while connecting to pc For USB access you'll need to use CCS/IAR or similar and the TI MSPWare USB libraries for the communication (look in particular at the both HID and CDC protocols), and you will have to code the interface between the USB messaging protocol to transfer data between the PC and the MSP430<->SD card. I don't think there's an Energia-based way to use the USB connection, and to transfer data between USB and UART would require you writing that code as well. 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.