-
-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
instructionalIt documents a problem that is outside of our scopeIt documents a problem that is outside of our scope
Description
Your code reads
However, this throws the error message
.pio\libdeps\disco_f051r8\TaskManagerIO\src\TaskManagerIO.cpp:404:5: error: 'ThisThread' has not been declared
404 | ThisThread::yield();
| ^~~~~~~~~~
*** [.pio\build\disco_f051r8\libca9\TaskManagerIO\TaskManagerIO.o] Error 1
and is fixed by explicitily including rtos/rtos.h and using rtos::ThisThread::yield();.
#include <rtos/rtos.h>
void yield() {
//ThisThread::yield();
rtos::ThisThread::yield();
}The platformio.ini used here is
[env:disco_f051r8]
platform = ststm32
board = disco_f051r8
framework = mbed
lib_deps =
davetcc/LiquidCrystalIO @ ^1.4.0
davetcc/IoAbstraction @ ^1.6.4
With the current versions of all platform that's using mbed-os 5.15.4. On the other hand, this compiles fine for the L476RG board which uses mbed 6.2.0. So I'm not entirely sure on what the correct fix here is, but primarily leaving this issue in case someone runs in the same compile error.
See reference project at https://github.com/maxgerhardt/pio-mbed-i2c-lcd-example/.
Metadata
Metadata
Assignees
Labels
instructionalIt documents a problem that is outside of our scopeIt documents a problem that is outside of our scope