Skip to main content

phoneME on ARM device

11 replies [Last post]
roland_k81
Offline
Joined: 2007-09-07

Hi, I have buit PhoneME for ARM. It runs on the device , but I can't se the fonts.
Some body can help me?
thank you!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cxc1000
Offline
Joined: 2008-07-25

I think you are an expert at this problem.
may i have your email?
please send it to me.
my email is cxc1000@163.com
thanks

cxc1000
Offline
Joined: 2008-07-25

i got the same error, could anybody help me.

chen@chen-desktop:~/phoneme_feature_arm/cldc/build/linux_arm$ make
==================================
JVMBuildSpace = /home/chen/phoneme_feature_arm/build_output/cldc
JVMWorkSpace = /home/chen/phoneme_feature_arm/cldc
ROMIZING = true
SHELL = /bin/sh
ENABLE_ISOLATES = true
ENABLE_MONET =
==================================
==============================
creating build tools...
==============================
make[1]: Entering directory `/home/chen/phoneme_feature_arm/build_output/cldc/linux_arm/tools'
make[1]: Nothing to be done for `default'.
make[1]: Leaving directory `/home/chen/phoneme_feature_arm/build_output/cldc/linux_arm/tools'
done
==============================
creating ASM loop generator in debug mode
build flags: NO_DEBUG_SYMBOLS=true
==============================
make[1]: Entering directory `/home/chen/phoneme_feature_arm/build_output/cldc/linux_arm/loopgen/app'
make[1]: Nothing to be done for `dependencies'.
make[1]: Leaving directory `/home/chen/phoneme_feature_arm/build_output/cldc/linux_arm/loopgen/app'
make[1]: Entering directory `/home/chen/phoneme_feature_arm/build_output/cldc/linux_arm/loopgen/app'
if test "-arm" = "true-arm"; then \
echo ==================================================; \
echo 'GNU_TOOLS_DIR = /opt/Embedix/tools/arm-linux'; \
echo ==================================================; \
fi
if test "" != ""; then \
echo ==================================================; \
echo 'FORCE_GCC = '; \
echo ==================================================; \
fi
echo " ... _MergedSrc001.cpp"
... _MergedSrc001.cpp
arm-linux-g++ -O2 -Wuninitialized -fexpensive-optimizations -fomit-frame-pointer -DARM -DCROSS_GENERATOR=1 -D_DEBUG -DAZZERT -pipe -DGCC -Wreturn-type -Wcomment -Wparentheses -Wformat -fstrict-aliasing -D_DEBUG -DAZZERT -DLINUX -DREQUIRES_JVMCONFIG_H=1 -DHARDWARE_LITTLE_ENDIAN=1 -DHOST_LITTLE_ENDIAN=1 -DMSW_FIRST_FOR_DOUBLE=1 -DJVM_RELEASE_VERSION='"1.2"' -DJVM_BUILD_VERSION='"internal"' -DJVM_NAME='"phoneME Feature VM"' -fno-gnu-keywords -fno-operator-names -fno-exceptions -fno-optional-diags -fno-rtti -I"../generated" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/share/compiler" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/share/debugger" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/share/handles" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/share/memory" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/share/interpreter" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/share/isolate" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/share/natives" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/share/reflection" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/share/runtime" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/share/utilities" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/share/ROM" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/share/verifier" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/share/float" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/os/utilities" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/share/memoryprofiler" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/os/linux" -I"/home/chen/phoneme_feature_arm/cldc/src/midp" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/cpu/arm" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/cpu/c" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/cpu/i386" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/cpu/sh" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/cpu/thumb" -I"/home/chen/phoneme_feature_arm/cldc/src/vm/cpu/thumb2" -I"/home/chen/phoneme_feature_arm/cldc/src/anilib/share" -I"/home/chen/phoneme_feature_arm/cldc/src/anilib/linux" -I"/home/chen/phoneme_feature_arm/cldc/src/tools/ads_extender" -c ../generated/_MergedSrc001.cpp -o _MergedSrc001.o
{standard input}: Assembler messages:
{standard input}:7072: Error: bad instruction `int $03'
{standard input}:7936: Error: bad instruction `int $03'
{standard input}:7981: Error: bad instruction `int $03'
{standard input}:8654: Error: bad instruction `int $03'
{standard input}:9072: Error: bad instruction `int $03'
{standard input}:9090: Error: bad instruction `int $03'
{standard input}:9331: Error: bad instruction `int $03'
make[1]: *** [_MergedSrc001.o] Error 1
make[1]: Leaving directory `/home/chen/phoneme_feature_arm/build_output/cldc/linux_arm/loopgen/app'
make: *** [_loopgen] Error 2

atalanta0505
Offline
Joined: 2009-03-06

OMG...I encounted the same problem with '_MergedSrc001.o' 'unrecognized opcode 'int $03' ''

I thought I found the solution here:
http://qzone.qq.com/blog/4936698-1236159082
In this it stated that this problem caused by crosstool prefix, but I modify /cldc/build/share/jvm.make exactly as it said, but nothing got to work...
drive me mad...

kkleine
Offline
Joined: 2007-10-25

Hi,

I'm especially interessted in how you got phoneME feature compiled for ARM as target machine. My build machine is i386 linux and the target platform is ARM. When compiling the CLDC component I get this error:

[b]
generating ../generated/NativesTable.cpp ...
... BSDSocket.cpp
... FloatSupport_arm.cpp
... HotRoutines0.cpp
... HotRoutines1.cpp
... JarFileUncommon.cpp
... KniUncommon.cpp
... Main_linux.cpp
... NativesTable.cpp
... OS_linux.cpp
... OsFile.cpp
... OsFile_linux.cpp
... OsMemory.cpp
... OsMemory_linux.cpp
... OsMisc_linux.cpp
... OsSocket_linux.cpp
... PCSLSocket.cpp
copying empty ROMImage.cpp
... ROMImage.cpp
... ReflectNatives.cpp
... _MergedSrc001.cpp
{standard input}: Assembler messages:
{standard input}:25202: Error: bad instruction `int $03'
{standard input}:26068: Error: bad instruction `int $03'
{standard input}:26201: Error: bad instruction `int $03'
{standard input}:26869: Error: bad instruction `int $03'
{standard input}:26879: Error: bad instruction `int $03'
{standard input}:26961: Error: bad instruction `int $03'
make[1]: *** [_MergedSrc001.o] Error 1
make[1]: Leaving directory `/home/kkleine/phoneme/build-arm/cldc/linux_arm/loopgen/app'
make: *** [_loopgen] Error 2
[/b]

I tried to find the file(s) that cause the error:

[b]kkleine@cato:~/phoneme$ find | xargs grep 'int $03'
./phoneme_feature/cldc/src/vm/share/utilities/GlobalDefinitions_gcc.hpp:# define BREAKPOINT __asm__ ("int $03")
./phoneme_feature/cldc/src/vm/share/utilities/GlobalDefinitions_gcc.hpp:# define panic() __asm__ ("int $03")
./phoneme_feature/cldc/src/vm/share/utilities/GlobalDefinitions_intel.hpp:# define BREAKPOINT __asm__ ("int $03")
./phoneme_feature/cldc/src/vm/share/utilities/GlobalDefinitions_intel.hpp:# define BREAKPOINT __asm__ ("int $03")
[/b]

Line [b]80[/b] of the file [b]phoneme_feature/cldc/src/vm/share/utilities/GlobalDefinitions_gcc.hpp[/b] contains this itchy statement [b]#if ARM && !CROSS_GENERATOR
[/b] which seems to make it impossible to compile for [b]ARM[/b] if you're crosscompiling. Strange.

When commenting out the [b]CROSS_GENERATOR[/b] like so [b]#if ARM /*&& !CROSS_GENERATOR*/
[/b] and compiling again from scratch, I get this error:

[b]copying empty ROMImage.cpp
... ROMImage.cpp
... ReflectNatives.cpp
... _MergedSrc001.cpp
... _MergedSrc002.cpp
... _MergedSrc003.cpp
... _MergedSrc004.cpp
... _MergedSrc005.cpp
... _MergedSrc006.cpp
... jvmspi.cpp
... InterpreterSkeleton.cpp
... OopMapsSkeleton.cpp
linking ASM loop generator: ../../loopgen/app/loopgen
/usr/bin/ld: BSDSocket.o: Relocations in generic ELF (EM: 40)
BSDSocket.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[1]: *** [../../loopgen/app/loopgen] Error 1
make[1]: Leaving directory `/home/kkleine/phoneme/build-arm/cldc/linux_arm/loopgen/app'
make: *** [_loopgen] Error 2
[/b]

Is there a better documentation on compiling issues than the https://phoneme.dev.java.net/content/mr2/index_feature.html document? Somehow the [b]LD[/b] flag of my [b]make[/b] call for [b]CLDC[/b] is not used, but why?

Here's the build script I wrote to compile phoneME for i386 and ARM. I'm using the Toolchain from the Qtopia SDK by Trolltech, not the Montavista toolchain!!!

You can call the script like so: [b]./build-phoneme.sh COMPONENT PLATFORM[/b], where [b]COMPONENT[/b] can be either, [b]pcsl, pcsl-doc, cldc, cldc-doc or midp[/b] and [b]PLATFORM[/b] can either be [b]i386 or arm[/b]. Please not, that i386 works perfectly fine for me.

[b]#!/bin/bash

#==========================================================
# Adjust this path to point to your JDK 1.4.x installation
#==========================================================
export JAVA_HOME=$HOME/j2sdk1.4.2_16/

# NO CONFIGURATION NEEDED BELOW THIS LINE #################

#==========================================================
# Figure out which component to build for which platform
#==========================================================
COMPONENT="none"
TARGET_PLATFORM="i386"

if [ $# -gt 0 ]
then
COMPONENT=$1
fi

if [ $# -eq 2 ]
then
TARGET_PLATFORM=$2
fi

#==========================================================
# Setup some environment variables and create dirs.
#==========================================================
export MEHOME=`pwd`/phoneme_feature
export LOG=`pwd`/log.txt
export BUILD_OUTPUT_DIR=`pwd`/build-$TARGET_PLATFORM
export JDK_DIR=$JAVA_HOME
export PATH=/usr/local/arm-linux/bin:$JDK_DIR/bin:$PATH

if [ "$TARGET_PLATFORM" = "arm" ]
then
echo
echo "Building for ARM"
echo
export PCSL_PLATFORM=linux_arm_gcc
else
echo
echo "Building for i386"
echo
export PCSL_PLATFORM=linux_i386_gcc
fi

if ! [ -d $BUILD_OUTPUT_DIR ]
then
mkdir $BUILD_OUTPUT_DIR
fi

#==========================================================
# Build PCSL
#==========================================================
if [ "$COMPONENT" = "pcsl" ]
then
export PCSL_OUTPUT_DIR=$BUILD_OUTPUT_DIR/pcsl
cd $MEHOME/pcsl

if [ "$TARGET_PLATFORM" = "i386" ]
then
make NETWORK_MODULE=bsd/generic
else
# figure out if NETWORK_MODULE has to be bsd/qte or bsd/generic.
# qte doesn't seem to work without extra dependcies.
make NETWORK_MODULE=bsd/generic GNU_TOOLS_DIR=/usr/local/arm-linux/bin CC='arm-linux-gcc' CPP='arm-linux-g++' AR='arm-linux-ar cqs' LD='arm-linux-ld'
fi
fi

#==========================================================
# Build PCSL documentation
#==========================================================
if [ "$COMPONENT" = "pcsl-doc" ]
then
cd $MEHOME/pcsl &&\
make doc
fi

#==========================================================
# Build CLDC
#==========================================================
if [ "$COMPONENT" = "cldc" ]
then
export JVMWorkSpace=$MEHOME/cldc
export JVMBuildSpace=$BUILD_OUTPUT_DIR/cldc

if [ "$TARGET_PLATFORM" = "i386" ]
then
cd $JVMWorkSpace/build/linux_i386
make ENABLE_PCSL=true \
PCSL_OUTPUT_DIR=$BUILD_OUTPUT_DIR/pcsl \
ENABLE_ISOLATES=true
else
cd $JVMWorkSpace/build/linux_arm
make ENABLE_PCSL=true PCSL_OUTPUT_DIR=$BUILD_OUTPUT_DIR/pcsl ENABLE_ISOLATES=true CC='arm-linux-gcc' CPP='arm-linux-g++' AR='arm-linux-ar cqs' LD='arm-linux-ld' GNU_TOOLS_DIR=/usr/local/arm-linux
fi
fi

#==========================================================
# Build CLDC documentation
#==========================================================
if [ "$COMPONENT" = "cldc-doc" ]
then
export JVMWorkSpace=$MEHOME/cldc
cd $JVMWorkSpace/build/linux_i386
make docs_html
fi

#==========================================================
# Build MIDP
#==========================================================
if [ "$COMPONENT" = "midp" ]
then
export MIDP_OUTPUT_DIR=$BUILD_OUTPUT_DIR/midp

if [ "$TARGET_PLATFORM" = "i386" ]
then
cd $MEHOME/midp/build/linux_fb_gcc
make PCSL_OUTPUT_DIR=$BUILD_OUTPUT_DIR/pcsl \
CLDC_DIST_DIR=$BUILD_OUTPUT_DIR/cldc/linux_i386/dist \
TOOLS_DIR=$MEHOME/tools \
TARGET_CPU=i386 \
USE_MULTIPLE_ISOLATES=true
else
make PCSL_OUTPUT_DIR=$BUILD_OUTPUT_DIR/pcsl CLDC_DIST_DIR=$BUILD_OUTPUT_DIR/cldc/linux_arm/dist TOOLS_DIR=$MEHOME/tools TARGET_CPU=arm USE_MULTIPLE_ISOLATES=true CC='arm-linux-gcc' CPP='arm-linux-g++' AR='arm-linux-ar cqs' LD='arm-linux-ld' GNU_TOOLS_DIR=/usr/local/arm-linux
fi
fi

echo
echo "======================================"
echo "FINISHED"
echo
[/b]

[b][/b]

Message was edited by: kkleine

Message was edited by: kkleine

danila
Offline
Joined: 2006-09-25

You can find more information in VM build guide
http://java.sun.com/javame/reference/docs/cldc-hi-2.0-web/doc/build/html...

Basically, the VM build has the following major phases:
1.Build the interpreter loop generator (aka loopgen)
2.Build the ROM image generator (aka romizer, romgen)
3.Execute loopgen to generate interpreter loop
4.Execute romgen to generate ROM image
5.Build the target VM linking it with interpreter loop and ROM image.

loopgen and romgen are special flavors of the VM itself and they are build for the host platform. Thus, they should be built with host native toolchain. Target VM binary should be built with the target-specific toolchain.

I think the problem in your case is that host and target toolchains got mixed.
Since different compilers and linkers are used in a single build, explicit setting CC, CPP etc. does not work really well and is not recommended.

On my machine I use symlinks:

ar -> ../../bin/arm_v4t_le-ar
as -> ../../bin/arm_v4t_le-as
cpp -> ../../bin/arm_v4t_le-cpp
g++ -> ../../bin/arm_v4t_le-g++
gcc -> ../../bin/arm_v4t_le-gcc
gcov -> ../../bin/arm_v4t_le-gcov
ld -> ../../bin/arm_v4t_le-ld
nm -> ../../bin/arm_v4t_le-nm
ranlib -> ../../bin/arm_v4t_le-ranlib
strip -> ../../bin/arm_v4t_le-strip

tuxc
Offline
Joined: 2008-03-21

hello , danila
i got same error but toolchain is in my path. i enable my verbose option. that shows path of toolchain with arm-linux-ucilibc-g++ of bin. so how to exactly solve this problem .
in this case ? plz help ... thanks in advance

{standard input}: Assembler messages:
{standard input}:25201: Error: bad instruction `int $03'
{standard input}:26077: Error: bad instruction `int $03'
{standard input}:26212: Error: bad instruction `int $03'
{standard input}:26905: Error: bad instruction `int $03'
{standard input}:26915: Error: bad instruction `int $03'
{standard input}:26997: Error: bad instruction `int $03'
make[1]: *** [_MergedSrc001.o] Error 1
make[1]: Leaving directory `/home/phoneme_feature/build_output/cldc/linux_arm_926/loopgen/app'
make: *** [_loopgen] Error 2
[root@localhost phoneme_feature]#

danila
Offline
Joined: 2006-09-25

hello,

could you give some more lines of the console output, so that we can see the compilation command that failed. Also please post all the environment settings used for the build and the make command line.

Thanks,
Danila

tuxc
Offline
Joined: 2008-03-21

Really sorry for late.. and also thanks
i'm using FC4 and mr2 for phone ME also i set variables according to guide given with phoneME .. also i kept my arm-elf-gcc 4.1.1 toolchain in usr/local/... directory. when i putted echo in jvm.make for target_arch then it gives i386.
i think as u said 2 compilers mixed with each other.. i'll give another details but i have machine problem now.

strim
Offline
Joined: 2006-10-20

Hi Roland,

Please give us more details on your case.
What the platform and configuration are used for your ARM build?
Is it based on linux/qt or on embedded (putpixel) library of phoneME?
If you can provide screen snapshots with your problem it will ease
further discussion.

Thanks,
Strim

roland_k81
Offline
Joined: 2007-09-07

platform is os linux kernel 2.6.21, running on arm xscale cpu device.
I'm using phone me feature mr2, crosscompiled with gcc - 3.4.5 glibc 2.3.6 , and added qt library 2.3.10.
I can see the screen with images, but i'm not able to read the text of the buttons...

thank you Strim,
roland

strim
Offline
Joined: 2006-10-20

Still not enough info is here, please show us `make' command params and screenshots.
From what I see, you have used linux/qt configuration and fonts should be rendered by
Qt/E library. Please check that you built Qt/E 2.3.10 correctly. I think small native test in
C++ with sample text rendering should prove that Qt is okay and the problem is somewhere
in phoneME.

--Strim