Microcontroller Simulator

[ News ] [ Download (latest) ] [ Installation ] [ Usage ] [ Mail to developer ]

            _____     _
           / ____|   (_)
     _   _| |     ___ _ _ __ ___
    | | | | |    / __| | '_ ` _ \
    | |_| | |____\__ \ | | | | | |
    \ ._,_|\_____|___/_|_| |_| |_|
    | |
    |_|

# Software simulator for microcontrollers

µCsim can be used to simulate microcontrollers. It supports

- Intel (MCS51 family, MCS48, MCS80, MCS85)
- XA51,
- AVR core,
- Z80 (Z80, Z180, GB80, EZ80, Z80N, R800),
- TLCS90,
- Rabbit (r2k, r3k, r4k, r5k)
- Motorola (6800, 68hc08, 6809, 68hc11, 68hc12)
- MOS6502,
- ST7,
- STM8,
- Padauk (pdk13, pdk14, pdk15, pdk16)
- PicoBlaze,
- p1516, p2223 soft processors,
- F8 soft processor,
- OISC processors (URISC, MISC16)

It can run on Linux, Windows, OSX, BSD, and other systems.

See what's new in current version.

## Download

You can download µCsim from the following places:

µCsim site. Standalone source package is available on the µCsim web site: https://github.com/danieldrotos/ucsim/releases

Home site contains precompiled Debian (i386 and amd64 architectures) packages for all Debian based Linux distributions, Windows installer and standalone Windows package.

SDCC homepage. µCsim is part of the SDCC (Small Device C Compiler) project. You can download source of SDCC or precompiled binaries from http://sdcc.sf.net. Please note, that SDCC binary package contains limited µCsim, including simulators for SDCC ports only.

Older versions are available from the archive site: http://mazsola.iit.uni-miskolc.hu/ucsim/download

## How to install

UNIX version is distributed in source, as well as in pre-compiled debian stable packages for i386 and amd64 architectures.

Windows version distributed as a setup executable and as a portable zip package.

### How to compile from source

1. Get archive file, uncompress and untar it. These steps will produce a directory ucsim-X.Y.Z where X.Y.Z is the version number.
2. Make sure, that following packages are installed on your system: make (GNU make is required), bison (or yacc), flex (or lex), libncurses-dev. You will need a C++ compiler as well.
3. Go to the directory and configure the package. Issue `./configure` command. It will determine your system and produce Makefile. Installation directory can be specified with `--prefix=dir` option to the `configure`. Default directory is `/usr/local`. Executable files will be placed in `bin` subdirectory.
4. Compile the package with `make` command, or gmake if GNU make has that name.
5. Install executables ucsim_i8051, ucsim_avr, ucsim_hc08, ucsim_xa, ucsim_z80, etc. to any directory you want. It can be done with `make install` command which will place files in installation directory specified with `--prefix=dir` option of `configure`. Note that you may have to have special privilege to do this if installation directory is not writable by the user.

## How to use

- Invocation.
  Starting the simulator program.

Features of the simulator

- Processor types.
  The simulator can simulate different types of microcontrollers.
- Multiple consoles.
  The simulator can handle more than one command console and accepts command from multiple sources. It also can be driven by other programs such as debugger interfaces.
- Serial interfaces.
  The simulator can virtually connect a terminal to serial interface of the simulated CPU.
- Memory simulation.
  Simulated CPU provides address spaces, storage is simulated by memory chips, address decoders connect them together.
- Simulator interface.
  This is a special interface which provides services for the simulated program. These services can be used to control the simulator (for example run/stop) and access some host features (print, file I/O).
- VCD file I/O.
  This is a special virtual hardware peripheral which can monitor changes of a memory location (or a bit in MCS51 where bit address space is available) and write out changes to a VCD file. It can also be used to replay events from a VCD file in order to simulate external events.
- Peripheral displays.
  Textual user interfaces which can show information about a peripheral. Some of them are interactive and can be used to provide external input data for the simulated system (port, uart).
- Command syntax and command reference, expressions.
  The simulator can be controlled via a command line interface. It accepts simple commands.

Microcontroller specific features

- STM8

## Developers

- Regression Testing

| © 1997 Dániel Drótos dr.dkdb@gmail.com