From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Ada Implementation of functions and produce C for exotic architectures (Expressif) Date: Wed, 11 Apr 2018 22:14:49 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="fd8ca72952f7832f2492997e3d9ba3db"; logging-data="20042"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19M1AwslZZQcCv2flJfIKljJziHRC22vkM=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:j/vsFDQtXmlUzpO+ASf8qqXQMYU= sha1:mSKfsSFJ+Xzv/HWBf5cZ1TJzvB0= Xref: reader02.eternal-september.org comp.lang.ada:51451 Date: 2018-04-11T22:14:49+01:00 List-Id: Patrice Freydiere writes: > I've been informed the current gnat is able to target C, especially > with ZFP profile. --> > https://blog.adacore.com/sparkzumo-part-2-integrating-the-arduino-build-environment-into-gps > > Seems this target "C" is only available on gnat pro, I think so. > I don't much program in Ada to have a professional solution, are there > any alternatives ? i have an embedded project and wish to implements > some core functionality in Ada, Since the development kit from Expressif doesn't support Ada, the only way forward I can think of would be to find out what the CPU actually is in the chip and build/obtain a compiler for it with Ada enabled. It looks as though it might be ARM-based, in which case it might not be too hard. Once you have a compiler that will target the chip, it should be possible to build an object library that you can call up from C (I'm assuming that you would retain most of the existing C scaffolding). I won't pretend this would be a walk in the park. [Later] Downloading & setting up the virtual machine as spec'd in the ESP8266 Getting Started Guide, the target of the 4.8.2 cross-compiler is xtensa-lx106-elf. Whether this will work with standard unpatched binutils etc I don't know.