Depends on what your focus is. If you want to build understanding of electronic components and how they interact through experimentation, Paul Falstad’s circuit simulator is a great start.
If you want to focus on digital logic, Logisim is great.
But here’s the thing: A microcontroller is controlled only through code. You want to learn electronics, you can simulate those. You want to learn about a specific microcontroller, read the manual for that controller. You want to learn to code a particular language, you learn that language.
You want to code on a microcontroller, get a microcontroller.
Edit:
Okay, so i was clicking around on Falstad’s site as i haven’t been there for a while and i found a thing called AVR8JS
This is literally what you are looking for! It allows you to set up a circuit, and use a simulated microcontroller to run C code on the circuit!
i use a Kobo Clara HD. It runs linux out of the box, the system memory is on a removable SD card inside the case, and the user account is defined in an SQLite database on disk. If you add an empty user account to the database, it removes the “create account” screen and disables any Kobo online services. Then you can install KOReader and upload files over USB as everyone else has said.