-
Notifications
You must be signed in to change notification settings - Fork 7.6k
xSemaphoreCreateRecursiveMutexStatic cannot be used due to missing xQueueCreateMutexStatic #4851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've been hitting the same problems, albeit with |
Seems to me that there is no way to build freertos based on configuration since the assemblies are pre-built as /tools/sdk/lib/libfreertos.a and there is no freertos source code provided anywhere except for the header files in /tools/sdk/include/freertos/freertos/. Or am I missing something? Edit: |
This can probably be fixed next time Arduino libraries are built, by enabling CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION in sdkconfig used by esp32-arduino-lib-builder. @me-no-dev WDYT? |
yup. on my to-do list |
the flag has been enabled in the lib builder and we are waiting for IDF v3.3.5 to be released, so the builder can pick it up and send the update to #4936 for merging :) When that happens, Arduino 1.0.6 will be released as well |
Change is now in the |
https://github.com/espressif/arduino-esp32/releases/tag/1.0.6 includes CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION |
Hardware:
Board: NodeMCU-32S (ESP32)
Core Installation version: 1.0.4
IDE name: Arduino IDE
Computer OS: Windows 10
Description:
Attempting to use
xSemaphoreCreateRecursiveMutexStatic
in a sketch throws a linker error:The
configurable.h
script has no code at line 183; it's the end of the file. I checked this in the actual file in the temp folder. This appears to be a red herring. The issue is called when attempting to use thexSemaphoreCreateRecursiveMutexStatic
function.Support for this FreeRTOS feature is supposed to be enabled by setting
configSUPPORT_STATIC_ALLOCATION
andconfigUSE_RECURSIVE_MUTEXES
in the build flags. I did this viaplatform.local.txt
, along with some other flags I needed:This should enable both static and recursive semaphores, and all FreeRTOS reference states that this should work. I can see that the flags are passed as part of the compilation output.
Looking into the code here, the actual implementation of
xQueueCreateMutexStatic
seems to be missing. There's a forward declaration in queue.h but nothing else. The main FreeRTOS code branch includes the actual implementation.Note that the dynamic recursive version of the function,
xSemaphoreCreateRecursiveMutex
, does appear to be present and working when these config flags are set. It's just the static ones that are missing.Sketch:
The text was updated successfully, but these errors were encountered: