getting modext URE into image for ESP8266 Solved

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
mianos
Posts: 84
Joined: Sat Aug 22, 2015 6:42 am

getting modext URE into image for ESP8266 Solved

Post by mianos » Sun Oct 04, 2015 10:07 pm

I can see the modext is compiled and seems to be linked so I think there is enough room but I can't seem to see the symbols.
It is not obvious to me how to get the module symbols into the running image.
I'd like to use the ure module.
Does anyone know the trick in "mpconfigport.h" so that I can do an 'import ure' or 'import re'?
Last edited by mianos on Sun Oct 04, 2015 10:41 pm, edited 1 time in total.

mianos
Posts: 84
Joined: Sat Aug 22, 2015 6:42 am

Re: getting modext URE into image for ESP8266 Solved

Post by mianos » Sun Oct 04, 2015 10:40 pm

Answering my own question. Although the file is compiled and linked, I noticed (with nm) that it had no symbols.
It needs:
#define MICROPY_PY_URE (1)
in mpconfigport.h to generate any code.

I already got the
extern const struct _mp_obj_module_t mp_module_ure;
and
{ MP_OBJ_NEW_QSTR(MP_QSTR_re), (mp_obj_t)&mp_module_ure }, \

But still had the missing symbols.
All good.

Post Reply