[WiPy 2.0] Pycom-esp-idf example error: undifined reference to 'mp_thread_clean'
-
@Innocenzo
No changes required! :-) You can use the WiPy as a fully compatible ESP32 device. -
@jmarcelino This is a good news :D
Anyway the error persist also using this repository.
-
@Innocenzo
Sounds like you need to point IDF_PATH environment variable to the new ESP-IDF folder.export IDF_PATH=/path/to/your/new/esp-idfshould do it -
@jmarcelino Ok it works with the new repository!
But there isn't a way to resolve the problem in the pycom-esp-idf repository?
EDIT: There is a function in
pycom-esp-idf/components/freertos/task.ccalledportCLEAN_UP_TCB( pxTCB );that causes the problem. I've deleted it and everything works.I don't think that is a good solution.
-
@Innocenzo
Great! Well the "problem" is Pycom-esp-idf expects MicroPython to be present (the mp_ prefix you see in the error). It was forked and adapted for it.i can't see any other useful purpose to use it instead of the official ESP-IDF repo.
-
The Hello World example, included in the pycom-esp-idf misses the TCB cleanup function, just defined in FreeRTOS config file. Add it in the .c file, and recompile it. It should works in this way.
-
The function to add is
/* Missing function */ void mp_thread_clean (void *tcb) { }in the hello_world_main.c
-
@salvoaerodev well done.
-
@Innocenzo @salvoaerodev
The function is defined in pycom-micropython-sigfox/esp32/mpthreadport.cIt's interesting it worked by just copying it over but I still don't see why you'd want to compile your C programs using pycom-esp-idf when the official ESP-IDF repo at https://github.com/espressif/esp-idf:
- works with the Pycom boards
- is much more up-to-date
- matches the ESP-IDF documentation at http://esp-idf.readthedocs.io/en/latest/
- Gives you support via the official esp32.com forums
Is there a reason I'm missing?
-
@jmarcelino Because we want preserve the Pycom WiPy firmware ad edit it with some frozen files and custom API C (like SSL and BT that have some problems).
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login