Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
212fe7f3
Commit
212fe7f3
authored
Apr 08, 2021
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extmod/extmod.cmake: Add support to build btree module with CMake.
Signed-off-by:
Damien George
<
damien@micropython.org
>
parent
5dcc9b3b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
1 deletion
+49
-1
extmod/extmod.cmake
extmod/extmod.cmake
+48
-0
ports/esp32/main/CMakeLists.txt
ports/esp32/main/CMakeLists.txt
+1
-1
No files found.
extmod/extmod.cmake
View file @
212fe7f3
...
...
@@ -4,6 +4,8 @@ set(MICROPY_EXTMOD_DIR "${MICROPY_DIR}/extmod")
set
(
MICROPY_OOFATFS_DIR
"
${
MICROPY_DIR
}
/lib/oofatfs"
)
set
(
MICROPY_SOURCE_EXTMOD
${
MICROPY_DIR
}
/lib/embed/abort_.c
${
MICROPY_DIR
}
/lib/utils/printf.c
${
MICROPY_EXTMOD_DIR
}
/machine_i2c.c
${
MICROPY_EXTMOD_DIR
}
/machine_mem.c
${
MICROPY_EXTMOD_DIR
}
/machine_pulse.c
...
...
@@ -43,3 +45,49 @@ set(MICROPY_SOURCE_EXTMOD
${
MICROPY_EXTMOD_DIR
}
/virtpin.c
${
MICROPY_EXTMOD_DIR
}
/nimble/modbluetooth_nimble.c
)
# Library for btree module and associated code
set
(
MICROPY_LIB_BERKELEY_DIR
"
${
MICROPY_DIR
}
/lib/berkeley-db-1.xx"
)
if
(
EXISTS
"
${
MICROPY_LIB_BERKELEY_DIR
}
/btree/bt_close.c"
)
add_library
(
micropy_extmod_btree OBJECT
${
MICROPY_LIB_BERKELEY_DIR
}
/btree/bt_close.c
${
MICROPY_LIB_BERKELEY_DIR
}
/btree/bt_conv.c
${
MICROPY_LIB_BERKELEY_DIR
}
/btree/bt_debug.c
${
MICROPY_LIB_BERKELEY_DIR
}
/btree/bt_delete.c
${
MICROPY_LIB_BERKELEY_DIR
}
/btree/bt_get.c
${
MICROPY_LIB_BERKELEY_DIR
}
/btree/bt_open.c
${
MICROPY_LIB_BERKELEY_DIR
}
/btree/bt_overflow.c
${
MICROPY_LIB_BERKELEY_DIR
}
/btree/bt_page.c
${
MICROPY_LIB_BERKELEY_DIR
}
/btree/bt_put.c
${
MICROPY_LIB_BERKELEY_DIR
}
/btree/bt_search.c
${
MICROPY_LIB_BERKELEY_DIR
}
/btree/bt_seq.c
${
MICROPY_LIB_BERKELEY_DIR
}
/btree/bt_split.c
${
MICROPY_LIB_BERKELEY_DIR
}
/btree/bt_utils.c
${
MICROPY_LIB_BERKELEY_DIR
}
/mpool/mpool.c
)
target_include_directories
(
micropy_extmod_btree PRIVATE
${
MICROPY_LIB_BERKELEY_DIR
}
/PORT/include
)
target_compile_definitions
(
micropy_extmod_btree PRIVATE
__DBINTERFACE_PRIVATE=1
mpool_error=printf
abort=abort_
"virt_fd_t=void*"
)
# The include directories and compile definitions below are needed to build
# modbtree.c and should be added to the main MicroPython target.
list
(
APPEND MICROPY_INC_CORE
"
${
MICROPY_LIB_BERKELEY_DIR
}
/PORT/include"
)
list
(
APPEND MICROPY_DEF_CORE
__DBINTERFACE_PRIVATE=1
"virt_fd_t=void*"
)
endif
()
ports/esp32/main/CMakeLists.txt
View file @
212fe7f3
...
...
@@ -3,10 +3,10 @@ get_filename_component(MICROPY_DIR ${PROJECT_DIR}/../.. ABSOLUTE)
# Include core source components.
include
(
${
MICROPY_DIR
}
/py/py.cmake
)
include
(
${
MICROPY_DIR
}
/extmod/extmod.cmake
)
if
(
NOT CMAKE_BUILD_EARLY_EXPANSION
)
include
(
${
MICROPY_DIR
}
/py/usermod.cmake
)
include
(
${
MICROPY_DIR
}
/extmod/extmod.cmake
)
endif
()
set
(
MICROPY_QSTRDEFS_PORT
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment