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) 🙂
EmbSysRegView Project
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/.
Installation
In Eclipse, use the menu Help > Install New Software and use the following update site:
http://embsysregview.sourceforge.net/update
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!):
eclipse\plugins\org.eclipse.cdt.embsysregview.data_0.2.4.r168\data
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:
Summary
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 🙂
Hello Erich, I’ve learned a lot from you blog and this one is especially great and timely. I always have to fall back to CW under Windows to debug, just because the lack of register info from stock Eclipse. Now I am able to do it without leaving my Mac. Thank you!
LikeLike
Hello Erich, Your blog has been very helpful for me in coming up the curve on using Eclipse tools with Kinetis K10 processor.
I tried to use the “Embedded Systems Register View” in my Eclipse Kepler instance, and couldn’t get the viewer to update any of the register values. The processor I am using is MK10DN512VLL10, along with IAR compiler and J-link lite debugger. I have selected the processor as “MK10D5”. I see that the Eclipse register view is updating its value, but not the “Embedded Systems Register View”. I did try to clicking the variable to turn it Green, and of no use.
Do you have any suggestions?
LikeLike
I assume you are doing this while debugging? Because the register values only get loaded while debugging.
LikeLike
When I was trying to look into PCRx registers for PORTy of my KL25Z, this plugin showed all PCRs as one “PCR%S”, which only shows PCR0 for PORTy. Do you have any idea how to check the PCRx (eg. PCR14) for PORTA/B/C/D/E? Thanks.
LikeLike
The issue is that the %s syntax of CMSIS-SVD is not supported in that plugin. With %s arrays of registers are described. This is a missing thing in this plugin. Two options: a) someone implements that in the plugin or b) you go into your XML file and ‘unroll’ that section. I might have a look at the plugin sources, unless someone else volunteers?
LikeLike
Hi Dalong,
I have extended the java sources of the register viewer, and now it correctly handles %s. Interested to try it out?
LikeLike
Pingback: EmbSys Registers View with CMSIS-SVD dimElementGroup | MCU on Eclipse
Thanks Erick this is very helpful. You ‘raw zip file’ is linked to the 0.1 version instead of the 0.2 version.
LikeLike
Thanks for catching this (that’s why I try *not* to link to a particular file).
LikeLike
Pingback: Updated Eclipse EmbSysReg Viewer with extra Freescale SVD Files | MCU on Eclipse
Hi Erich,
I have refer to your tutorials (How to Add Register Details View in Eclipse | MCU on Eclipse) did step by step , and also
Updated Eclipse EmbSysReg Viewer with extra Freescale SVD Files . while in my kds ,it still can’t check the freescale’ products.
“Unpack the archive files over your ‘eclipse’ folder.” can you tell me what’s the meaning of this words ? and put the “FSL_SVD_Patch V0.3 for EmbSysReg” to where ? I put it here :
“C:\Freescale\KDS_1.1.1\eclipse”
it doesn’t work ,then i put them to here :
“C:\Freescale\KDS_1.1.1\eclipse\plugins\org.eclipse.cdt.embsysregview.data_0.2.4.r168\data\SVD(CMSIS)\Freescale”
it still can’t work .
What should I do ? I test on kds 1.1.1 and kds 2.0.0 , both are can’t work well.
Thank you !
LikeLike
Hi Linda,
‘unpack’ means that you unzip the files. The zip file has a folder ‘eclipse’ in it: place that folder over your existing eclipse folder of KDS. It replaces few Java files and adds extra CMSIS-SVD files.
If you just place the .zip into your installation, this will not work: you need to unpack/unzip the files.
I hope this helps?
Erich
LikeLike
Thank you very much for this tutorial ! Its a way more comfortable now to debug. I use it to debug a MKL24z64 from freescale. Just a little hint for other users. If you are downloading the package and while installing you get an error like this:
“Failed to remove eclipse.exe” – just do the following steps: (they worked for me, windows 7, 64bit)
1. Do not close eclispe (this is very important)
2. Go to your ‘eclipse’ folder and rename the ‘eclipse.exe’ into something else, like ‘eclipse_1.exe’ (Normaly, you shouldn’t be able to do that, but for eclipse it works)
3. Try to download the package again, now it should be able to remove the ‘eclipse.exe’ and install the package.
4. After downloading and installing the package, restart eclipse.
5. You are done$
LikeLike
Thanks for sharing! But this is really a strange problem I have not seen yet. But good you have documented the workaround, so in case I run into it, I know now how to solve it 🙂
LikeLike
Hi Erich,
Thanks for the article, but I may have missed something. I am trying to inspect registers for the new KL46Z, but after following the above steps, there is no Freescale option for the Cortex-M0, and the SVD(CMSIS) option only gives one chip choice. Did I do something wrong, or does this patch not cover this device….?
Thanks for all the really great articles…
LikeLike
Hi William,
there is no selection for Cortex-M0. You need to select your device (KL46Z).
LikeLike
Hi,
thanks for the useful tutorial.
I tried to follow your instruction but now the current version of EmbSysRegView is 0.2.5, so I am guessing that your patch is not suitable for this version.
Any update planned?
Thanks in advance.
Greetings,
Alex
LikeLike
Hi Alex,
I have not tried that new plugin yet. You are right, that patch (of the java files) would not be applicable for this version. I had submitted my change, so I hope that fix has been incorporated. So you should be able to use the data files? Have you tried them?
LikeLike
I faced the same issue and just went ahead and copy/pasted erics files to /data/SVD(CMSIS)/Freescale of emsysregview 0.2.5. (without replacing the files that there already there) Seems to be working fine for MK20D7 so far.
LikeLike
I checked the EmbSysRegView v0.2.5 files, and they incorporate the fix I have contributed. So I have created a FSL_SVD_Patch V0.4 for EmbSysRegV0.2.5.zip on SourceForge https://sourceforge.net/projects/mcuoneclipse/files/Eclipse%20Plugins/EmbSysReg/ which only contains the data files.
LikeLike
Hi Erich,
sorry for my delay but since I am newbi with all this about Kinetis development I am having problems to get it working. I have a KL46Z board. After installing KDS and KSDK i was able to get one example compiling without error for my board (I also updated the GCC compiler, as explained in one of your tutorial). I also followed your instructions to update the board-firmware (https://mcuoneclipse.com/2014/11/01/illustrated-step-by-step-instructions-updating-the-freescale-freedom-board-firmware/). But I am getting the same error described here: freescale community thread/329710.
Since I updated the firmware to the latest P&E OpenSDA, I don’t understand why it seems to work as the CMSIS-DAP firmware was installed instead (based in the log info).
Any advice is welcome 😉
thanks in advance.
Alex
LikeLike
Duh! after reading this freescale community DOC-100705 then it was clear that i was selecting the wrong debug configuration for the corresponding updated firmware. I will test tomorrow your new patch. Thanks!!
Alex
LikeLike
Pingback: Freescale CMSIS-SVD Register Files with Eclipse MARS and EmbSysRegView | MCU on Eclipse
Erich,
using KDS 3.2 with FRDM-KL27. Register view is not available. So I installed the EmbSysRegView V0.2.5 and installed the latest xml files into C:\Freescale\KDS_v3\eclipse\plugins\org.eclipse.cdt.embsysregview.data_0.2.4.freescale\data\SVD(CMSIS). Using SVD(CMSIS), the MKL27 is not listed. But the XML files exist for MKL27 (MKL27Z4.xml and MKL27Z644.xml). Andy ideas?.
LikeLike
Hi Brad,
the folder, where the SVD files have to be installed depends on the version of the plugin you are using. So if you are using the version 0.2.5, then the data has to be in a 0.2.5 (and not 0.2.4) subfolder.
Erich
LikeLike
Thanks. That did the job.
Wasn’t KDS 3.2 supposed to have the register view included after you installed it?
LikeLike
Yes, KDS 3.2 comes with the register view included and installed. Could it be that you updated the installed one with a newer version?
LikeLike
I would love to install this plug-in, but Eclipse is telling me “Unable to install selected solutions” and “The following solutions are not compatible with this version of Eclipse”, “EmbSysRegView”.
I was using Eclipse Neon.1, but updated to Neon.3 Release 4.6.3 and am still having this same issue.
Please let me know if you know how to fix this issue.
LikeLike
Hi Joe,
I have not used it with Neon. I quickly tried it with Neon.2, and it installs. But somehow the view does not show up under Window > Show Views. I know that Eclipse Neon has changed many things and can render plugins not to work. It seems that EmbSysReg is one of it :-(. I suggest you report this to the plugin owner?
LikeLike
Erich,
Good idea. I went there trying to create a bug report, but found that it’s already existed since July of 2016. The final word on the response was “So for now, sorry, no Neon support.”
LikeLike
Pingback: MCUXPresso IDE: Unified Eclipse IDE for NXPs ARM Cortex-M Microcontrollers | MCU on Eclipse
Pingback: EmbSysRegView 0.2.6 for Eclipse Neon and Oxygen | MCU on Eclipse
Pingback: Adding CMSIS-SVD Files to EmbSysRegView 0.2.6.r192 and Eclipse | MCU on Eclipse
I followed the directions to update the files for the plugin to work with my MK64FX512VLQ12 which seems to exactly match the Freescale processor selection in the directions. When I bring up the EmbSys Registers window and double click on a portion of the registers they turn green suggesting that they were loaded but no data is shown in the Hex or Bin columns. Only the Reset, Access, Address, and Description have values. Is there something specific I could have done wrong in the installation or something else I need to do? I’m using MCUXpresso 11.1.1. The about indicates that the Eclipse Platform is 4.12.0. Thanks in advance for any help.
LikeLike
did you use any extra SVD files? I ask because the information shown is depending on the data in the .svd
LikeLike
Yes, I downloaded com.nxp.svd-embsysregview-0.2.4.sp_root_1.0.0.zip and applied those files to my eclipse plugins.
LikeLike
Weird. I the Window open this time when I started debugging and it started showing values in the Hex and Bin columns. The values look reasonable. I was debugging before but I’m not sure if I ever stepped after opening the embedded window for the first time. Looks like I’m good to go.
LikeLike
Yes, you need to debug things, otherwise you cannot get the values (I was going to ask you if you are in debug mode).
It happened to me once or twice too that the view was not showing values, but did afterwards after stepping. So indeed it could have been this.
LikeLike