Jump to content
43oh

Recommended Posts

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

Link to post
Share on other sites

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.
 

Link to post
Share on other sites
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.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...