Firmware build fails for rp2 when including btree / missing docs for btree usage #11286
Replies: 5 comments 11 replies
-
Try to add: |
Beta Was this translation helpful? Give feedback.
-
Try instead: |
Beta Was this translation helpful? Give feedback.
-
Actually it's a different error. The first one was about missing functions. Now the functions are there, but the declarations do not match. |
Beta Was this translation helpful? Give feedback.
-
I apologize for the poor links in my first response ... I now have the following on my Seeed XIAO RP2040:
Testing is an exercise for the reader. To get this I modified a few files: (the SEEED_XIAO_RP2040 board is the PICO with LED updated)
modified the board
Then I just tried to figure out some differences in castings of functions and variables.
Finally in the berkley btree distribution modified the
I think the generalization of this to multiple instances may be a bit harder. Good luck. |
Beta Was this translation helpful? Give feedback.
-
So i got some help from @iabdalkader on the micropython discord:
-#include <db.h>
-#include <../../btree/btree.h>
+#include "../lib/berkeley-db-1.xx/PORT/include/db.h"
+#include "../lib/berkeley-db-1.xx/btree/btree.h"
if(MICROPY_PY_BTREE)
target_compile_definitions(${MICROPY_TARGET} PRIVATE
MICROPY_PY_BTREE=1
MICROPY_STREAMS_POSIX_API=1
${MICROPY_DEF_CORE}
)
target_link_libraries(${MICROPY_TARGET} micropy_extmod_btree)
endif() This (at least) got the firmware compiling but as he mentioned the library seems to be broken in some way. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to use the
btree
module as shown in the example from the docs. After lots of research and finding out that it doesn't seem to be available on the default pico firmware and figuring out that i need to be adding#define MICROPY_PY_BTREE (1)
to thempconfigport.h
file i am running into this issue in my build:Would someone be able to tell if i am missing anything?
IMO there should really be at least one or two sentences in the btree documentation about the availability for different ports and maybe even how to actually get a firmware that includes the module. I'd much appreciate any help or other input on this!
Beta Was this translation helpful? Give feedback.
All reactions