So I have written some step by step guides, like a log of what I do to successfully write and program firmware into Freescale ARM based Kinetis microcontrollers. Freescale released KDS sometime ago, I tried the alpha/beta release and while it was fine, I was in a hurry to finish other things. I have had time to test KDS 2.0.0 and it is amazing how it reduces time to set up. You just get one file, install and you have everything you need to jump start your Linux firmware development for Freescale Kinetis chips.
The installation files
Grab the .deb installer (I am using Ubuntu 14.04) from Freescale download page
you can right-click and open with ubuntu software center, or run the command
sudo dpkg -i kds-file.deb
where kds-file.deb is the installation file downloaded. In this case, I had kinetis-design-studio_2.0.0-1_amd64.deb.
KDS gets installed in the directory /opt/Freescale/KDS_2.0.0/
KDS2.0.0 is based on Eclipse Kepler
In this installation you have an eclipse folder, three debug server folders: openocd, pemicro and segger, a toolchain folder, a licences folder as well as a documents(docs) folder. The openocd tcl configuration scripts are in the openocd folder, as expected. The main configuration script is a kinetis.cfg but there’s a target folder in there with some specific targets worth looking at. The installation process is quite complete, with even device udev rules being set up automatically. I did not have to do a thing, other than the usual tweaking and additions for a serial port terminal.
Adding eclipse plugins to KDS 2.0.0
In Linux(I am using ubuntu), Its necessary to launch KDS from the terminal with super user permissions to be able to install additional plugins:
Processor Expert Graphical-Based Inspector View
The other thing I found bothering was the Processor Expert tabs-view in component inspector, I am not used to it and i had to set it off every time I open a project. To disable it globally in KDS, go to Window->Preferences->Processor Expert->General->Prefered inspector view
and set it to Classic View, the tree-based inspector. Click Apply and then OK button.
Using internal Web Browser
One of the quickest way to learn how to use Processor Expert components you haven’t used before is to right click the component, and select the Help on Component option. Sometimes the HTML documentation page opens in an external browser, while that is entirely fine, I would like to work within the same IDE, since I am already using a full blown IDE and i have a wide enough screen, without having to switch applications. To configure the internal browser, go to Window->Preferences->Default->Web Browser and select the Use Internal Web Browser option. If the option is grayed out, it means you either are missing some components in the system you need to install, or need the following settings in the eclipse.ini file, or in this case, the /opt/Freescale/KDS_2.0.0/eclipse/kinetis-design-studio.ini file
I tried using KDS2.0.0 with FRDM-KL05Z board. Here is a summary of my experience:
- OpenOCD generally doesn’t work out-of-the-box in Linux, you can install openocd independently and connect externally to the IDE though, by chosing connect to a running target on the debugger tab
- PE Micro GDB server works out-of-the-box in Linux. Semihosting works with Erich Styger’s KDS semihosting ‘printf’ tweaks but only prints One character: printf() problems and the latest PE opensda firmware for kl05z virtual comport gets enumerated but doesn’t work 🙁
- JLink GDB server works out-of-the-box in Linux. Semihosting works fully with Erich Styger’s KDS semihosting ‘printf’ tweaks but the Jlink opensda firmware has not USB-CDC virtual com port
- KDS2.0.0 in Linux has at least an issue with every debug server. You cant get both virtual com port and semi-hosting with any of them, but at least you can choose either of them
If you know any more pointers on using KDS, please feel free to share.