Qt graphical frontend to ARMSim
QtARMSim is a graphical frontend to the ARMSim ARM simulator. It provides an easy to use multiplatform ARM emulation environment that has been designed to be used on Computer Architecture introductory courses.
It is based on a previous work of Gloria Edo Piñana, who developed GlSpim on 2008. GlSpim is the graphical part of what was planned to be a Qt graphical interface to the SPIM simulator.
The ARMSim ARM simulator, Copyright (c) 2014-17 by Germán Fabregat, is bundled with QtARMSim. It can be found on the armsim/ subdirectory.
1. Installing QtARMSim and its dependencies
QtARMSim has the following dependencies: Python3, PySide, and ARMSim. On the other hand, ARMSim, which is bundled with QtARMSim, has the next dependencies: Ruby and the GNU Gcc toolchain targeting the ARM EABI platform. The next subsections describe how to install QtARMSim, ARMSim, and their dependencies on GNU/Linux, Windows and Mac OS X.
1.1 Installing QtARMSim on GNU/Linux
The major GNU/Linux distributions already provide packages for Python3, PySide, and Ruby. Therefore, the actual GNU/Linux distribution package manager can be used to install this software. As for the GNU Gcc, the required part of the GNU Gcc toolchain targeting the ARM platform is already bundled with QtARMSim. Finally, QtARMSim itself can be installed using the pip3 command. (If after installing python3, the pip3 command is not available, it can be manually installed by saving get-pip.py, and executing: sudo python3 get-pip.py.)
For example, on Ubuntu you can install QtARMSim, ARMSim and their dependencies using:
$ sudo apt-get install python3-pyside python3-pip $ sudo apt-get install ruby $ sudo pip3 install qtarmsim
On a Gentoo distribution, you can install QtARMSim, ARMSim and their dependencies issuing (as root):
# emerge -av pyside ruby # pip3 install qtarmsim
1.2 Installing QtARMSim on Windows
To install QtARMSim, ARMSim, and their dependencies on Windows, please follow the next steps:
Download and install a 32 bits Python 3.4 version from the Python download page for windows. During the installation process, you must say yest to ‘Add python.exe to Path’. Be sure that you do NOT install:
- A Python 3.5 version, as Python 3.5, at least 3.5.1rc1, does not install the pip command and PySide does not provide binaries for Python 3.5 yet.
- A 64 bits Python, because PySide does not provide Windows binaries for 64bits Python yet.
Download and install Ruby from Ruby Installer for Windows page. During the installation process, make sure to select the ‘Add Ruby executables to your PATH’ option.
Install PySide using the pip3 command. Open a Windows console (executing either Power Shell or cmd, depending on your Windows version), and execute the next commands (assuming you installed Python 3.4 for all the users on your system, if not, change the directory to something like C:\Users\YOURUSERNAME\AppData\Local\Programs\Python\Python34, where YOURUSERNAME is the name of your user):
C:\> cd C:\Python34 C:\Python34> Scripts\pip3.exe install PySide
If the latest version of PySide is not automatically installed, i.e., if there is no binary version available for your system, install the 1.2.2 version of PySide with:
C:\Python34> Scripts\pip3 install PySide==1.2.2
Install QtARMSim using the pip3 command. On the same directory of the previous step, run the following command:
C:\Python34> Scripts\pip3.exe install QtARMSim
After installing QtARMSim, its executable will be at: C:\Python34\Scripts\qtarmsim.exe.
QtARMSim python source code under: C:\Python34\Lib\site-packages\qtarmsim\.
And the ARMSim ruby source code under: C:\Python34\Lib\site-packages\qtarmsim\armsim.
1.3 Installing QtARMSim on Mac OS X
To install QtARMSim, ARMSim, and their dependencies on Mac OS X, please follow the next steps:
Install Python 3.4:
sudo port install python34
sudo port install ruby23
sudo port install py34-pyside
sudo pip3 install QtARMSim
1.4 Installing the GNU Gcc toolchain targeting the ARM EABI
Starting with version 0.3.1 of QtARMSim, the required part of the GNU Gcc toolchain targeting the ARM platform is already bundled with QtARMSim. So this step is no longer required, unless there is some problem with the bundled GNU Gcc toolchain (for example, if QtARMSim does not assemble a given source code). In this case, another instance of GNU Gcc can be installed and used.
On GNU/Linux, this can be accomplished by installing a GNU Gcc for ARM package provided by the GNU/Linux distribution being used, by building a cross-compiling toolchain, or by extracting the gcc-arm-none-eabi tar.gz for linux32 from the Arduino download page. For example, on Ubuntu, this optional step can be achieved with:
$ sudo apt-get install gcc-arm-linux-gnueabi
And on Gentoo with:
# emerge -av crossdev # echo "PORDIR_OVERLAY=/usr/local/portage" >> /etc/portage/make.conf # crossdev --target arm --ov-output /usr/local/portage
On Windows, to perform this optional step, download the GNU Gcc ARM cross compiler for Windows from the Arduino download page. Open the gcc-arm-none-eabi-x.y.y-win32.tar.gz file, and extract the gcc-arm-none-eabi folder on any path you prefer.
Once a new GNU Gcc toolchain targeting the ARM platform is installed, please configure QtARMSim to point the ARMSim Gcc Compiler option to the new ‘arm-none-eabi-gcc’ command.
2. Executing QtARMSim
To execute QtARMSim, run the qtarmsim command, or click on the corresponding entry on the applications menu (on GNU/Linux, under the Education category).
3. Upgrading QtARMSim
To upgrade an already installed QtARMSim, execute the following command on GNU/Linux:
$ sudo pip3 install --upgrade qtarmsim
C:\Python34> Scripts\pip3.exe install --upgrade qtarmsim
On Mac OS X:
sudo pip3 install --upgrade qtarmsim
4. Uninstalling QtARMSim
To uninstall QtARMSim on GNU/Linux, execute the following command:
$ sudo pip3 uninstall qtarmsim
C:\Python34> Scripts\pip3.exe uninstall qtarmsim
On Mac OS X:
sudo pip3 uninstall qtarmsim
- Changed the icon set to the KDE Breeze one.
- LCD Display not rescaling correctly on some desktop environments fixed.
- LCD display can now be zoomed with CTRL+mouse wheel.
- Editors and panels now honor the system default point size.
- Now the menu bar is displayed on the system menu bar on Mac OS X.
- The Edit menu actions have been implemented.
- Settings values are now automatically stripped to avoid errors due to misplaced spaces.
- ARMSim: updated firmware to correct a bug on sdivide subroutine.
- ARMSim: updated firmware to provide a signed division subroutine.
- Bug corrected: waiting spinner occluded File and Edit menus.
- Added firmware ROM that provides, among others, functions to display strings and numbers on the LCD display. The new memory organization consists of two ROM blocks and two RAM blocks. The first ROM block is filled with the assembled user code. The second ROM, with the firmware machine code. The first RAM can be used to store the user program data. The second RAM is used by the LCD display.
- The graphical interface now uses a thread to retrieve the memory contents and the disassembled code from the two ROM blocks.
- The regular expressions used to highlight the code on the editors have been optimized to increase the highlighting process speed.
- Improved the Mac OS X compatibility and added installation instructions for this platform.
- Changed the minimum size of the code editor container to accommodate lower resolution screens.
- ARMSim: (i) LSL result is now bounded to 32 bits; (ii) command redirection is performed explicitly to avoid an error on newer Windows versions; and (iii) the method used to compare whether memory blocks where not defined has been changed to avoid errors on Ruby with version >= 2.3.
- Added a memory dump dock widget that allows to see and edit the memory at byte level. It also shows the ASCII equivalent of each byte.
- Added a LCD display dock widget that provides a simple output system. It has a size of 32x6 and each character is mapped to a memory position starting a 0x20070000.
- Added a visual indication of which instructions have already been executed on the left margin of the ARMSim panel.
- Added automatic scroll on simulation mode in order to keep the next line that is going to be executed visible.
- Improved the automatic selection of a mono spaced font (previously selected font used ligatures).
- Fixed an error on the Preferences Dialog which prevented to select the ARMSim directory and the Gcc ARM command line using the corresponding directory/file selector dialogs.
- ARMSim. Fixed the simulation of shift instructions: only the 8 least significant bits are now used to obtain the shift amount.
- ARMSim. Fixed the behaviour when memory outside the current memory map is accessed: each wrong access now raises a memory access error.
- Bundled a reduced set of the GNU compiler toolchain. To reduce the package size, only those files actually required to assemble an assembly source code have been included.
- Migrated from PyQt to PySide to allow a simpler installation of QtARMSim.
- Developed a new source code editor based on QPlainTextEdit, though removing the prior QScintilla dependency, which allows a simpler installation of QtARMSim.
- Improved the ARM Assembler syntax highlighting.
- Last revision of the first functional QtARMSim implementation. This implementation was used on the first semester of an introductory course on Computer Architecture at Jaume I University. This is the last version of that implementation, which used PyQt and QScintilla.