Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
337111ba
Commit
337111ba
authored
8 years ago
by
Paul Sokolovsky
Browse files
Options
Downloads
Patches
Plain Diff
py: Support to build berkeley db 1.85 and "btree" module.
parent
06b783cf
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
py/builtin.h
+1
-0
1 addition, 0 deletions
py/builtin.h
py/objmodule.c
+3
-0
3 additions, 0 deletions
py/objmodule.c
py/py.mk
+25
-0
25 additions, 0 deletions
py/py.mk
with
29 additions
and
0 deletions
py/builtin.h
+
1
−
0
View file @
337111ba
...
...
@@ -113,6 +113,7 @@ extern const mp_obj_module_t mp_module_lwip;
extern
const
mp_obj_module_t
mp_module_websocket
;
extern
const
mp_obj_module_t
mp_module_webrepl
;
extern
const
mp_obj_module_t
mp_module_framebuf
;
extern
const
mp_obj_module_t
mp_module_btree
;
// extmod functions
MP_DECLARE_CONST_FUN_OBJ
(
pyb_mount_obj
);
...
...
This diff is collapsed.
Click to expand it.
py/objmodule.c
+
3
−
0
View file @
337111ba
...
...
@@ -205,6 +205,9 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = {
#if MICROPY_PY_FRAMEBUF
{
MP_ROM_QSTR
(
MP_QSTR_framebuf
),
MP_ROM_PTR
(
&
mp_module_framebuf
)
},
#endif
#if MICROPY_PY_BTREE
{
MP_ROM_QSTR
(
MP_QSTR_btree
),
MP_ROM_PTR
(
&
mp_module_btree
)
},
#endif
// extra builtin modules as defined by a port
MICROPY_PORT_BUILTIN_MODULES
...
...
This diff is collapsed.
Click to expand it.
py/py.mk
+
25
−
0
View file @
337111ba
...
...
@@ -16,6 +16,7 @@ endif
# some code is performance bottleneck and compiled with other optimization options
CSUPEROPT
=
-O3
INC
+=
-I
../lib
INC
+=
-I
../lib/netutils
ifeq
($(MICROPY_PY_USSL),1)
...
...
@@ -63,6 +64,30 @@ SRC_MOD += $(LWIP_DIR)/netif/slipif.c
endif
endif
ifeq
($(MICROPY_PY_BTREE),1)
BTREE_DIR
=
lib/berkeley-db-1.xx
CFLAGS_MOD
+=
-D__DBINTERFACE_PRIVATE
=
1
INC
+=
-I
../
$(
BTREE_DIR
)
/PORT/include
SRC_MOD
+=
extmod/modbtree.c
SRC_MOD
+=
$(
addprefix
$(
BTREE_DIR
)
/,
\
btree/bt_close.c
\
btree/bt_conv.c
\
btree/bt_debug.c
\
btree/bt_delete.c
\
btree/bt_get.c
\
btree/bt_open.c
\
btree/bt_overflow.c
\
btree/bt_page.c
\
btree/bt_put.c
\
btree/bt_search.c
\
btree/bt_seq.c
\
btree/bt_split.c
\
btree/bt_utils.c
\
mpool/mpool.c
\
)
CFLAGS_MOD
+=
-DMICROPY_PY_BTREE
=
1
endif
# py object files
PY_O_BASENAME
=
\
mpstate.o
\
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment