Commit Graph

15 Commits

Author SHA1 Message Date
Marti Bolivar 427159bf95 zephyr: fix ffconf.h override use of STRINGIZE
This is a "standard" macro name that we shouldn't be overriding.
Namespace this with an FFCONF_ prefix to avoid clashes with other
modules, such as the one currently observed in this twister error:

In file included from /__w/zephyr/modules/fs/fatfs/include/ff.h:29,
                 from /__w/zephyr/zephyr/subsys/fs/fat_fs.c:16:
/__w/zephyr/modules/fs/fatfs/include/ffconf.h:295: error: "STRINGIZE" redefined [-Werror]
  295 | #define STRINGIZE(x) STRINGIZE_AGAIN(x)
      |
In file included from /__w/zephyr/modules/hal/silabs/gecko/emlib/inc/em_common.h:34,
                 from /__w/zephyr/modules/hal/silabs/gecko/emlib/inc/em_core.h:34,
                 from /__w/zephyr/modules/hal/silabs/gecko/emlib/inc/em_bus.h:34,
                 from ../../../../../../../soc/arm/silabs_exx32/efm32gg11b/soc.h:25,
                 from ../../../../../../../include/zephyr/arch/arm/aarch32/cortex_m/cmsis.h:19,
                 from ../../../../../../../include/zephyr/arch/arm/aarch32/mpu/arm_mpu_v7m.h:11,
                 from ../../../../../../../include/zephyr/arch/arm/aarch32/mpu/arm_mpu.h:14,
                 from ../../../../../../../include/zephyr/arch/arm/aarch32/arch.h:266,
                 from ../../../../../../../include/zephyr/arch/cpu.h:19,
                 from ../../../../../../../include/zephyr/kernel_includes.h:33,
                 from ../../../../../../../include/zephyr/kernel.h:17,
                 from /__w/zephyr/zephyr/subsys/fs/fat_fs.c:9:
/__w/zephyr/modules/hal/silabs/gecko/common/inc/sl_common.h:82: note: this is the location of the previous definition
   82 | #define STRINGIZE(X) #X
      |
cc1: all warnings being treated as errors

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2023-01-16 13:07:44 +01:00
Dominik Ermel 89f53db020 fs: Update driver to version 0.15 w/patch1
The commit updates driver, with changes that have appeared
since last update to version 0.14b, and applies Zephyr compatibility
patches to where required.

Origin: ELM Chan (http://elm-chan.org)
Project URL: http://elm-chan.org/fsw/ff/00index_e.html
Sources: http://elm-chan.org/fsw/ff/arc/ff15.zip
Sources package SHA256:
  9b8704000eb8823dc27314f63899d42c995c3f5e4e0be06382c98c90331e01a2

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-12-06 17:45:19 +01:00
Dominik Ermel 38f303ad09 zephyr: Add ffconf.h override with ZEPHYR_CONFIG_OVERRIDE
ffconf.h gets extended with Zephyr specific code that allows
to include ZEPHYR_CONFIG_OVERRIDE pointed header file with
definitions that override ffconf.h.

This way changes to ffconf.h can be stored with Zephyr directory
tree and it should be easier to update ffconf.h from newer
versions of ELM FAT source.

This allows greater flexibility in doing configuration logic
on Zephyr side.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-18 10:07:39 +01:00
Dominik Ermel 00f7bf679b zephyr: Revert ffconf.h file to umodified R0.14b version
Reverting.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-11-18 10:07:39 +01:00
Boon Khai Ng 9237454a30 fat_fs: Add support for the "win" variable alignment in FATFS struct
This is to support Sypnosys Designware SDMMC controller read and write
operation where the buffer address is needed to be 16bytes and 512bytes
aligned. Adding macro FS_FATFS_WINDOW_ALIGNMENT to align the "win"
variable address in FATFS struct.

Signed-off-by: Boon Khai Ng <boon.khai.ng@intel.com>
2022-01-21 09:52:20 +01:00
Dominik Ermel 94fcd6bfb3 fs: Update driver to version 0.14b
The commit updates driver, with changes that have appeared
since last update to version 0.12b, and applies Zephyr compatibility
patches to where required.

Origin: ELM Chan (http://elm-chan.org)
Project URL: http://elm-chan.org/fsw/ff/00index_e.html
Sources: http://elm-chan.org/fsw/ff/arc/ff14b.zip
Sources package SHA256:
  134d2ce89a96d601c564287387025a852efde9730ad5ecb35d59461658ba8b5f

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-08-16 19:50:40 +02:00
Markus Fuchs 237778d3f1 fat_fs: Add support for variable sector size
Add support for variable sector sizes by exposing _MAX_SS as
CONFIG_FS_FATFS_MAX_SS to Kconfig and adding the GET_SECTOR_SIZE IOCTL.

Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
2020-11-05 22:09:34 -06:00
Markus Fuchs 1d1fcc725a fat_fs: Expose _VOLUMES to Kconfig
Expose _VOLUMES as CONFIG_FS_FATFS_VOLUMES to Kconfig to be able to
adjust the number of used logical drives.

Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
2020-11-03 03:17:06 -06:00
Dominik Ermel 320e2c06ef fs: Expose _FS_READONLY and _USE_MKFS to Kconfig
FAT FS config mapping:
  _FS_READONLY  as CONFIG_FS_FATFS_READ_ONLY
  _FS_MKFS      as CONFIG_FS_MKFS

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2020-10-19 18:39:46 +02:00
Jui-Chou Chung 13697783bf fs: Add kconfig option for enabling exFAT support
Add Kconfig options for exposing the support of exFAT

Signed-off-by: Jui-Chou Chung <jui-chou.chung@nordicsemi.no>
2020-08-13 12:07:31 +02:00
Audun Korneliussen 9ee6b9b951 fs: Expose _USE_LFN, _MAX_LFN, and _CODE_PAGE as kconfig options.
When _USE_LFN is 0 (default), filenames are restricted to 8.3 format.
It's useful to have long filenames as an easily configurable option.
_MAX_LFN and _CODE_PAGE are closely related parameters that determines
character set and max filename length.

Note that value of _USE_LFN determines if LFN working buffer is placed in
BSS, stack, or heap.

Signed-off-by: Audun Korneliussen <audun.korneliussen@nordicsemi.no>
2020-01-23 15:11:28 +01:00
Ramakrishna Pallala 75d48a71ce subsys: disk: Add support for multiple disk interfaces
Add support for enabling multiple disk interfaces (Flash, RAM)
simultaneously in Zephyr by introducing a simple disk interface
framework where we can register multiple disks which would
interface with different storage devices. This would enable us
to have multiple instances of FATFS in Zephyr.

Add support for mass storage drive disk name which will be
used as an argument when calling the disk interface API's.

Enable multiple volumes support configuration in
ELM FAT library.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-05-08 08:53:01 -04:00
Ramesh Thomas 165aec8e3c fs: Update external FAT FS source with new rev 0.12b
Update elm-chan FAT FS with latest sources. Updated README with changes
made to default configurations.

Change-Id: I3c868479506042d174ac7df360ce62931d8ac5af
Jira: ZEP-1338
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2017-01-25 05:31:14 +00:00
Ramesh Thomas e056fb95b3 fs: PUll in rev 0.12a of open source FAT FS code
Update latest revision of the FAT FS code.

Origin: ELM Chan
URL: http://elm-chan.org/fsw/ff/00index_e.html
Change-Id: I602c239055c171595a46986eaa774298117055b6
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-07-20 15:06:36 +00:00
Ramesh Thomas 7fe32b2eca fs: [WIP] Pull in open source FAT FS implementation
This implements the top layer of the FAT FS. It exports an user API
that would be abstacted by Zephyr FS API. It has another set of API
to interface with a bottom layer that would provide platform specific
file systems. A flash file system will be implemented for the bottom
layer.

Jira: ZEP-285
Origin: ELM Chan
URL: http://elm-chan.org/fsw/ff/00index_e.html
Change-Id: Id7c99dbdac9612b1a597bd8099b8a528824afae9
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-06-29 05:17:57 +00:00