I'm following this documentation to compile a C library of mine into .mpy files so that i can use it as an external python module in my code.
For testing purpose I've created a "test.c" source file, containing the "test" function.
The first line is
Code: Select all
#include "py/dynruntime.h"
I've written a Makefile following the instuctions in the example (giving it the correct mycropython path, the arch (armv7emsp for an stm32 machine) and including the py/dynruntime.mk).
The build procedure stops after creating a "build" directory with "test.config.h" inside and give me this error:
Code: Select all
Compilation started at Tue May 11 09:23:20
make -k
CC test.c
In file included from ../../../micropython/py/nativeglue.h:30,
from ../../../micropython/py/dynruntime.h:32,
from test.c:1:
../../../micropython/py/obj.h:29:10: fatal error: assert.h: No such file or directory
29 | #include <assert.h>
| ^~~~~~~~~~
compilation terminated.
make: *** [../../../micropython/py/dynruntime.mk:130: build/test.o] Errore 1
make: L'obiettivo «all» non è stato rigenerato a causa di errori.
Compilation exited abnormally with code 2 at Tue May 11 09:23:20