A volatile read from an unaligned pointer results in this when running in debug mode:
panicked at core/src/panicking.rs:221:5:
unsafe precondition(s) violated: ptr::read_volatile requires that the pointer argument is aligned and non-null
I changed the address to be aligned (but still invalid on F3 Discovery), so that the expected output is produced.
P.S. I was confused about the lack of output. Maybe default to panic-semihosting/panic-itm instead of panic-halt in these examples?
A volatile read from an unaligned pointer results in this when running in debug mode:
I changed the address to be aligned (but still invalid on F3 Discovery), so that the expected output is produced.
P.S. I was confused about the lack of output. Maybe default to
panic-semihosting
/panic-itm
instead ofpanic-halt
in these examples?