Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8093

General • Re: How to capture the output of the micropython.mem_info() on Pico ?

$
0
0
...
I managed to build the original source for Pico (I want to try it on Pico without W first), but after I added those 2 files in "own" and have done all that you said I get these erros when I build with :
cmake -DUSER_C_MODULES=${PWD}/../own/micropython.cmake ..
make -j2
I need to mention that I am building the version 1.24.1 of MicroPython firmware. The AI says that it is posible that the functions "mp_thread_recursive_mutex_lock" and "mp_thread_recursive_mutex_unlock" does not exists in this version... :?
[ 74%] Building C object CMakeFiles/firmware.dir/own/modmem_info.c.obj
/home/marus/Pico/micropython/ports/rp2/own/modmem_info.c: In function 'gc_dump_alloc_table_string':
/home/marus/Pico/micropython/ports/rp2/own/modmem_info.c:45:20: error: implicit declaration of function 'mp_thread_recursive_mutex_lock'; did you mean 'mp_thread_mutex_lock'? [-Werror=implicit-function-declaration]
45 | #define GC_ENTER() mp_thread_recursive_mutex_lock(&MP_STATE_MEM(gc_mutex), 1)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/marus/Pico/micropython/ports/rp2/own/modmem_info.c:77:5: note: in expansion of macro 'GC_ENTER'
77 | GC_ENTER();
| ^~~~~~~~
/home/marus/Pico/micropython/ports/rp2/own/modmem_info.c:46:19: error: implicit declaration of function 'mp_thread_recursive_mutex_unlock'; did you mean 'mp_thread_mutex_unlock'? [-Werror=implicit-function-declaration]
46 | #define GC_EXIT() mp_thread_recursive_mutex_unlock(&MP_STATE_MEM(gc_mutex))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/marus/Pico/micropython/ports/rp2/own/modmem_info.c:208:5: note: in expansion of macro 'GC_EXIT'
208 | GC_EXIT();
| ^~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/firmware.dir/build.make:4651: CMakeFiles/firmware.dir/own/modmem_info.c.obj] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:1754: CMakeFiles/firmware.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Edit:
I replaced those recursive mutex with simple ones, and now it works. I saw that in the original source was simple ones too...

Statistics: Posted by Marus780 — Sun Mar 30, 2025 12:46 pm



Viewing all articles
Browse latest Browse all 8093

Trending Articles