uCsim the 8051 simulator for SDCC

uCsim: the 8051 simulator for SDCC
uCsim is a microcontroller simulator for SDCC. It is free and opensource under GNU GPL. Currently it supports MCS51 family. AVR core, Z80, HC08 and XA are supported by UNIX version only.

For the 8051, the recognized types are: 51, 8051, 8751, C51, 80C51, 87C51, 31, 8031, C31, 80C31, 52, 8052, 8752, C52, 80C52, 87C52, 32, 8032, C32, 80C32, 51R, 51RA, 51RB, 51RC, C51R, C51RA, C51RB, C51RC, 89C51R, 251, C251, DS390, DS390F.

uCsim is available for two platforms: DOS (MCS51 only) and UNIX but DOS version is not supported any more. DOS version is not finished so I call it demo version and it is available in binary only. Limitations of DOS version are:

  • There is no built in help available;
  • Some of the utilities are not working, for example calculator, bit simulator;
  • Serial line works in mode 1 independently of mode bits.

If you are using the latest version of SDCC on Windows, uCsim is already in your hand (C:Program FilesSDCCbin). If you have not installed it yet, please see my installation guide.

Starting the Simulator

There are separate programs to simulate different microcontroller families:

MCS51 family is simulated by s51
AVR family is simulated by savr
Z80 processor is simulated by sz80
XA family is simulated by sxa
HC08 processor is simulated by shc08

The program can be started using following command:

C:> s51 [input file]

Parameter is optional. If it specified it must be the name of an Intel hex file.

For more details, please see its documentation. This is an overview and I will write about this simulator later.