www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D for Android

reply Joakim <dlang joakim.fea.st> writes:
Almost four years ago, I asked where Android was at, in this 
thread about supporting ARM, and decided to take up the port:

http://forum.dlang.org/thread/yhulkqvlwnxjklnogmfv forum.dlang.org

After releasing linux/x64 cross-compilers for the last couple 
years, I finally got all my patches upstream and ldc 1.4 is the 
first official release to fully support cross-compiling for 
Android/ARM from linux, Windows, and hopefully macOS:

https://github.com/ldc-developers/ldc/releases/tag/v1.4.0

As noted there, I've written up full instructions on using the 
official release to write D apps for Android, employing the 
simple OpenGLES C/C++ sample apps that used to come with the NDK 
but ported to D, including demonstrating calling Java methods 
through JNI:

https://wiki.dlang.org/Build_D_for_Android

If someone can try it out on a mac and either update that wiki 
page with the required brew/port steps and any other mac-isms or 
post them here, we can make it easier for mac users too.

Next up, 32-bit ARM Android devices are now supported, I'm 
looking at getting 64-bit AArch64 Android up and running.
Sep 18
next sibling parent reply Andrea Fontana <nospam example.com> writes:
On Tuesday, 19 September 2017 at 03:25:08 UTC, Joakim wrote:
 Next up, 32-bit ARM Android devices are now supported, I'm 
 looking at getting 64-bit AArch64 Android up and running.
Keep it up! Andrea
Sep 19
parent reply twkrimm <invalid 123.xxx> writes:
On Tuesday, 19 September 2017 at 07:44:47 UTC, Andrea Fontana 
wrote:
 On Tuesday, 19 September 2017 at 03:25:08 UTC, Joakim wrote:
 Next up, 32-bit ARM Android devices are now supported, I'm 
 looking at getting 64-bit AArch64 Android up and running.
Keep it up! Andrea
Joakim I think the Atmel processors (AVR) that Microchhip bought are 32-bit ARM based. It would be neat to develop D programs for limited resource processors. Does the compiler support the -BetterC flag? I know this was hard work, and I give you a very, very big thank you. twkrimm
Sep 19
parent Johannes Pfau <nospam example.com> writes:
Am Tue, 19 Sep 2017 12:38:15 +0000
schrieb twkrimm <invalid 123.xxx>:

 On Tuesday, 19 September 2017 at 07:44:47 UTC, Andrea Fontana 
 wrote:
 On Tuesday, 19 September 2017 at 03:25:08 UTC, Joakim wrote:  
 Next up, 32-bit ARM Android devices are now supported, I'm 
 looking at getting 64-bit AArch64 Android up and running.  
Keep it up! Andrea
Joakim I think the Atmel processors (AVR) that Microchhip bought are 32-bit ARM based. It would be neat to develop D programs for limited resource processors.
OT, but Atmel produces: AVR 8 bit microcontrollers, AVR custom architecture AVR32 32 bit microcontrollers, AVR32 custom architecture ARM based products (the SAM* series), ARM7, ARM9, Cortex-M/Cortex-A Microchip additionally maintains custom 8,16 and 32 bit PIC architectures. Joakim's Android work is much appreciated, but for these types of bare-metal controllers you'll have to look at Mike's work: https://github.com/JinShil/stm32f42_discovery_demo This is for 32bit ARM only. I wrote a proof-of concept hello-world for AVR 8bit controllers (blink an LED) some time ago. On the compiler side, not much is missing and betterC-related changes fix most compiler problems. What you really need though is register definitions and nobody wrote those for AVR 8 bit controllers yet. -- Johannes
Sep 19
prev sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 9/18/17 11:25 PM, Joakim wrote:
 Almost four years ago, I asked where Android was at, in this thread 
 about supporting ARM, and decided to take up the port:
 
 http://forum.dlang.org/thread/yhulkqvlwnxjklnogmfv forum.dlang.org
 
 After releasing linux/x64 cross-compilers for the last couple years, I 
 finally got all my patches upstream and ldc 1.4 is the first official 
 release to fully support cross-compiling for Android/ARM from linux, 
 Windows, and hopefully macOS:
 
 https://github.com/ldc-developers/ldc/releases/tag/v1.4.0
 
 As noted there, I've written up full instructions on using the official 
 release to write D apps for Android, employing the simple OpenGLES C/C++ 
 sample apps that used to come with the NDK but ported to D, including 
 demonstrating calling Java methods through JNI:
 
 https://wiki.dlang.org/Build_D_for_Android
 
 If someone can try it out on a mac and either update that wiki page with 
 the required brew/port steps and any other mac-isms or post them here, 
 we can make it easier for mac users too.
 
 Next up, 32-bit ARM Android devices are now supported, I'm looking at 
 getting 64-bit AArch64 Android up and running.
Congratulations, that's terrific news! -- Andrei
Sep 19
parent vondes <vondes yahoo.com> writes:
How we can use it in [url=https://mobile-phone-tracker.org]mobile 
tracker[/url] on Android?
Oct 21