on techonline web site, there is some reneas simulators "umm actually emulators" there ara some boards connected to server and you connect these computers like VPN
if you want to simulate also few pieces outside of mcu use proteus. this will give you very flexible possibilities to simulate your code behavior also with connected peripherals