Dear,
I have added a "modunalib.c" to the "/extmod" directory and added all necessary additions to
- ports/stm32/mpconfigport.h
- py/objmodule.c
and of course to the
- /extmod/modunalib.c
I use a #define MICROPYTHON_PY_UNALIB similar to the other modules to switch in/out the use of the library and skipping generating code when not in use.
Somehow when compiling the modunalib.c does not get compiled automagically...
Only by forcing it by adding it to the Makefile at the point where the modonewire.c is included, it will compile.
I'm wondering if that is ok, or shouldn't the making process pick up the added file? And if so, where to look to make it happen??
Regards,
Roland
adding a modliblib... module
-
- Posts: 463
- Joined: Wed Apr 08, 2015 5:19 am
Re: adding a modliblib... module
AFAIK that's the normal way to do it. You add your module's source to the Makefile of the chosen port to the SRC_MOD (or in this case the EXTMOD_SRC_C ?) variable.
Re: adding a modliblib... module
But... what I don't understand is why similar modules like uhashlib etc. appear automatically... and my unalib does not...?
-
- Posts: 463
- Joined: Wed Apr 08, 2015 5:19 am
Re: adding a modliblib... module
The object file (moduhashlib.o) is listed in ./py/py.mk.
Re: adding a modliblib... module
@SpotlightKid Thanks!