This is an automated email from the ASF dual-hosted git repository.
lupyuen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 4442cb78265 drivers/mtd/CMakeLists.txt: Aligned Cmake with Make
4442cb78265 is described below
commit 4442cb7826501fc9178d3c2681ca97fc1745f7c5
Author: simbit18 <[email protected]>
AuthorDate: Wed Oct 8 17:31:09 2025 +0200
drivers/mtd/CMakeLists.txt: Aligned Cmake with Make
Add:
- GD55 QSPI NOR Flash #15523
- nvblk #16789
- virtual NAND Flash device simulator #11806
Signed-off-by: simbit18 <[email protected]>
---
drivers/mtd/CMakeLists.txt | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/drivers/mtd/CMakeLists.txt b/drivers/mtd/CMakeLists.txt
index c50988e663e..339e71f73ee 100644
--- a/drivers/mtd/CMakeLists.txt
+++ b/drivers/mtd/CMakeLists.txt
@@ -56,9 +56,18 @@ if(CONFIG_MTD)
mtd_nandscheme.c
mtd_nandmodel.c
mtd_modeltab.c)
+
if(CONFIG_MTD_NAND_SWECC)
list(APPEND SRCS mtd_nandecc.c hamming.c)
endif()
+
+ if(CONFIG_MTD_NAND_RAM)
+ list(APPEND SRCS mtd_nandram.c)
+ endif()
+
+ if(CONFIG_MTD_NAND_WRAPPER)
+ list(APPEND SRCS mtd_nandwrapper.c)
+ endif()
endif()
if(CONFIG_RAMMTD)
@@ -121,6 +130,10 @@ if(CONFIG_MTD)
list(APPEND SRCS gd25.c)
endif()
+ if(CONFIG_MTD_GD55)
+ list(APPEND SRCS gd55.c)
+ endif()
+
if(CONFIG_MTD_GD5F)
list(APPEND SRCS gd5f.c)
endif()
@@ -181,6 +194,21 @@ if(CONFIG_MTD)
target_include_directories(drivers PRIVATE ${CMAKE_CURRENT_LIST_DIR}/dhara)
endif()
+ if(CONFIG_MTD_NVBLK)
+ if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/nvblk)
+ FetchContent_Declare(
+ nvblk
+ URL https://github.com/Laczen/nvblk/archive/refs/heads/main.zip
+ SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/nvblk BINARY_DIR
+ ${CMAKE_BINARY_DIR}/drivers/mtd/nvblk
+ DOWNLOAD_NO_PROGRESS true)
+ FetchContent_Populate(nvblk)
+ endif()
+
+ list(APPEND SRCS nvblk.c mtd/nvblk/src/nvblk.c)
+ target_include_directories(drivers PRIVATE ${CMAKE_CURRENT_LIST_DIR}/nvblk)
+ endif()
+
if(CONFIG_MTD_CFI)
list(APPEND SRCS mtd_cfi.c)
list(APPEND SRCS cfi.c)