2019-08-01 00:34:44 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 3.13.1)
|
2020-05-29 08:58:50 +08:00
|
|
|
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
2019-08-01 00:34:44 +08:00
|
|
|
project(littlefs)
|
|
|
|
|
|
|
|
FILE(GLOB app_sources src/*.c)
|
2020-06-19 22:29:47 +08:00
|
|
|
# LittleFS opens files for RW by default if no flags given and crashes,
|
|
|
|
# instead of returning error when attempting to perform operation that
|
|
|
|
# a file has not been opened for.
|
|
|
|
target_compile_definitions(app PRIVATE
|
|
|
|
BYPASS_FS_OPEN_FLAGS_LFS_ASSERT_CRASH
|
|
|
|
BYPASS_FS_OPEN_FLAGS_LFS_RW_IS_DEFAULT
|
|
|
|
)
|
|
|
|
target_sources(app PRIVATE ${app_sources} ../common/test_fs_open_flags.c)
|