Mbed EventQueue

Hi! I’m attempting to use mbed’s EventQueue plumbing as described in this blog post:

https://developer.mbed.org/blog/entry/Simplify-your-code-with-mbed-events/

I’m using PlatformIO v3.2.1, and mbed v3.131

I’m targeting a K64F and a Nucleo L476RG.

When I attempt to use it, I get this error:

‘EventQueue’ does not name a type

I’m still new to PlatformIO and mbed, so looking for some help debugging this:

  1. How do I determine which version of mbed PlatformIO is using? Ideally I’d like to be using 5.3.x.
  2. How do I upgrade (if I can upgrade) to the most recent version of mbed?
  3. Is there something else I’m missing?

Thanks for the help in advance!

I’m pretty sure that platformio uses mbed v3 (note that the RTOS seems to have different versioning from the mbed framework, see the github releases page).

There is some difference between the RTOS/non-RTOS versions of mbed which I don’t fully understand. I do know that under platformio you can include the mbed-events library with #include "mbed_events.h".

Support for this library has just been added to platformio in this merged pull request. I don’t think a new release has been done since then, so this change is not currently included in platformio.

However, if you look at the changes made by the pull request, you’ll see that they are pretty trivial. So if you can find where all the libraries are under your .platformio folder, it is easy enough to make the change manually as a short term solution.

@DavidPowell Thank you for the reply.

Do you know if there is any plan to upgrade to mbed 5.x, or if there’s a way to upgrade a Platformio project to 5.x?

@briant we have added support for ARM mbed events today. Please run pio update and take a look at example: