0

I have successfully installed Android Gingerbread 2.3.4 on Beagleboard XM, which is having Cortex A-8. How do I select Cortex -A-8 as target in Eclipse for cross compiling?

Thanks and regards,

Heshsham

gpuguy
  • 4,607
  • 17
  • 67
  • 125
  • Are you building ndk libraries? If not - if you are just building java code - you shouldn't need to do anything. – Chris Stratton May 05 '12 at 06:12
  • @ChrisStratton yes I am using NDK libraries – gpuguy May 05 '12 at 06:15
  • @ChrisStratton Also if it were java code, then why choosing a specific device does not matter. I understand java byte code will be converted for specific device architecture. So performance should be an issue. So a particular target should be selected. – gpuguy May 05 '12 at 06:18
  • Java (and also Davlik) bytecode are independent of the native ABI, that's half the reason they chose that approach. Any conversion of the byte code to native specifics happens only on the device itself. – Chris Stratton May 05 '12 at 06:22
  • @ChrisStratton You mean this conversion happens at run time on the device? Then this must be very slow? – gpuguy May 05 '12 at 06:25
  • Traditionally bytecode runs in an interpreter. Then the concept of just-in-time compilation (JIT) or converting parts of the code to native operations in a repetitively optimized way was added. NDK code by contrast runs on the actual processor, and so must be compatible with both its instruction set and the applicable function call scheme, which get casually (perhaps incorrectly) lumped under the term "ABI" in this context. – Chris Stratton May 05 '12 at 06:29
  • What do you mean by "applicable function call scheme"? – gpuguy May 05 '12 at 09:11
  • Calling convention - which arguments are passed in which registers vs. the stack, what is preserved, etc – Chris Stratton May 05 '12 at 14:54

1 Answers1

0

You specify which ABIs to support in an ndk project by putting a line in your Application.mk file. If that portion of your source tree is in Eclipse's view of the project you should be able to edit the file from eclipse, otherwise you can use your favorite editor.

http://developer.android.com/sdk/ndk/index.html gives an example of how to include mips support:

APP_ABI := armeabi armeabi-v7a mips

For Cortex A-8 you'd basically just need to figure out the appropriate ABI name.

Chris Stratton
  • 39,853
  • 6
  • 84
  • 117
  • 1
    Since Cortex A8 is based on ARM 7, should it not the same you posted: APP_ABI := armeabi-v7a? – gpuguy May 05 '12 at 06:54