I have Kinetis Design Studio (KDS) version 3 installed on my Ubuntu 16.04 machine. I know I can use PE Micro gdbserver from the eclipse IDE interface, but what about putting it in a makefile somewhere because I am turning into an automation freak 😛
The reason I want this is simple, I am doing baremetal development for the FRDM-KL25Z NXP KIT and I want to use a makefile to automate everything. I only edit the code in Gedit. I could use OpenOCD, but the CMSIS-DAP firmware for the KIT doesn’t support a serial port through the debug interface, while other firmwares, including the PE micro one do, infact it supports all 3 things including a debug port, a serial port and an enumerated MSD Device.
so I looked for the file using locate command:
locate pegdbserver /opt/Freescale/KDS_v3/eclipse/plugins/com.pemicro.debug.gdbjtag.pne_22.214.171.124602211227/lin/pegdbserver_console /opt/Freescale/KDS_v3/eclipse/plugins/com.pemicro.debug.gdbjtag.pne_126.96.36.199602211227/win32/pegdbserver_console.exe
I have no idea why we have a windows version exe file here, but am not concerned much.
so I can run it like this:
/opt/Freescale/KDS_v3/eclipse/plugins/com.pemicro.debug.gdbjtag.pne_188.8.131.52602211227/lin/pegdbserver_console -startserver -device=Freescale_KL2x_KL25Z128M4
to debug the FRDM-KL25Z board. To make it even easier to run in the terminal, I create a soft link:
sudo ln -s /opt/Freescale/KDS_v3/eclipse/plugins/com.pemicro.debug.gdbjtag.pne_184.108.40.206602211227/lin/pegdbserver_console /usr/local/bin/pegdbserver
Now I can just run it like as:
pegdbserver -startserver -device=NXP_KL2x_KL25Z128M4
To get the name of devices supported, use the devicelist switch, combined with grep filters
pegdbserver -devicelist | grep NXP_KL2x_<\code><\pre>