Crosscompiling C/C++ code for Android on iMX8M Mini EVK

cancel
Showing results for 
Search instead for 
Did you mean: 

Crosscompiling C/C++ code for Android on iMX8M Mini EVK

471 Views
abhijit_thorat
Contributor II

Hi,

 

I am successfully able to use Android NDK and run and execute sample hello app on this iMX board.
  1. But instead of using NDK i want to cross compile C / C++ code using some tool-chain or some other method and execute it it on target hardware i.e iMX8M Mini EVK.
    As per my understanding on embedded Linux we need tool-chains and sysroot to cross compile any program or libraries but i am new to Embedded Android so i am not understanding how to do the same thing in Android.
    Basically I want to know how to cross compile C code for android without NDK.
  2. Also After my boards boots up when i try to execute basic commands such as sudo or vi or vim or dmesg on iMX8M mini then it gives me errors like - su: invalid uid/gid 'dmesg'    or commands not found etc.. Even GCC is also not available i think,

 

Can you please guide me?

 

Thanks,

Abhijit

0 Kudos
2 Replies

216 Views
abhijit_thorat
Contributor II

Thanks jimmychan,

I refer following link to cross compile and execute my C code on Android platform.

https://medium.com/@levioza/cross-compiling-c-c-native-external-libraries-for-android-e100d9b2d987 

0 Kudos

216 Views
jimmychan
NXP TechSupport
NXP TechSupport

Please refer to the Android user's guide 3.3 and 3.4.

The document of Android BSP can be downloaded from here:

i.MX Software | NXP 

e.g. Android P9.0.0_2.0.1 Documentation

0 Kudos