The standard Eclipse registers view only shows the core registers:
I think it would be great to have a view to see all the device peripheral registers too?
If you want the same, then this article is for you. It works both for stock Eclipse and Freescale Kinetis Design Studion (KDS) 🙂
An open source project makes it possible: the EmbSysRegView project (http://embsysregview.sourceforge.net/)
The released binaries are hosted on SourceForge (http://sourceforge.net/projects/embsysregview/) and sources are available in a SVN repository at http://sourceforge.net/p/embsysregview/code/HEAD/tree/.
In Eclipse, use the menu Help > Install New Software and use the following update site:
Alternativly, the menu Help > Eclipse Marketplace can be used. Search for ‘register view’:
Install both the Embedded Systems Register View and the EmbSysRegView Data.
The plugin comes with periperhal (XML) files for many architectures: Atmel, NXP, SiliconLabs, STMicroelectronics, Texas Instruments, Holtek, Nuvoton, Spansion.
❗ As of the current 0.2.4 release of EmbSysRegView, Freescale devices are *not* supported. This is foreseen for 0.2.5. If you are using Freescale devices, follow the steps below to add support for Freescale ARM devices.
XML Device Files
The data plugin installs XML files describing the peripherals in the following folder inside Eclipse (path depends on the version number of the plugin!):
Here I can add extra XML description files to support more microcontroller. The really cool part is that the plugin supports CMSIS-SVD files. SVD (System View Description) files are standard introduced by ARM (see http://www.keil.com/pack/doc/CMSIS/SVD/html/index.html). Originally ARM intended to host on their side all CMSIS-SVD files from all the ARM licensees, but somehow this did not work out (probably because every vendor wanted to their own stuff). But as the EmbSysRegView plugin supports SVD files, and you get them from your vendor (if not already delivered with the plugin), I have peripheral register detail level debugging support 🙂
SVD and Freescale ARM Device Support
The 0.2.4 release (the latest version at the time of writing this article) does *not* support the CMSIS-SVD files produced by Freescale. The reason is that the Freescale CMSIS-SVD files are using SVD files which are not supported by the plugin. For example the files have value entries like
<value>0x</value> <value>#1xx</value> <value>10x1</value>
which confuses the EmbSysRegView parser (see http://sourceforge.net/p/embsysregview/patches/21/?limit=25). The 0.2.4 plugin has that fix not included, so I have a patch and extra data files for Freescale users.
Freescale Kinetis Patch for v0.2.4
Follow the steps below to apply the patch to the v0.2.4 plugins and data files to support Freescale Kinetis devices:
- Make sure that you have the 0.2.4 plugins installed (from above).
- Download the latest zip archive file version from here.
- Close Eclipse if running.
- Unpack the archive files over your ‘eclipse’ folder.
- Restart Eclipse.
Using the Plugin
Open the ‘EmbSys Registers’ view (menu Window > Show View > Others > Debug > EmbSys Registers):
The first time I open that view, it has no chip/device selected:
There are two ways to set the device:
- Using the workspace settings with the menu Window > Preferences > C/C++ > Debug > EmbSys Register View:
- To faster way is to use the little icon in the view itself:
In the dialog then select the device you want to debug. For Freescale Devices select SVD(CMSIS).
To read the register values from the device, double-click on the item: the icon turns green:
Double click again to return to ‘do not read from device’ mode.
A drop-down menu in the Hex column is used to change the value, and gives hints about the bit settings:
The binary column is used to change bits:
With the Embedded Systems Register View I have now a way to inspect and change the peripheral registers of my device under debug. something I do not have with stock Eclipse, but possible with open source software and CMSIS-SVD files.
Happy Registering 🙂