pw_thread_freertos: Fix peak stack usage capture size Corrects the logic for the captured peak stack usage by the thread iteration facade in pw_thread_freertos and adds an associated test to verify correctness. uxTaskGetStackHighWaterMark() returns remaining free space in words rather than bytes, so the returned value needs to be multiplied by sizeof(StackType_t) to get the remaining unused stack space in bytes. Change-Id: Ifcd4289053c8aa91019475584f1206a12bd6cd37 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/110971 Pigweed-Auto-Submit: Armando Montanez <amontanez@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com> Reviewed-by: Ewout van Bekkum <ewout@google.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.