platformio / platform-espressif32

Espressif 32: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/espressif32
Apache License 2.0
899 stars 606 forks source link

Adding include does not update build (uxTaskGetSystemState) #379

Closed ZweiEuro closed 4 years ago

ZweiEuro commented 4 years ago

When I try to add (e.g.) #include "freertos/task.h" to my project because i want to partly make https://github.com/espressif/esp-idf/blob/release/v4.0/examples/system/freertos/real_time_stats/main/main.c work, it doesn't compile the file at all. In the log there is no task.c shown only: Compiling .pio/build/esp32dev/esp-idf/bt/common/btc/core/btc_task.c.o from bluetooth Compiling .pio/build/esp32dev/esp-idf/bt/host/bluedroid/stack/btu/btu_task.c.o also from bluetooth

but I am expecting to have freertos/task.c.o compile as well.

How can I debug this why it is not adding it ?

(same issue with #include "freertos/semphr.h", Compiling .pio/build/esp32dev/esp-idf/bt/common/osi/semaphore.c.o is shown, but not what i need )

with this missing i logically get a firmware link error:

/home/zweieuro/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/esp-idf/src/core/mg_core.cpp.o:(.literal._ZN2mgL21print_real_time_statsEj+0x10): undefined reference to `uxTaskGetSystemState'
/home/zweieuro/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/esp-idf/src/core/mg_core.cpp.o: in function `mg::print_real_time_stats(unsigned int)':
/home/zweieuro/Documents/PlatformIO/Projects/master_gate/src/core/mg_core.cpp:138: undefined reference to `uxTaskGetSystemState'
/home/zweieuro/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/zweieuro/Documents/PlatformIO/Projects/master_gate/src/core/mg_core.cpp:155: undefined reference to `uxTaskGetSystemState'
ZweiEuro commented 4 years ago

It says in the header file that CONFIG_FREERTOS_USE_TRACE_FACILITY=y needs to be defined in sdkconfig.

so for anyone reading this, do that.