Forums MPLAB XC8 Tutorial Discussions Chan FatFs

Tagged: , ,

This topic contains 3 replies, has 2 voices, and was last updated by  Bitahwa Bindu 1 week, 5 days ago.

  • Author
    Posts
  • #3361

    k3pto
    Participant

    I am thinking of using the ChaN FS library to access an SD card.  I downloaded your sample program and tried to compile it.  I get quite a few warnings.  Here are a few examples:

    ff.c:2130:: warning: (759) expression generates no code

    ff.c:2603:: warning: (1498) pointer (f_read@br) in expression may have no targets

    mcc_generated_files/spi1.c:111:: warning: (1498) pointer (SPI1_Exchange8bitBuffer@dataOut) in expression may have no targets

    Any ideas on these?

    I also have a question: what file contains the low level SPI code?

    Thank you.

  • #3365

    Bitahwa Bindu
    Keymaster

    Hi. The warnings could be caused by various things. As you provided very little information of the tools you are using, I can’t really guess. This sample project was done some few years ago, a lot has change since then: new FatFs versions, New MCC versions, new MPLAB X IDE versions, new XC8 versions especially the new v2.

    And warnings are not necessarily gonna make your project not to work.

    Are you testing already with hardware?

    The SPI low level functions are handled by MCC. Check the SPI.C and SPI.h files generated by MCC. They’ve got nothing to do with FatFs.

  • #3366

    k3pto
    Participant

    Hi Bitahwa, Thank you for the quick response.  Sorry I forgot to state my environment.

    MPLAB X 5.05,  xc8 v2.0,  FatFs vR0.13b.  I don’t think MCC enters into the issue since I am using your sample project.

    I do not yet have hardware.  I am just doing some preliminary investigations to determine a good starting point.  I am attempting to compare FatFs with the MLA from Microchip.

     

  • #3367

    Bitahwa Bindu
    Keymaster

    It all gonna depends on what you are trying to achieve, the PIC you are using, the amount of resources required and the required features.

    FatFs is quite popular, you might get support from many forums and it regularly maintained. It’s main advantage, it can be used by a variety of microcontrollers, not only the PIC.

    Microchip MLA could be simple to use as it will fit easily together with other microchip tools like MCC but at the moment it does not support 8 bit microocntrollers like PIC16F and PIC18F series only 16 bit microcontrollers.

    You an try both and see the one that will work for you.

You must be logged in to reply to this topic.