3

I have built an Android application using shared libraries using the NDK. The emulator is currently running on a Linux x86 platform. However, I now need to move libraries over to an s3c6410 ARM processor. I also would like to use an existing cross compiler specific for the device’s platform that also handles C++ better. Everything I’ve read so far is rather cryptic.

1) How do I change to a new platform?

2) How do I change to use an existing cross-compiler?

3) Can I mix the NDK compiler for java (ex: second.c in two-libs example) and my own static library to produce a shared library?

Volo
  • 28,673
  • 12
  • 97
  • 125
  • What exactly are you trying to accomplish? Make a binary for Android running on a specific processor? Or port the code from Android to another embedded device based on a different OS running on the s3c6410? – Ivan Shcherbakov Jun 10 '12 at 08:06

1 Answers1

0

1) How do I change to a new platform?

You don't have to. Android NDK is designed for pretty much any ARM devices. Your ARM11 should be handled properly. Just make sure not to compile for ARMv7 specifically, since your processor is an ARMv6. Here are listed some instruction sets that differentiate ARMv6 and ARMv7. But I don't think it really matters to you.

2) How do I change to use an existing cross-compiler?

Try first with current NDK compiler. If you encounter problems, then report backtraces and logs in here.

3) Can I mix the NDK compiler for java (ex: second.c in two-libs example) and my own static library to produce a shared library?

Ouch... Your question is awkward. I don't understand what you mean by "NDK compiler for java" First I recommend you to read more about Java Native Interface, SWIG for Android and maybe stackoverflow questions about linking static and shared libraries in Android NDK. Those topics are far from trivial, and you should read, and practise on simple examples first.

Community
  • 1
  • 1
m-ric
  • 5,621
  • 7
  • 38
  • 51