Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

FatFs config file conflict

Hello!

For a project I'm working on, there is the need to use a microSD card. In the past I have used a custom FatFs port (was using SDK 6), but now I was happy to discover that the SDK version used in this project (12.3) already includes a Nordic port for it!

The problem I'm having is that I need to modify the ffconf.h file, to enable certain features I need.

The nRF5 SDK way of doing it would be to copy this file to the project config folder (next to sdk_config.h) and configure it there. However, since the original file is located in a folder that contains other required header files (such as ff.h), there will be a conflict between two version of the same file (the one I customized, and the original one).

What are your suggestions on how to solve this issue? Maybe some modification on the Makefile?

Altering the original file directly on the SDK folder is quite a big smell...

Thanks!

  • Hello, 

    Unfortunately, the ffconfig.h file does not seem to have a header guard so any don't see any good workaround that does not entail modification of the original file in /external/fatfs. One option could be to copy fatfs to your project directory, then replace the path to \external\fatfs\ with the path to the fats folder in your project directory.  

Related