Technical information
KDWP
4-4 G24 KJAVA User’s Guide July 15, 2008
KDWP
KDWP is used for MIDlet "on target" debugging. Its "Debug agent" (PC application)
communicates with the target’s KVM over RS232 (A serial connection must be set between G24
UART2 and PC COM). Only UART2 can be used, therefore Serial Logs should be routed to
UART1, USB or disabled.
IDE application must be JPDA (Java Platform Debugger Architecture) compliant to be able to
attach to "Debug agent". Known JPDA compliant IDEs are: NetBeans, Eclipse and JBuilder.
All KDWP relevant files (including detailed activation procedure) can be found in the related
bundle located in MOTODEV website, see reference [4].
Note:
• MIDlet must be compiled with debug information.
• After restart KDWP is off.
Activation Procedure
1. Switch to JTool.
2. Enable KDWP on unit (“OEMkdwpon” command).
3. Set UART2's baud rate to 115200.
4. Switch to MIDlet Manager.
5. Execute the following command on a PC (in KDWP folder):
java -jar kdp.jar -v 9 -r serial: <com_port_number> -l <debugger_port_number> -cp
<classes>
• com_port_number - port number on PC
• debugger_port_number - port to be used by IDE debugger
• classes - semicolon separated files with classes to debug including MIDlet's JAR file.
Note: MIDlet JAR file must be in KDWP folder.
Example:
java -jar kdp.jar -v 9 -r serial: 1 -l 1234 -cp WSupdata.jar
6. Start IDE and set breakpoints as needed.
7. Attach debugger to IDE.
Note that IDE should attach to the same port number as in <debugger_port_number>.
8. In order to quit KDWP G24 should be restarted (restarting will take ~30 seconds).