MCU 8051 IDE

[ Visit the original forum]

Introduction

MCU 8051 IDE is a new modern graphical integrated development environment for microcontrollers based on 8051. For those who believe 8051 is a great piece of technology this IDE is a new way how to see and feel these still famous microcontrollers. MCU 8051 IDE is noncommercial open-source software primarily for Microsoft Windows and GNU/Linux licensed under the terms of GNU GPLv3 license [ see the license ]. You can use this IDE for education, business, hobby, or something else completely free of charge.

Supported programming languages are C language and assembly. It has its own assembler and support for 2 external assemblers. For C language it uses SDCC compiler. There are packages for various Linux distributions (.rpm and .deb), and installer for Microsoft Windows. This IDE contains simulator, source code editor, assembler, HW programmer and much other tools. Simulator supports over 79 MCU primarily from Atmel. There is also support for simple hardware simulation (like LEDs, keys, etc.).

MCU 8051 IDE screenshot

See more screenshorts here.

 

Goals of MCU 8051 IDE

As an integrated development environment for microcontrollers based on MCS-51 intended for Assembly language and C language this tool was originally intended for education purposes but now the area of potential usage is surely significantly wider. This IDE was created to fill a gap in the open source software of this kind. User interface, source codes, documentation, web pages, etc., are written in English in order to make this software available to as many user as possible, but there is support for internationalization using i18n. Its main documentation is written in LaTeX. It is very important to note that this software is and will be completely free of charge and open-source for Windows and GNU/Linux.

 

MCU 8051 IDE offers

  • Multiplatform moder graphical IDE free of charge.
  • A transparent view on simulated program for 8051.
  • Easy source code editing even for an user with small knowledge of the assembly language.
  • User friendly, easy to use, and yet sophisticated enough IDE for 8051.
  • Support for more than 70 microcontrollers based on the famous 8051 design.
  • Limited support for HW tools, the IDE has some hardware tools on its own and other can be more or less used from within the IDE.
  • Limited technical support.

 

Supported MCUs

  • 8051
  • 8052
  • 8031
  • 8032
  • 8751
  • 8752
  • 80C31
  • 80C32
  • 80C51
  • 87C51
  • 80C52
  • 87C52
  • 80C54
  • 87C54
  • 80C58
  • 87C58
  • AT89C2051
  • AT89S2051
  • AT89C4051
  • AT89S4051
  • AT89C51
  • AT89LV51
  • AT89LS51
  • AT89C51RC
  • AT89C52
  • AT89S52
  • AT89LV52
  • AT89LS52
  • AT89C55WD
  • AT89LV55
  • T87C5101
  • T83C5101
  • AT89S8253
  • T83C5102
  • TS80C32X2
  • TS80C52X2
  • TS87C52X2
  • AT80C32X2
  • AT80C52X2
  • AT87C52X2
  • AT80C54X2
  • AT80C58X2
  • AT87C54X2
  • AT87C58X2
  • TS80C54X2
  • TS80C58X2
  • TS87C54X2
  • TS87C58X2

And more...

 

Features

List of main features

  • Advanced simulator with support for more than 79 MCUs.
  • Built-in optimizing macro assembler
  • Support for C language
  • Simple external hardware simulation
  • Interactive help for assembly language
  • Interrupt monitor & editor
  • Advanced source code editor
    • Syntax highlight
    • Syntax validation
    • Pop-up based auto-completion
    • Editor command line
    • And more ...
  • Interactive map of SFR
  • Tools for converting between various data files related to MCUs
  • Editor of bit addressable area in the simulated MCU
  • Stopwatch timer
  • Special calculator optimized for use with 8051
  • Assembler symbol viewer
  • Base converter
  • 8 segment display editor
  • Hexadecimal editor
  • Interactive ASCII chart
  • Simple graphical notepad
  • Various information windows, tool tips, legends
  • IO Ports monitor

 

Basic features

Editor

The code editor is featured with syntax highlighting and validation, auto-completion and spell checking for comments as well as a command line that speeds up the access to various editor options (Spell checking for comments is available only if you have installed the Hunspell program. This feature is currently not available on MS Windows OS). It also provides a panel showing line numbers, bookmarks, breakpoints and warnings from syntax validator. Editor is capable to export the source code within it as XHTML and LaTeX and contains a number of useful tools like automatic indentation, searching and replacement of expressions, copy to clipboard, paste from clipboard, among others.

 

Macro-assembler

The assembler is one of the integral parts of MCU 8051 IDE. It is a macro assembler with support for dozens of directives and capable of performing peephole optimizations. Support for peephole optimizations means that the assembler can attempt to optimize the resulting code for higher execution speed and lower size without tempering with its very functionality. It is important to note that automatic peephole optimization can sometimes be harmful and so it is disabled by default. A macro assembler is a software that allows  the user to define a macro instruction, which consists of a sequence of basic instructions, and use it later instead of repeatedly copying and pasting the set of instructions over and over along the source code. Assembler behavior can be configured either globally, using the proper configuration dialog, or locally in source code, by means of assembler directives and control sequences (e.g. $TITLE('Some title to show in the code listing') ). The
assembler is capable of generating four kinds of output code:

  • Object code (machine code) as an hexadecimal file, with .hex extension and in Intel 8 HEX format.
  • Object code (machine code) as a binary file, with .bin extension and in format of raw binary data.
  • Code listing, in .lst extension.
  • Code for integrated MCU simulator, in .adf extension.            

 

Simulator

Simulator main panel.

The simulator is a software component intended for the simulation of the chosen microcontroller in a virtual environment. It allows user to monitor precisely what is happening in the MCU in an exact moment in time, as well as to modify its components, for instance by altering the value of a register, canceling an interrupt or forcing a subprogram to return. In that way it might be possible to ferret out certain flaws in the  program being debugged, which would be hard or nearly impossible to find and/or fix in other ways. Even though it is better to have ICD (In-Circuit Debugger) or ICE (In-Circuit Emulator) at hand, MCU 8051 IDE in current version does not support neither of them.

MCU simulator implemented in this IDE supports dozens of microcontrollers and most of them are treated in slightly different way allowing to take into account most of the nuances between the supported MCUs. User can adjust simulator behavior to fit his or her needs by modifying clock frequency, size of connected external code, data memory and others, or for instance by disabling or enabling certain warnings, which pops up when the simulated program do something "strange", like some kind of invalid access into memory or stack overflow or underflow. Besides that, it is possible for the user to modify all registers which the MCU deals with, including those which are not accessible by the running program, like the Program Counter. User have always an overview of all possible, pending and active interrupts and can temper with them at any time. The simulator also allows for altering code memory and all kinds of data memories. The program being simulated can be at any time "hibernated" into a file, preferably with .m5ihib extension, and resumed later from this same file. Such a file contains the entire state of the simulator at the point in which the program was hibernated.

 

Project management

It is a functionality that allows the IDE to remember certain set of source code files along with a set of configuration parameters. Projects are stored in XML (eXtensible Markup Language) files with extension .mcu8051ide. These files are human readable and their precise formatting is described in their inline DTD (Document Type Declaration). Their encoding is UTF-8 (Unicode Transformation) and as EOL (End Of Line) character they use LF (Line Feed). The reason for that is to make it possible for the user to implement his or her own tools for manipulating with them.

 

Scientific calculator

MCU 8051 IDE scientific calculator is implemented as a simple scientific calculator capable of computation in four number systems: hexadecimal, decimal, octal and binary, and with three angle units: radians, degrees and grad. Integral part of the calculator is also a simple tool intended solely for computing preset values for MCU timers.

 

Special calculator

The experience in MCU programming shows that it is very useful to have some tools at hand, capable of performing recurrent boring calculations that spend time to be done by hand. MCU 8051 IDE special calculator is intended for performing certain simple specialized calculations related to 8051. For instance, this calculator is capable of generating assembly language code implementing a wait loop with specified parameters.

 

Hexadecimal editor

This utility is used here for watching and modifying large blocks of raw data in various memory types of the simulated MCU (Code, IDATA, XDATA, EEPROM, etc.). There is also hexadecimal editor intended for editing Intel 8 HEX files. Other hexadecimal editors are specially designed to fit specific needs of the given purpose; for example, there is an hexadecimal editor for viewing and editing code memory, which displays the current position of the program counter in the machine code of the simulated program.

 

Disassembler

This tool can translate once assembled code back to source code. It is important to note that it is somewhat improbable that the resulting source code will look "reasonable" It is due to DB and DW and not fixed instruction word length on 8051. Nevertheless, such a generated source code must posses exactly the same functionality when it gets assembled again. Disassembler implemented in this IDE is frankly speaking only a little more that just a toy. If you want a really capable disassembler, maybe you should try some tool like D52.

 

Notepad

In this IDE, it is a simple rich text editor for writing user notes of whatever kind. Originally, it was intended for writing a list of things which remain to be done in your project.

 

Command Line Interface (CLI)

It is an useful tool that allows the use of some IDE functions without entering it's GUI. You can get list of available options by typing mcu8051ide -h or mcu8051ide --help to your terminal emulator. You can, for example, use just the assembler of the IDE or convert an Intel 8 HEX file to a raw binary file.

 

Additional features

RS-232 debugger

This tool is capable of transmitting and receiving data to/from RS-232 port in your computer, today personal computers usually do not have this type of port, but you can always use something like a USB to RS-232 bridge. This tool acts as a DTE (Data Terminal Equipment), the other side is DCE (Data Circuit-terminating Equipment).

On the diagram you can see current logical level on each of RS-232 wires except for RxD and TxD. You can also set value for wires DTR (Data Terminal Ready) and RTS (Ready To Send) and trigger the break by button BREAK. Right upper corner contains configuration controls, their functions should be mostly obvious. Check-box "Enable reception" enables or disables writing to hexadecimal editor "Received data''. Button "Close" closes the opened physical port. And the refresh button refreshes the list of available physical ports.

In the bottom part you can see two hexadecimal editors: "Data to send" and "Received data". These are representations of data which we are dealing with. By button "Receive here" you can set address in the hexadecimal editor where the received data will be written. And by button "Send selected" you can trigger transmission over the opened physical port, selected chunk of the data will be send then. Button "Clear selected" are intended for removing data from the hexadecimal editors editors.

 

Interrupt monitor

Interrupts monitor is a specialized tool intended for viewing and manipulating with interrupts in simulated MCU. With interrupt monitor you can invoke any interrupt you want at any time, force any interrupt at any time to return,  change interrupt priorities or disable or enable particular interrupts. You can also see all interrupts synoptically in one window and alter values of their configuration flags.

 

Virtual HW simulation

MCU 8051 IDE simulator is also equipped with a few simulated simple hardware devices, which can be connected to the simulated MCU. These virtual hardware components are intended primarily to offer a better insight into programs interacting with things like LEDs or keys.

All wires connected to specific GPIO lines are colored according to the voltage level present on them, colors are the same as for graph in the bottom panel (GREEN == log. 0; RED == log. 1; GRAY == not connected, etc.) Each of these virtual HW components has its own configuration menu and help text available trough that menu. Configuration can be saved to a file with extension .vhc, and can be loaded from that file later. The configuration menu is accessible trough the button with wrench icon, and the ON/OFF button enables or disables entire subsystem of virtual hardware simulation including the graph of GPIO wires on the bottom panel.




 

Authorship and latest release

MCU 8051 IDE has been originally developed by a guy named Martin Ošmera from Czech Republic (a state in Central Europe, member of EU). Martin Ošmera has later become member of Moravia Microsystems, s.r.o.; since then MCU 8051 IDE is part of the company's portfolio.

It's definitely worthy of mention that MCU 8051 IDE has been developed with help of several people around the world, most of them are mentioned in the Thanks To section in the About dialog when you run the IDE.

The latest release is version 1.4.8, this version includes many bug fixes and quite possibly is the most stable version of this IDE ever released; if you had problems with stability of version 1.4.7, it's likely they go away when you update to 1.4.8