sherbst wrote:
I am writing this in Rust, and when attempt to send a simple string ("Hello, world\n") over COM1, it works fine. However, when I do some processing to generate this string (&format!("some value: {}", value)), nothing gets sent to COM1.
Something similar happened to me when I tried to used Rust to write a memory server. It turned out that liballoc was trying to allocate memory for the String, but my memory allocator wasn't initialized yet, so the code would panic. And then the panic handler would panic when it would try to print the panic message, resulting in an infinite loop. I chose to use byte slices (&[u8]) instead and implement the Write trait so that the write! macro can output the formatted sequence to the slice.