The eclipse based CodeWarrior for MCU10.2 comes with many unique extensions of the eclipse platform, implemented by Freescale. One of these featured mentioned in my post is the ability to inspect the registers in an offline mode: The Offline Register view. How is this different from the Registers view?
The Registers view provides bit level information of the registers. Not only for the CPU core registers, but as well for all the peripheral registers on the device:
While this is great, there was one limitation: I had to be connected to the target device to see that information. I say ‘was’, because the good news is: CodeWarrior for MCU10.2 implements an off-line viewer to inspect the registers. Without a debug session I can use the Offline Register view. I use a toolbar icon to open the Offline Register view:
In that view (the Register Details view) I can select the microcontroller I’m using:
I have the same information as in the Registers view, except that I do not need to run a debug session. Of course I will not see the values on the target, and I cannot change the values. But it helps me to write my software having all the register detail information available in offline mode.
But there is another way to use the that view: During debugging, I can export the registers to a file and inspect them later using the offline view. For this I use the ‘Export registers’ toolbar button in the Register view during debugging:
I can specify if I want to export everything or just my selected registers. The content is then saved in the file I specify:
The file will have a .regs extension. Then I can open that file in CodeWarrior. Notice that as this is now an editor of the .regs file, I can change the content:
It has as well a ‘Text Editor’ tab where I can inspect and edit the XML:
That way I can edit my registers offline, and later import them the same way I used to export it. That saves me a lot of debugging time.
Happy Offlining 🙂