Static allocation and ringbuf.h build issue - wrong size in static assert. (IDFGH-10479) #11726
Closed
3 tasks done
Labels
Resolution: NA
Issue resolution is unavailable
Status: Done
Issue is done internally
Type: Bug
bugs in IDF
Answers checklist.
IDF version.
v5.1-rc1
Operating System used.
Linux
How did you build your project?
Command line with CMake
If you are using Windows, please specify command line type.
None
What is the expected behavior?
When SUPPORT_STATIC_ALLOCATION=1:
The esp_ringbuf/include/freertos/ringbuf.h definition of StaticRingbuffer_t does not match the Ringbuffer_t definition when it comes to size. So when compiling with GNU the assertion here fails.
What is the actual behavior?
Asserts the static assertion when building with STATIC_ALLOCATION - here
Steps to reproduce.
Not providing reproduce steps that I used to find the issue, as I am building natively (linux) to mock out the ESP-IDF environment and consuming the headers inside the mocks for googletest and this is where the issue is identified.
Possible steps to reproduce.
Build or installation Logs.
More Information.
This is fixed when the definition of the StaticRingbuffer_t is changed to:
Also please add:
check for SUPPORT_STATIC_ALLOCATION as the xRingbufferCreateStatic OR add some build level check that it is not used when SUPPORT_STATIC_ALLOCATION = 0.
The text was updated successfully, but these errors were encountered: