This is not what you said originally:
i gave up on that idea. The compiler i use has enough simulation capability ( like an LCD display and the i/o pins) but it can't handle interrupts. I got the interrupt code working. It's very minimal and was fairly easy to get going
The big thing is (was) the configuration of some of the more complex blocks like the timer/compare blocks that have various settings for prescalers and clock sources.
Silicon labs had a nice config tool for their F-series processors where you had a GUI and could click the options and set the numbers you wanted. It produced direct machine or C code that performed SFR writes without requiring library of functions like in Arduino or STM ecosystem. That code is invariably a ton of calls to a library.
The silabs GUI did all the lifting and just told you : based on what you selected in the GUI : set these 9 registers with the following values. The startup code was essentially a number of mov operations. No bit twiddling happened at runtime. It was pre-calculated in the GUI.
I can figure it out from the datasheet but if there is a nice tool to make life easier ( and crosscheck what i figured out) those things are welcome. Atmel had START
https://start.atmel.com/ But it banks on some "middleware" and now there is MCC . START let's you configure the pinmux and set up some elements like the clock domain for the ADC.
But the generated code is unreadable. It is scattered in like 20 files and they predefine a bunch of inline functions fore each possible bit and then call those. At compile time the compiler + optimizer processes those and squashes it to a single register write. They essentially let the compiler do the lifting as opposed to the GUI.
That's why i wanted a simulator to see what the compiler had ultimately produced in terms of register writes. That is all i needed. I don't use C so i need to implement the register operations in my toolchain.
Compile the produced code and run it ( just the system_init. Then halt and inspect the register contents.