Hi
I have a beagleboard revc4 and android 2.2 with kernel 2.6.32.
I boot up from mmcsdcard and it boots well.
I would like to run a bin file in order to test my new driver but,
there is a problem
My file is located on the top of the tree in the rootfs.
#>./SmsSample
#>[1] Segmentation fault ./SmsSample
Does anyone knows this kind of problem ?
Thanks
most likely memory address error due to using pointers.
Thank you for your reply, but I add some printf("ok1");
printf("ok2") ... in the code of SmsSample.
But I can't see any ok1 ok2 ... at all in the console !!
T
So the SmsSample file is not executed right ?
Thank you for your reply, but I add some printf("ok1");
printf("ok2") ... in the code of SmsSample.
But I can't see any ok1 ok2 ... at all in the console !!
T
So the SmsSample file is not executed right ?
How did you create 'SmsSample'?
The way to figure out what's going on is to use gdb.
% gdb SmsSample
(gdb) run
It will tell you exactly where it fails - it's up to you to figure out why.
Hi,
Le 02/09/2011 16:34, tbezierslafosse@cameon-dev.com a �crit :
I have a beagleboard revc4 and android 2.2 with kernel 2.6.32.
I boot up from mmcsdcard and it boots well.
I would like to run a bin file in order to test my new driver but,
there is a problem
My file is located on the top of the tree in the rootfs.
#>./SmsSample
#>[1] Segmentation fault ./SmsSample
Does anyone knows this kind of problem ?
how is generated this binary ?
Eric
It is generated from source that I have.
I use a makefile and in a terminal I do :
make all
then all .c are compiled and give me a SmsSample file
Of course, I use a toolchaine for cross-compile it on arm.
Le 02/09/2011 17:25, tbezierslafosse@cameon-dev.com a �crit :
It is generated from source that I have.
I use a makefile and in a terminal I do :
make all
then all .c are compiled and give me a SmsSample file
Of course, I use a toolchaine for cross-compile it on arm.
are you sure that this toolchain is using the right libraries to generate an application which will execute under android ?
Eric
I use the same toolchaine for kernel and it works fine
I use the same toolchaine for kernel and it works fine
The kernel doesn't use libraries, so this comparison is not valid.
Le 02/09/2011 17:44, tbezierslafosse@cameon-dev.com a �crit :
I use the same toolchaine for kernel and it works fine
then 3 solutions for you :
-1: take time to read the following links to better understand what is android and how to achieve your goals with android :
- what is android in order to see that's not a kernel nor an usual linux system :
- how applications are usually built for android :
http://developer.android.com/guide/developing/building/index.html
- how to integrate C/C++ code to an android application :
-2: add -static to your flags and get an hello world with a huge binary, your boss will be happy
-3: find other solutions (ex: using agcc) here : http://tinyurl.com/3jn483n
Eric
Thank you all, I will try to make a simple hello word works using same
librairies under android.
I let you know If I found the solution.
thibault
I try to install gdb under android too, but I don't know how to do
this. I downloaded this one :
http://crosscompile.googlecode.com/files/arm-gdb-6.7.1-tar.gz
I have searched and found documentation for angstrum but not android.
I have a precompiled gdb, run and gdbserver but when I put gdb
SmsSample, I get gdb : not found.
I added the librairies too because "file gdb" says :
ELF 32-bit LSB executable, ARM, version 1, dynamically linked (uses
shared libs), for GNU/Linux 2.4.3, not stripped
Where do I have to put this file ?
thank you
goto the folder /bin/ and execute ./gdb
or install it to /usr/bin
Thank you,
I finally used gdbsuerver on my target.
After applying gdb on SmsSample, gdb on my host told me :
Remote debugging using 192.168.0.54:2345
0x00000000 in ?? ()
Do you know what does that mean ?
stack overflows ?
Make are that you compiled your SmsSample application with debug symbols (gcc -g), and the source code must reside on your debug machine. Once you’ve done that, you’ll see more in details what’s going on.
Hello,
I finally found out what's going on :
I noticed that SmsSample was a shared library and not a executable for
Arm
In the makefile, there was a CFLAG with -share !!!
I delete this, and now, My SmsSample is a executable for Arm and not a
share library
I try to execute SmsSample but now it shows me "SmsSample not
found" ...
Does anybody know why ?