mcc

glitch girl

Avatar by @girlfiend

Also on Bluesky
Also on Mastodon.

posts from @mcc tagged #risc-v

also:

Right now I am attempting to develop software for an "imaginary" embedded platform where an open-source RISC-V core is programmed onto an FPGA. So far we can run Rust software with no trouble except for some possible RAM corruption when the chip gets too warm. In C, something is wrong with our GCC configuration and it is not yet working. Programs made of entirely legal C put their segments in the wrong places and corrupt their memory when run.

To test our C setup, last night I tried writing a simple program where blue and green diamonds would emanate from a central point, then break around pre-placed red squares like waves. Due to the memory corruption, it would not run; it would draw a single green pixel in the center of the screen, then enter an inescapable infinite loop. While diagnosing this I tried lots of different things, so I was repeatedly uploading builds with slight changes to the device, then staring at a text editor tab for a while before trying anything else.

On one run, after looking away from the screen for ten to fifteen minutes, I glanced back at the screen and discovered the single green pixel had been replaced with… this. I have simply no idea how this was drawn. A lot of what's on the screen looks like things the app could have drawn, but other parts don't, and in particular I don't understand how it could have gone into the infinite loop and then at some point spontaneously broken out. The best I can guess is that our bad-linker-script memory corruption caused it to go into an infinite loop, and then the chip-too-hot memory corruption caused it to break out of the infinite loop and begin drawing chaotically because in the version I ran its state was made of uninitialized memory. (By the time I saw the app had actually done something, I had already made other changes and it was impossible to reconstruct what version I'd actually run.) But this is a guess.

I do not know where this image came from. I don't even know when the device drew it. I will never be able to reproduce this.

EDIT: Update