SemaphoreTake timeout does not work with gcc optimization

Yes. Can you post the disassembly for the version of xQueueSemaphoreTake() you posted above, compiled at -02. I’m curious about register usage and whether memory or register is being corrupted. I’m also curious about your many identical configASSERT() statements getting combined by the optimizer and making it impossible to know which configASSERT() actually failed once it fails.

1 Like