Skip to main content

Help:I want a phoneme advanced pp which support debug

6 replies [Last post]
Joined: 2009-03-31

Dear Sir,
I am a student from China.
I want a phoneme advanced personal profile which support debug for windows mobile 6.1,that is to say it must support jvmdi and jvmpi or jvmti.
I have visited the about how to build a phoneme advanced myself, I know the author offer some downloads but they can't support debugging. So I build one myself following the author, but I have so many problem...I lose...
So can anyone offer me one.
My email:
Thank you very much.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2008-06-27


Don't know if this will help, but here are some parts of my build file that successfully builds the debug version of phoneME foundation.
Note that Davy's diff files have to be applied first.

export USE_VERBOSE_MAKE=false
export VERBOSE_BUILD=false
export J2ME_CLASSLIB=foundation
export CVM_DUAL_STACK=true
export CVM_DEBUG=false
export USE_ON_DEVICE_DEBUG=false
export USE_WTK_DEBUG=false
export LIBPATH=
export JAVACALL_OUTPUT_DIR=$TOP_DIR/javacall/configuration/phoneMEAdvanced/wince_arm
export PATH=/cygdrive/c/Program\ Files/Microsoft\ Visual\ Studio\ 8/VC/bin:$PATH
export RC=/cygdrive/c/Program\ Files/Microsoft\ Visual\ Studio\ 8/VC/bin/rc.exe
export RESTRICTED_CRYPTO_DIR=$PHONEME_C_PATH/restricted_crypto

cd cdc/build/win32-arm-wm5

echo Start building debug version...
make \
J2ME_CLASSLIB=foundation \
CVM_DEBUG=true \
CVM_JIT=false \
CVM_JVMDI=true \
USE_VS2005=true \
USE_JPEG=true \
USE_MIDP=true \

Using this it is possible to connect Eclipse to the JVM.
Connect the phone using Active Sync and set remote address in Eclipse to

My argument list to start phoneME looks like this:

-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 -Dmicroedition.locale=sv -Xopt:useLargeMemoryArea=true -Xmx8M -Xms6M -Xmn6M -Dmicroedition.profiles=MIDP-2.1 "-Dsun.midp.home.path=\Program\[myapp]\phoneme\midp\midp_wince" sun.misc.MIDPLauncher -midppath "\Program\[myapp]\phoneme\midp\midp_wince\classes" -suitepath "\Program\[myapp]\midlet\[mymidlet.jar]" -1 [package_to_midlet_and_class]

I hope this helps on getting your debug environment up and running.

Joined: 2009-03-31

Dear tunared,
Your words really help, but I still have some problems:
1.There is a patch file named Icon.diff, but if I patch it, the cygwin will tell me that it can't find the icon resource, what's your method.
2.I just have used jvmti before and I don't know jvmdi very much, but the phoneme just support jvmdi now, so I have no choice.
But I have problem in using jvmdi. First of all, if I make a *.dll which include the jvmdi.h, then how could I use it to monitor the application running in my phoneme?
Your argument list to start phoneME is so long that I don't know the means very clearly.
Looking forward for help.

Message was edited by: bbsunchen

Joined: 2008-06-27


  1. Never seen this problem.
  2. Your bin folder should have the following files after building with debug enabled:
    • cvm.exe
    • cvmi.dll
    • dt_socket_g.dll
    • java_crw_demo_g.dll (I guess not really needed)
    • jdwp_g.dll
    • jvmtihprof_g.dll

Starting up the cvm.exe with the -Xdebug and Xrunjdwp arguments, along with the others, should set everything up for you. Most of the other arguments are needed to be able to run the phoneME. I guess you have something similiar. Are you using Eclipse for your java application development? In that case there's a lot of info on how to connect to a JVM. It is the same method to be used to connect to a desktop JVM.


Joined: 2009-03-31

Dear Sir,
Thank you for helping me so much.
I just want to know what's running in my phoneme, so I want to use the jvmti functions to print out the the names of methods which are running in my phoneme.
I have just compile again, and this time I meet this problem:

COMMON_TOOLS_PATH = ls: cannot access /cygdrive/e/Program Files/Microsoft Visual Studio 8/Common7/Tools/Bin:/cygdrive/e/Program Files/Microsoft Visual Studio 8/Common7/IDE: No such file or directory
INCLUDE = C:/Program Files/Windows CE Tools/wce500/Windows Mobile 5.0 Pocket PC SDK/Include/Armv4i;E:/Program Files/Microsoft Visual Studio 8/VC/ce/include;E:/Program Files/Microsoft Visual Studio 8/VC/ce/atlmfc/include
LIB = C:/Program Files/Windows CE Tools/wce500/Windows Mobile 5.0 Pocket PC SDK/Lib/Armv4i;E:/Program Files/Microsoft Visual Studio 8/VC/ce/lib/armv4i;E:/Program Files/Microsoft Visual Studio 8/VC/ce/atlmfc/lib/armv4i
...mkdir /phoneme_advanced_mr2/cdc/build/win32-arm-wm5/cdc_dbg/generated/flags
Flag CVM_AGENTLIB changed. Cleaning up.
bash: personal_dbg/ No such file or directory
make: *** [CVM_AGENTLIB] Error 1

Do you know what is the problem
I setup the visual studio 2005 in my e: driver and there are parts of the files in e: driver and still some files in c: driver(the system driver which the cygwin locates), I guess maybe this is the problem.
I have no problem in building a foundation version , but I meet problem in building a personal profile one.
May you tell me how to contact you, such as using the gtalk so that I can contact with you, my I am thirsty for a success as I have tried it for about 3 days and nights.

Message was edited by: bbsunchen

Joined: 2008-06-27

Hello again!

I've never build the personal profile version, but I think that's a completely different approach for that.

About the COMMON_TOOLS_PATH error just ignore it. I do! ;)
Mine looks like this:
COMMON_TOOLS_PATH = ls: cannot access /cygdrive/c/Program Files/Microsoft Visual Studio 8/VC/bin:/cygdrive/c/Program Files/Microsoft Visual Studio 8/Common7/Tools/Bin:/cygdrive/c/Program Files/Microsoft Visual Studio 8/Common7/IDE: No such file or directory

Sorry that I can't help you more. Hopefully someone else has experience with building the personal profile version.


Joined: 2009-03-31

Dear Sir,
I have re-edit my last post, because I find that I have lost an error. So...maybe you can have a look at it again.
Thank you very much for your help.