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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.102.34 with SMTP id fl2mr20482738obb.16.1409092713681; Tue, 26 Aug 2014 15:38:33 -0700 (PDT) X-Received: by 10.140.105.52 with SMTP id b49mr599763qgf.3.1409092713654; Tue, 26 Aug 2014 15:38:33 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!uq10no5539817igb.0!news-out.google.com!j6ni8038qas.0!nntp.google.com!m5no3415702qaj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 26 Aug 2014 15:38:33 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=77.176.215.183; posting-account=Fmp50goAAAA9sbkA2aX-X9YQy6-lkg3J NNTP-Posting-Host: 77.176.215.183 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <60a42dc6-d8d0-4432-ae5a-86de18b82840@googlegroups.com> Subject: STM32F4 Discovery, communication and libraries From: roy.emmerich@gmail.com Injection-Date: Tue, 26 Aug 2014 22:38:33 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:21924 Date: 2014-08-26T15:38:33-07:00 List-Id: I discovered Ada 2 days ago, so stick with me. I am starting a business which will focus on creating a cheap, modular, ope= n source data logger/controller usable across multiple domains. At the mome= nt I am in the prototyping stage, using the following hardware: 1. STM32F4 Discovery board 2. MikroElektronika STM32F4 Discovery shield (http://www.mikroe.com/stm32/s= tm32f4-discovery-shield/) 3. Various MikroElektronika click boards (http://www.mikroe.com/click/): * GPS click board (ublox LEA-6S receiver) * microSD * RS485 * RS232 * Ethernet I don't have experience in C/C++ but I do have a lot of experience in Java,= python, structured text (read PLCs) and a few other bits and pieces. I REA= LLY don't want to develop in C. From what I can make out it looks like a ni= ghtmare once the code reaches any substantial size, which mine will. I've s= tarted quite a few beginner C books and never got very far before throwing = in the towel. However what I've read about Ada has certainly caused me to s= it up! So far I have investigated the following high level language alternatives: 1. www.espruino.com (JavaScript) 2. www.micropython.org 3. www.eluaproject.net At the moment I am forging ahead with Espruino because: 1. it is quick to get code on the processor as it is interpreted 2. interfacing with external hardware via SPI/I2C/UART is easy...except whe= n you want to access on-chip functionality that isn't yet supported by the = Espruino interpreter (which is aimed at STM32F1 powered Espruino board, par= tially ported to the STM32F4). 3. www.npmjs.org has so many libraries and examples of how to get things do= ne (e.g. MODBUS RTU library...done) which translates to many willing hands/= minds. but I see dragons on the horizon. Here are a few: 1. It is not hard real-time 2. Although you can minify the code, I am uncertain whether everything will= fit on when the code base grows. 3. JavaScript on microcontrollers has no track record. In short, nice for tinkering/prototyping but probably not a wise choice for= the long run. Today I started chatting to Mike Silva over at EmbeddedRelated: http://www.embeddedrelated.com/showarticle/617.php For Ada to be a viable option for my project, this is what I think I need [= with Mike's comments]: 1. [IN PROGRESS] Easy communication: SPI, I2C, Serial, Ethernet, [Mike] I know that AdaCore is working on comms libraries for the ARM Cortex M part= s, but I don't know anything about the projected availability. [Roy] If they want adopters then they'd better get a move on! 2. [UNSOLVED?] Libraries/examples: MODBUS RTU/Eth at the very least I have yet to find a repository of libraries covering the major protocols (= e.g. MODBUS, CAN, one-wire). There are quite a few in C. Would it be viable= to just wrap these in Ada? It seems like a great short term solution but i= f we are using Ada to make things more stable, it hardly makes sense to use= it merely to wrap (flakey) C libraries ;) [Mike] It is also true that you can link to C code in Ada with either thin or thic= k wrappers. A thin wrapper just converts each C function to an equivalent A= da subprogram, while a thick wrapper adds one or more higher-level layers o= n top of the basic subprograms. 3. [SOLVED] Direct access to chip functionality: STM32F4 RTC, Precision Tim= e Protocol capabilities on chip, etc. I read that binding in C code is fair= ly easy? That would allow me to directly call the STM32 C drivers provided = by STM? [Mike] In any case, you will have no problem accessing the chip hardware in Ada. 4. [SOLVED] Someone hosts an open forum to encourage the exchange of ideas,= providing an alternative to the normally clandestine military/large corpor= ate approach to code development. If Ada is going to grow then it needs to = open up to your average Joe like me. [Mike] comp.lang.ada! I'd appreciate any further feedback from members of this list. Roy --- www.infinitefingers.com