Creating compiler tests

I think simavr will still be your best bet. With that simulator, you can just set a breakpoint after some code’s execution and grab the state of processor and compare it. Not sure though how you would integrate executing these tests with PlatformIO though, best to have them as a seperate script maybe?

There’s some examples with using libsimavr to load a compiled .elf file and run it:

1 Like