You can use ucSim simulator that comes as part of SDCC compiler. But that only really simulates the CPU and limited peripherals of the STM8 (like UART, perhaps timers, I forget exactly what). So mostly only useful for testing specific parts of firmware code, and not a complete system.