Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    [WiPy 2.0] Pycom-esp-idf example error: undifined reference to 'mp_thread_clean'

    Scheduled Pinned Locked Moved Firmware
    wipyesp32bug
    13 Posts 3 Posters 3.6k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      jmarcelino @Innocenzo
      last edited by

      @Innocenzo
      No changes required! :-) You can use the WiPy as a fully compatible ESP32 device.

      I 1 Reply Last reply Reply Quote 1
      • I Offline
        Innocenzo @jmarcelino
        last edited by

        @jmarcelino This is a good news :D

        Anyway the error persist also using this repository.

        J 1 Reply Last reply Reply Quote 0
        • J Offline
          jmarcelino @Innocenzo
          last edited by

          @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-idf should do it

          I 1 Reply Last reply Reply Quote 1
          • I Offline
            Innocenzo @jmarcelino
            last edited by Innocenzo

            @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.c called portCLEAN_UP_TCB( pxTCB ); that causes the problem. I've deleted it and everything works.

            I don't think that is a good solution.

            J 1 Reply Last reply Reply Quote 0
            • J Offline
              jmarcelino @Innocenzo
              last edited by

              @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.

              1 Reply Last reply Reply Quote 0
              • salvoaerodevS Offline
                salvoaerodev
                last edited by

                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.

                I 1 Reply Last reply Reply Quote 1
                • salvoaerodevS Offline
                  salvoaerodev
                  last edited by salvoaerodev

                  The function to add is

                  /* Missing function */
                  void mp_thread_clean (void *tcb) {
                  
                  }
                  

                  in the hello_world_main.c

                  1 Reply Last reply Reply Quote 1
                  • I Offline
                    Innocenzo @salvoaerodev
                    last edited by

                    @salvoaerodev well done.

                    J 1 Reply Last reply Reply Quote 0
                    • J Offline
                      jmarcelino @Innocenzo
                      last edited by

                      @Innocenzo @salvoaerodev
                      The function is defined in pycom-micropython-sigfox/esp32/mpthreadport.c

                      It'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?

                      I 1 Reply Last reply Reply Quote 1
                      • I Offline
                        Innocenzo @jmarcelino
                        last edited by Innocenzo

                        @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).

                        1 Reply Last reply Reply Quote 0

                        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
                        • 1 / 1
                        • First post
                          Last post

                        Pycom on Twitter

                        Pycom