plusk01 / airdamon_f3

Be the Matt Damon of the skies
2 stars 1 forks source link

std::function `-O0` #5

Open plusk01 opened 6 years ago

plusk01 commented 6 years ago

For some reason, I had to add

#pragma GCC push_options
#pragma GCC optimize ("O0")
#include <functional>
#pragma GCC pop_options

for SPI/MPU to work with ISR in RELEASE mode.

It seems like the cb_ std::function is the real problem, but it doesn't seem like you can add volatile to a std::function...