7 years, 2 months ago.  This question has been closed. Reason: Unclear question

EventQueue Example 1 - Operator new[] out of memory

I tried this code:

  1. include "mbed.h"
  2. include "mbed_events.h"

DigitalOut led1(LED1); InterruptIn sw(PC_0); EventQueue queue(32 * EVENTS_EVENT_SIZE); Thread t;

void rise_handler(void) { Toggle LED led1 = !led1; }

void fall_handler(void) { printf("fall_handler in context %p\r\n", Thread::gettid()); Toggle LED led1 = !led1; }

int main() { Start the event queue t.start(callback(&queue, &EventQueue::dispatch_forever)); printf("Starting in context %p\r\n", Thread::gettid()); The 'rise' handler will execute in IRQ context sw.rise(rise_handler); The 'fall' handler will execute in the context of thread 't' sw.fall(queue.event(fall_handler)); }

and get the error in the title. I'm using a custom board with STM32F072VB MCU and customised the existing code for the NUCLEO_F072RB (which is the same MCU in a different housing)

Debuggin the code didn't get me anywhere near the error message.