Termux-packages: Package request: libc-avr and avr-gcc

Created on 21 Nov 2016  路  7Comments  路  Source: termux/termux-packages

A toolchain for working with atmel microcontrollers, particularly compiling asm and C code. http://www.nongnu.org/avr-libc/
I haven't tried to build the packages myself yet, since compiling in termux is somewhat different from usual compiling and installing. Since there are already numerous android apps for flashing atmel microcontrollers, it might come in handy to be able to compile the firmware right on the android device.

help wanted package request

All 7 comments

I like this.

I tried that before, it works fine on jellybean devices, but broken for KitKat and newer android versions. Since lollipop, both internal and external memory are mounted with noexec flag, preventing cctools from running any binaries there. Also since lollipop android has a restriction to run binaries compiled without pie flag (and all of binaries in cctools are compiled without). Also, there are only binaries for armv7 (most of the new phones, including my own, running on 64 bit CPUs with arm64 architecture). In a few words, it doesn't work on new phones and new android versions.

Has this situation changed any?

@telepresencebot2 we probably won't get avr-gcc working since the gcc toolchain isn't supported by the NDK anymore. We can however add the (still experimental last time I checked) avr target to our LLVM toolchain.

I was looking into that a couple of months ago, the toolchain built fine but I never tested it (was trying to compile for my arduino but had problems with the pre-processing of the source files).
So, we can probably get a toolchain targetting avr but it needs to be tested. I can probably build llvm with the avr target if you are up for testing it

I'd be down to test it, but this is new territory for me, I've never built anything for android.

I've opened a PR to make it possible to target avr with clang: https://github.com/termux/termux-packages/pull/4552. Next step is probably to get arduino-cli working in termux, or atleast the upload part of it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

neitsab picture neitsab  路  3Comments

StephanBeer picture StephanBeer  路  3Comments

am11 picture am11  路  3Comments

zejji picture zejji  路  4Comments

thurask picture thurask  路  3Comments