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!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Point a beginner in the right direction? Cheap bare-board to run with a RTOS for running ADA Date: Sun, 07 Jul 2013 19:27:34 +0300 Organization: Tidorum Ltd Message-ID: References: <8a3093bb-90b3-4081-9b0b-dfde5aa6b851@googlegroups.com> <993despcuk1d.1ifczvyo501px.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net k5Te9JhOx6JaT1BHsPc2KQtbMgZE2zZBshuYmsN0dvIzXJtDWC Cancel-Lock: sha1:naFSmavNB0b+nyldMwmc9qMA1rw= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:16141 Date: 2013-07-07T19:27:34+03:00 List-Id: On 13-07-07 18:00 , Dmitry A. Kazakov wrote: > On Sun, 7 Jul 2013 10:58:24 +0000 (UTC), Simon Clubley wrote: > >> On 2013-07-07, Dmitry A. Kazakov wrote: >>> On Sun, 7 Jul 2013 02:16:29 -0700 (PDT), Lucretia wrote: >>> >>>> Why not just buy a small SBC and just target Ada directly on the hardware. >>>> You don't have to have an OS at all. >>> >>> There exist heaters better than a computer performing pointless >>> calculations without any I/O. >> >> Sorry, Dmitry, but that's so out of touch I don't really know how to >> respond so I will just say you don't need a OS to provide I/O services. >> >> You create some routines around the hardware which the rest of your code >> can use to talk to the hardware and you structure your I/O support >> library so that only the modules needed by the application are actually >> linked in. > > And this is what basically an OS is - a set of routines around the > hardware. > > Either the application does nothing beyond integer arithmetic or else you > need an OS. Even most simple things like FPU or system timers would require > functionality attributed to an OS. Many years ago I wrote an application for an HP2100 mini, sampling a voltage continuously at 1 kHz, writing the data to magnetic tape, and printing summaries to the console. Oh, and it also reacted to the console pushbuttons. If I take Dmitry's view, I am now entitled to put on my CV that I wrote my own OS for this application. Great. Dmitry, your definition of I/O routines as "an OS" is an absurd stretch. Yes, a real OS would be expected to provide I/O services (although applications often need non-standard drivers). But a small set of application-specific I/O operations do not an OS make. > Any I/O on a modern machine would > involve quite complicated hardware protocols like SPI, I2C, DMA, We are talking about a microcontroller, which typically have simple I/O HW. DMA is "complicated"? Come on. Both the ADC and the magtape in the HP2100 application described above used DMA. Just a bit of device register setting and double buffering. Piece of cake, really. Of course the HP2100 had a simple I/O structure, but so do many modern microcontrollers. > and > extremely complicated software protocols like TCP and stuff upon it. Which are available as OS-independent libraries. > The > question is only who is going to write and maintain all this stuff. > > Just which is the ratio of he application code to "some routines around the > hardware"? 1:0? 1:1? 1:1000? How about complexity of both? But the application-specific I/O should really count as "application code". Many. many microcontroller applications do processor-driven I/O, bit-banging, A/D, D/A, PIO, and the like, without even the small complications of interrupt-handling and DMA. The I/O code is then really tiny, a few accesses to I/O registers here and there. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .