Keil uVision IDE and the redBlocks Simulator – A Perfect Match

Have you ever wondered, how to take full advantage of instruction set simulators, included in embedded software development tools like the Keil uVision IDE?

The general problem is this: While an instruction set simulator emulates only the target's processor, an embedded software application typically interacts with peripherals like lamps, buttons, RFID reader chips, other embedded devices (e. g. via CAN), ...

One deployment option (see SiL Environment Deployment Options for alternative setups) for the redBlocks Simulator is the close integration with the Keil uVision IDE.  In this setup you get a powerful platform that emulates the target processor and the hardware peripherals of your embedded target in a graphical simulation environment on a development PC.  In this virtualized environment, the target application can be integrated and fully automated tests with Python scripts can be perfomed totally independent from the target hardware.

uVision and redBlocks Simulator


Like other embedded IDE's, the Keil uVision IDE includes an instruction set simulator (ISS) that allows to debug target binary code on a development host. Instruction set simulators emulate the target processor’s CPU by evaluating the target machine instructions by software. The processor’s registers can be conveniently observed and manipulated in the IDE’s debugger.


uVision Simulator Screenshot

Debugger in the Keil uVision IDE


As an instruction set simulator virtualizes a target processor, it can be used to test embedded software without the need to download it to a target hardware board. This can be useful in early development stages, when no target hardware is yet available.

However, as embedded applications closely interact via hardware peripherals with their environment, there is a major drawback: The benefits of running and debugging an embedded application within an instruction set simulator (i. e. without the actual hardware being available) are pretty limited. This is because there are no or only very basic means to stimulate the application and check its reaction. For instance it is not easily possible to simulate an RFID tag being inserted in the RFID reader chip's field and check whether the expected CAN message is sent out by the embedded application.

This is where the redBlocks WYSIWYG Simulator comes into play: It can take care of all required hardware simulation in order to be able to interact with the embedded sofware application. While standard peripherals (e. g. digital and analog I/Os, displays, communication interfaces) are supported right out of the box, the behavior of all project specific and arbitrary complex peripheral devices (e. g. an RFID reader chip) can be modeled with Python simulation scripts. The developer can monitor the state of these peripherals and interact with them via a graphical representation that may look like the real product (refer to this video clip in order to see an example of a vending machine in action).


redBlocks Simulator Screenshot

The redBlocks WYSIWYG-Simulator, emulating a vending machine

And there is even more: As all interaction is happening on your development computer (i. e. without any interaction with hardware like buttons, RFID tags, ...), the user actions can easily be automated and the embedded application's reactions checked with test scripts implemented in Python. These test scripts can even be generated by the redBlocks Simulator's Test Script Recorder without any programming (see this video clip).

In order to discover how you can conveniently integrate the redBlocks Simulator with the Keil uVision IDE for hardware independent simulation on your development PC, you can download the redBlocks Evaluation Package and the free Keil uVision IDE Kickstarter Edition.

There is also a tutorial that provides a step-by-step introduction on how to use both tools together.