← index #6234Issue #3163
Related · high · value 0.443
QUERY · ISSUE

MicroPython doesn't work on recent Android SDKs

openby Eccoopened 2020-07-09updated 2026-03-24
proposed-closeneeds-info

Building MicroPython for armeabi-v7a will result in code having some relocation. This is not accepted on recent Android API levels.

The problem comes from the non-local return routine. On ARM64 it works well because we essentially use setjmp. It seems to be working fine on x86 and x86_64 as well, probably because the code in nlrx86.c and nlrx64.c is kosher in that regard. But the code in nrlthumb.c seems to be generating code with relocation, which Android will outright refuse to load.

There are two options to fix this:

  1. Always define MICROPY_NLR_SETJMP when building for Android
  2. Fix nrlthumb.c to not generate text relocations, or to have an option not to
CANDIDATE · ISSUE

trouble building on arm-androideabi with clang

closedby enedilopened 2017-06-22updated 2017-06-30

Hello. I'm trying to get micropython runnung on Android. I have toolchain installed, clang version 4.0. However, make step fails, as shown in the log.

Here is the log

https://gist.github.com/enedil/294989beecc738868ecc480cc45526db

Sorry for not inlining it, but my terminal on this device has terrible copy/paste support.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied