[MBED] Thread not defined


Today I needed to compile an old code (4month old) that used to work/compile in platfomio without issue.

today after a PIO update, the code got mad at me and decided that line was not valid anymore:

use “mbed.h”
Thread envent1,t2;

return “Thread is not defined” error in the editor but the compiling worked.

The platformio.ini is like that:

platform = ststm32
board = nucleo_f446re
framework = mbed
debug_tool = stlink

I checked [Mbed — PlatformIO latest documentation](http://pio mbed doc) and couldn’t find anything helpful.

Any help will be appreciated !


Try to add the rtos header file explicitly: #include "rtos.h"

It works but I got the same with ‘EventQueue’.
I added Event.h but nothing changed.

Thanks for your support!

Try #include "mbed_events.h"

1 Like