Or you can write code which can directly run on x86, i.e. FreeRTOS does support that without issues. For peripherals drivers you will need to burn it on chip regardless because emulator rarely can emulate peripherals in some reasonable way.
So if you correctly abstract business logic from peripheral code, you can do most of your development without ever uploading to target.