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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 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!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: STM32F4 Discovery, communication and libraries Date: Wed, 27 Aug 2014 09:41:30 +0200 Organization: cbb software GmbH Message-ID: <16yza1ilbvqht.13yvkjtrl3l2.dlg@40tude.net> References: <60a42dc6-d8d0-4432-ae5a-86de18b82840@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: yj8+JIQUMOEawvIM7K49kA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:21928 Date: 2014-08-27T09:41:30+02:00 List-Id: On Tue, 26 Aug 2014 15:38:33 -0700 (PDT), roy.emmerich@gmail.com wrote: > [Mike] > I know that AdaCore is working on comms libraries for the ARM Cortex M > parts, but I don't know anything about the projected availability. What "comms" libraries? Basically it does not make sense to have a library beyond system's port I/O driver, because higher-level protocols have nothing in common, e.g. AK, CSLIP, ModBus. > [Roy] > If they want adopters then they'd better get a move on! > > 2. [UNSOLVED?] Libraries/examples: MODBUS RTU/Eth at the very least ModBus is very straightforward to implement from scratch. There exist commercial libraries of course, but you want it for free, I guess... > 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 depends. Usually middle-layer transports like ModBus, CAN have no use without integration into some middleware framework. It is a bad idea to communicate directly to them from the application, even if through a vendor library. Then, regarding CAN, the real problems are in the configuration, e.g. DBC parsing or handling CANOpen. It is a very complicated stuff, which would be very difficult to handle in an application without a middleware abstracting away the mess. And all protocols have issues with polling/event handling policy, you wouldn't burden the application with that. > It seems like a great short term > solution but if we are using Ada to make things more stable, it hardly > makes sense to use it merely to wrap (flakey) C libraries ;) You will need lower-level vendor libraries, which are vendor (Vector, IXXAT etc, I don't know what is the status of Linux CAN driver for ARM boards) dependent and higher-level libraries implementing the upper-level protocols like CANOpen. > I'd appreciate any further feedback from members of this list. I would try to use a Linux instead of running bare board. Debian for ARM is available. It has a fully working GNAT FSF. [We successfully ran our middleware (100% Ada) on an ARM board.] AFAIK, AdaCore offers a cross compiler to ARM Linux. (It is a pain to use native ARM GNAT). -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de