Skip to main content

Porting phoneME to POS

7 replies [Last post]
Anonymous

Hi folks,

I want to port the phoneME to POS. I talked to Terrence Barr and he helped
me a lot with my doubts. He suggested that I should start downloading the
source code and reading the 'Getting Started'.

I want to port just the basic JVM. I don't need Network, Printer, etc. I
have all those things but in a very special way, so I want to create my own
classes to work with Network, Printers, etc. And I can't find a guide about
how to port phoneME to new devices.

Inside the folder 'phoneme_feature\cldc\src\vm\os' I found some OS-dependent
code. I can rewrite them to my own OS. Is it all worrk I should do? Do you
guys have any guide I can read about it? Any tip?

Best regards,
Mauricio
[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
terrencebarr
Offline
Joined: 2004-03-04
Points: 0

Mauricio,

Sorry for the slow reply. The engineer who wanted to get to your question was distracted so let me answer it for now.

The basic phoneME Feature VM is very easy to port. I've ported phoneME Feature to a new platform myself in three days and most of that was setting up the tools and making the build system work for the target OS platform.

Basically, all you need is to spawn a single thread on the target OS that will be used to run the VM as well as provide a timer tick to the VM for scheduling purposes. Step-by-step instructions are described in the CLDC-HI porting guide:

http://java.sun.com/javame/reference/docs/cldc-hi/index.html

You should start with porting the JavaCall porting layer as that gives you additional features you will probably need down the road.

Hope this helps,

-- Terrence

Mauricio Aniche

Hi Terrence,

I am trying to work on it again! My first step was to build the JavaCall
porting layer. I configured all the variables, but I got this error:

C:\Apps\phoneme_feature>c:/cyg4me/bin/make -C
C:/APPS/PHONEME_FEATURE/javacall-c
om/configuration/phoneMEFeature/win32_emul
make: *** No rule to make target `C:/APPS/PHONEME_FEATURE/lime/lime.h',
needed b
y `C:/APPS/PHONEME_FEATURE/build_output/javacall/inc/lime.h'. Stop.
make: Entering directory
`C:/APPS/PHONEME_FEATURE/javacall-com/configuration/pho
neMEFeature/win32_emul'
make: Leaving directory
`C:/APPS/PHONEME_FEATURE/javacall-com/configuration/phon
eMEFeature/win32_emul'

I can see this line on mkfile:
LIME_DIR ?= $(COMPONENTS_DIR)/lime

But I can't find the /lime directory! I am using Phone Me MR3.

Am I doing something wrong?

Thanks in advance,
Mauricio

On Wed, Jul 16, 2008 at 9:48 AM, terrencebarr wrote:

> Mauricio,
>
> Sorry for the slow reply. The engineer who wanted to get to your question
> was distracted so let me answer it for now.
>
> The basic phoneME Feature VM is very easy to port. I've ported phoneME
> Feature to a new platform myself in three days and most of that was setting
> up the tools and making the build system work for the target OS platform.
>
> Basically, all you need is to spawn a single thread on the target OS that
> will be used to run the VM as well as provide a timer tick to the VM for
> scheduling purposes. Step-by-step instructions are described in the CLDC-HI
> porting guide:
>
> http://java.sun.com/javame/reference/docs/cldc-hi/index.html
>
> You should start with porting the JavaCall porting layer as that gives you
> additional features you will probably need down the road.
>
> Hope this helps,
>
> -- Terrence
> [Message sent by forum member 'terrencebarr' (terrencebarr)]
>
> http://forums.java.net/jive/thread.jspa?messageID=287020
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: feature-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: feature-help@phoneme.dev.java.net
>
>
[att1.html]

Mauricio Aniche

Hi,

I got JavaCall compiled!!

My problem now is on PCSL. I am getting this error:

building memory module...
c:\cyg4me\bin\make.exe[2]: Entering directory
`C:/APPS/PHONEME_FEATURE/pcsl/memo
ry/heap'
pcsl_memory.c
pcsl_memory.c(639) : error C2220: warning treated as error - no 'object'
file ge
nerated
pcsl_memory.c(639) : warning C4996: 'strcpy': This function or variable may
be u
nsafe. Consider using strcpy_s instead. To disable deprecation, use
_CRT_SECURE_
NO_WARNINGS. See online help for details.
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\string.h(74)
: s
ee declaration of 'strcpy'
c:\cyg4me\bin\make.exe[2]: ***
[C:/APPS/PHONEME_FEATURE/build_output/pcsl/javaca
ll_i386/obj/pcsl_memory.o] Error 2
c:\cyg4me\bin\make.exe[2]: Leaving directory
`C:/APPS/PHONEME_FEATURE/pcsl/memor
y/heap'
c:\cyg4me\bin\make.exe[1]: *** [all] Error 2
c:\cyg4me\bin\make.exe[1]: Leaving directory
`C:/APPS/PHONEME_FEATURE/pcsl/memor
y'
make: *** [all] Error 2
make: Leaving directory `C:/APPS/PHONEME_FEATURE/pcsl'

Any tip?

Thanks in advance,
Mauricio

On Mon, Sep 22, 2008 at 7:31 PM, Mauricio Aniche
wrote:

> Hi Terrence,
>
> I am trying to work on it again! My first step was to build the JavaCall
> porting layer. I configured all the variables, but I got this error:
>
> C:\Apps\phoneme_feature>c:/cyg4me/bin/make -C
> C:/APPS/PHONEME_FEATURE/javacall-c
> om/configuration/phoneMEFeature/win32_emul
> make: *** No rule to make target `C:/APPS/PHONEME_FEATURE/lime/lime.h',
> needed b
> y `C:/APPS/PHONEME_FEATURE/build_output/javacall/inc/lime.h'. Stop.
> make: Entering directory
> `C:/APPS/PHONEME_FEATURE/javacall-com/configuration/pho
> neMEFeature/win32_emul'
> make: Leaving directory
> `C:/APPS/PHONEME_FEATURE/javacall-com/configuration/phon
> eMEFeature/win32_emul'
>
> I can see this line on mkfile:
> LIME_DIR ?= $(COMPONENTS_DIR)/lime
>
> But I can't find the /lime directory! I am using Phone Me MR3.
>
> Am I doing something wrong?
>
> Thanks in advance,
> Mauricio
>
>
> On Wed, Jul 16, 2008 at 9:48 AM, terrencebarr wrote:
>
>> Mauricio,
>>
>> Sorry for the slow reply. The engineer who wanted to get to your question
>> was distracted so let me answer it for now.
>>
>> The basic phoneME Feature VM is very easy to port. I've ported phoneME
>> Feature to a new platform myself in three days and most of that was setting
>> up the tools and making the build system work for the target OS platform.
>>
>> Basically, all you need is to spawn a single thread on the target OS that
>> will be used to run the VM as well as provide a timer tick to the VM for
>> scheduling purposes. Step-by-step instructions are described in the CLDC-HI
>> porting guide:
>>
>> http://java.sun.com/javame/reference/docs/cldc-hi/index.html
>>
>> You should start with porting the JavaCall porting layer as that gives you
>> additional features you will probably need down the road.
>>
>> Hope this helps,
>>
>> -- Terrence
>> [Message sent by forum member 'terrencebarr' (terrencebarr)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=287020
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: feature-unsubscribe@phoneme.dev.java.net
>> For additional commands, e-mail: feature-help@phoneme.dev.java.net
>>
>>
>
[att1.html]

Davy Preuveneers

On Tuesday 23 September 2008, Mauricio Aniche wrote:
> Hi,
>
> I got JavaCall compiled!!
>
> My problem now is on PCSL. I am getting this error:
>
> building memory module...
> c:\cyg4me\bin\make.exe[2]: Entering directory
> `C:/APPS/PHONEME_FEATURE/pcsl/memo
> ry/heap'
> pcsl_memory.c
> pcsl_memory.c(639) : error C2220: warning treated as error - no 'object'
> file ge
> nerated
> pcsl_memory.c(639) : warning C4996: 'strcpy': This function or variable may
> be u
> nsafe. Consider using strcpy_s instead. To disable deprecation, use
> _CRT_SECURE_
> NO_WARNINGS. See online help for details.
> C:\Program Files\Microsoft Visual Studio
> 9.0\VC\INCLUDE\string.h(74)
>
> : s
>
> ee declaration of 'strcpy'
> c:\cyg4me\bin\make.exe[2]: ***
> [C:/APPS/PHONEME_FEATURE/build_output/pcsl/javaca
> ll_i386/obj/pcsl_memory.o] Error 2
> c:\cyg4me\bin\make.exe[2]: Leaving directory
> `C:/APPS/PHONEME_FEATURE/pcsl/memor
> y/heap'
> c:\cyg4me\bin\make.exe[1]: *** [all] Error 2
> c:\cyg4me\bin\make.exe[1]: Leaving directory
> `C:/APPS/PHONEME_FEATURE/pcsl/memor
> y'
> make: *** [all] Error 2
> make: Leaving directory `C:/APPS/PHONEME_FEATURE/pcsl'
>
> Any tip?
>
> Thanks in advance,
> Mauricio

I think you need to modify the pcsl/makefiles/share/vc.gmk build file and add
the _CRT_SECURE_NO_WARNINGS compiler flag to the CFLAGS environment variable
to make sure that warnings are no longer treated as errors.

Davy

---------------------------------------------------------------------
To unsubscribe, e-mail: feature-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: feature-help@phoneme.dev.java.net

Mauricio Aniche

Hi Davy,

It works! I was reading in another post (
http://forums.java.net/jive/thread.jspa?messageID=293910) and you said that
it's easier to port CLDC without the JavaCall layer. Is it true? I don't
need PCSL or any JSR, because I don't want to run MIDPs! I just want to run
some java classes I am going to write specific to my device! That's why I
need only the CLDC.

I am going to rewrite the cldc/sr/vm/os/win32 files to my OS. How do I set
the build environment to use my compiler/linker tool?

Thanks in advance,
Mauricio

On Mon, Sep 22, 2008 at 8:44 PM, Davy Preuveneers <
davy.preuveneers@cs.kuleuven.be> wrote:

> On Tuesday 23 September 2008, Mauricio Aniche wrote:
> > Hi,
> >
> > I got JavaCall compiled!!
> >
> > My problem now is on PCSL. I am getting this error:
> >
> > building memory module...
> > c:\cyg4me\bin\make.exe[2]: Entering directory
> > `C:/APPS/PHONEME_FEATURE/pcsl/memo
> > ry/heap'
> > pcsl_memory.c
> > pcsl_memory.c(639) : error C2220: warning treated as error - no 'object'
> > file ge
> > nerated
> > pcsl_memory.c(639) : warning C4996: 'strcpy': This function or variable
> may
> > be u
> > nsafe. Consider using strcpy_s instead. To disable deprecation, use
> > _CRT_SECURE_
> > NO_WARNINGS. See online help for details.
> > C:\Program Files\Microsoft Visual Studio
> > 9.0\VC\INCLUDE\string.h(74)
> >
> > : s
> >
> > ee declaration of 'strcpy'
> > c:\cyg4me\bin\make.exe[2]: ***
> > [C:/APPS/PHONEME_FEATURE/build_output/pcsl/javaca
> > ll_i386/obj/pcsl_memory.o] Error 2
> > c:\cyg4me\bin\make.exe[2]: Leaving directory
> > `C:/APPS/PHONEME_FEATURE/pcsl/memor
> > y/heap'
> > c:\cyg4me\bin\make.exe[1]: *** [all] Error 2
> > c:\cyg4me\bin\make.exe[1]: Leaving directory
> > `C:/APPS/PHONEME_FEATURE/pcsl/memor
> > y'
> > make: *** [all] Error 2
> > make: Leaving directory `C:/APPS/PHONEME_FEATURE/pcsl'
> >
> > Any tip?
> >
> > Thanks in advance,
> > Mauricio
>
> I think you need to modify the pcsl/makefiles/share/vc.gmk build file and
> add
> the _CRT_SECURE_NO_WARNINGS compiler flag to the CFLAGS environment
> variable
> to make sure that warnings are no longer treated as errors.
>
> Davy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: feature-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: feature-help@phoneme.dev.java.net
>
>
[att1.html]

Davy Preuveneers

On Tuesday 23 September 2008 15:44:21 Mauricio Aniche wrote:
> Hi Davy,
>
> It works! I was reading in another post (
> http://forums.java.net/jive/thread.jspa?messageID=293910) and you said that
> it's easier to port CLDC without the JavaCall layer. Is it true? I don't
> need PCSL or any JSR, because I don't want to run MIDPs! I just want to run
> some java classes I am going to write specific to my device! That's why I
> need only the CLDC.
>
> I am going to rewrite the cldc/sr/vm/os/win32 files to my OS. How do I set
> the build environment to use my compiler/linker tool?
>
> Thanks in advance,
> Mauricio

When I compile CLDC for WinCE using the eVC4 compiler, I do the following in a
cyg4me shell:

export TOP=c:/phoneme_feature
export OUTPUT=c:/out

cd $TOP/cldc/build/wince_arm
make JDK_DIR=c:/j2sdk1.4.2_18 JVMWorkSpace=$TOP/cldc
JVMBuildSpace=$OUTPUT/cldc ENABLE_ISOLATES=true USE_VS2005=false

I do not compile javacall or PCSL for a plain CLDC build.

Davy

---------------------------------------------------------------------
To unsubscribe, e-mail: feature-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: feature-help@phoneme.dev.java.net

Mauricio Aniche

Hi Davy,

I am going to try both... I just got my javacall compiled. Now I am trying
to set the environment for cdlc. I found this comment at
build/javacall_linux_arm:

# See ../../docs/HowToBuild.txt for build instructions. See
# ../share/README for an explanation of the build system and how to
# create a build system for a new configuration.

Where are those files?

I need to learn something about how to create a build system for my
config... javacall_myplatform_arm.

Thanks in advance,
Mauricio

On Wed, Sep 24, 2008 at 7:46 AM, Davy Preuveneers <
davy.preuveneers@cs.kuleuven.be> wrote:

> On Tuesday 23 September 2008 15:44:21 Mauricio Aniche wrote:
> > Hi Davy,
> >
> > It works! I was reading in another post (
> > http://forums.java.net/jive/thread.jspa?messageID=293910) and you said
> that
> > it's easier to port CLDC without the JavaCall layer. Is it true? I don't
> > need PCSL or any JSR, because I don't want to run MIDPs! I just want to
> run
> > some java classes I am going to write specific to my device! That's why I
> > need only the CLDC.
> >
> > I am going to rewrite the cldc/sr/vm/os/win32 files to my OS. How do I
> set
> > the build environment to use my compiler/linker tool?
> >
> > Thanks in advance,
> > Mauricio
>
>
> When I compile CLDC for WinCE using the eVC4 compiler, I do the following
> in a
> cyg4me shell:
>
> export TOP=c:/phoneme_feature
> export OUTPUT=c:/out
>
> cd $TOP/cldc/build/wince_arm
> make JDK_DIR=c:/j2sdk1.4.2_18 JVMWorkSpace=$TOP/cldc
> JVMBuildSpace=$OUTPUT/cldc ENABLE_ISOLATES=true USE_VS2005=false
>
> I do not compile javacall or PCSL for a plain CLDC build.
>
> Davy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: feature-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: feature-help@phoneme.dev.java.net
>
>
[att1.html]