For example, this variation of the original example:
#[export_name = "main"]
pub extern "C" fn main() -> ! {
loop {
for led in LEDS.iter() {
led.on();
delay::ms(100);
led.off();
delay::ms(100);
}
}
}
when compiled in debug mode, produces the expected result: all the LEDs light on in a circular cycle.
But if the code is compiled in release mode, then only three, the "first" three, LEDs participate in the "circular" cycle.
This is the only example that misbehaves when compiled in release mode. It also happens to be only example that uses interrupts so perhaps that's the cause of the problem.
For example, this variation of the original example:
when compiled in debug mode, produces the expected result: all the LEDs light on in a circular cycle.
But if the code is compiled in release mode, then only three, the "first" three, LEDs participate in the "circular" cycle.
This is the only example that misbehaves when compiled in release mode. It also happens to be only example that uses interrupts so perhaps that's the cause of the problem.