nuttx/fs/littlefs/Make.defs
Xiang Xiao 9f44417de4 fs/lfs: Update version to 2.4.0
And redirect assert and log to NuttX's version
which is possible after:
commit c0cc0a417e727764ccce6f1284e3570898d750e6
Author: Christopher Haster <chaster@utexas.edu>
Date:   Mon Jan 18 14:01:53 2021 -0600

    Enabled overriding of LFS_ASSERT/TRACE/DEBUG/etc

    This is useful for testing the new erroring assert behavior in CI.
    Asserts do not error by default, so this macro needs to be overriden.

    It is possible to test this behavior using the existing option of
    overriding lfs_util.h with a custom file, by using a small sed
    one-line script. But this is much simpler.

    This does raise the question if more of the configuration options in
    lfs_util.h should be opened up for function-like macro overrides.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie70814e1a2777e19a7310358d3a94ff965287d7b
2021-04-03 21:00:41 +01:00

59 lines
1.9 KiB
Plaintext

############################################################################
# fs/littlefs/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################
ifeq ($(CONFIG_FS_LITTLEFS),y)
# Files required for littlefs file system support
CSRCS += lfs_vfs.c
DEPPATH += --dep-path littlefs
VPATH += :littlefs
CSRCS += lfs.c lfs_util.c
DEPPATH += --dep-path littlefs/littlefs
VPATH += :littlefs/littlefs
CFLAGS += -DLFS_TRACE=finfo
CFLAGS += -DLFS_DEBUG=finfo
CFLAGS += -DLFS_WARN=fwarn
CFLAGS += -DLFS_ERROR=ferr
CFLAGS += -DLFS_ASSERT=DEBUGASSERT
LITTLEFS_VERSION ?= 2.4.0
LITTLEFS_TARBALL = v$(LITTLEFS_VERSION).tar.gz
$(LITTLEFS_TARBALL):
$(Q) curl -L -o littlefs/$(LITTLEFS_TARBALL) https://github.com/ARMmbed/littlefs/archive/$(LITTLEFS_TARBALL)
.littlefsunpack: $(LITTLEFS_TARBALL)
$(Q) tar zxf littlefs/$(LITTLEFS_TARBALL) -C littlefs
$(Q) mv littlefs/littlefs-$(LITTLEFS_VERSION) littlefs/littlefs
$(Q) touch littlefs/.littlefsunpack
context:: .littlefsunpack
distclean::
$(call DELFILE, littlefs/.littlefsunpack)
$(call DELFILE, littlefs/$(LITTLEFS_TARBALL))
$(call DELDIR, littlefs/littlefs)
endif