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: buffer2.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!1.eu.feeder.erje.net!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: Tero Koskinen Newsgroups: comp.lang.ada Subject: Re: ANN: STM32F4 GNAT Run Time Systems 20150406 Date: Thu, 23 Apr 2015 21:41:16 +0300 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: NNTP-Posting-Host: 188-67-158-125.bb.dnainternet.fi Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: loke.gir.dk 1429814479 26705 188.67.158.125 (23 Apr 2015 18:41:19 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 23 Apr 2015 18:41:19 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 In-Reply-To: Xref: number.nntp.giganews.com comp.lang.ada:192890 Date: 2015-04-23T21:41:16+03:00 List-Id: 23.4.2015, 15:40, Jedi Tek'Unum kirjoitti: > On Wednesday, April 22, 2015 at 3:59:26 PM UTC-5, Simon Wright > wrote: >> Now I have GCC 5.1, this issue, and one of my own projects with a >> lurking bug that needs major rework to fix - fun all round! I will >> certainly get on to this (just downloaded 1.5.0). > > In my 35+ years working in the world of "big iron" I am constantly > disappointed with portability hell in just the Unix zoo - even in > the context of "standards". I only recently started playing with the > embedded world and it makes the Unix world look like nirvana! > Somebody needs to develop an industry standard HAL that the chip > vendors can all implement. There is one, it is called CMSIS - Cortex Microcontroller Software Interface Standard, see http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php In this case, ST just is not that good at software development. Their Stdperipheral and Cube libraries are quite buggy or hard to use and many prefer "raw" register access instead. Personally, I haven't really seen any need for common HAL across different ARM MCUs. Differences between ARM Cortex-Mx MCUs are usually related to peripherals (uart, spi, i2c, timers) and vendors implement the peripherals slightly different way to allow some specific use case. Some concentrate on performance and have DMA transfers, others target low-power use and have features like "sleepwalking" (peripherals working while CPU is sleeping). I think it would be somewhat hard to create easy to use HAL for these. (If nothing else, you either have maze of compile time conditions or a large binary size.) If you want to have some sort of HAL, but don't want to or cannot use CMSIS, you can use a RTOS, which provides its own HAL. Or with a little bit planning, you can create Ada code, which works on AVRs, MSP430s, and 32-bit ARM MCUs. Just separate the platform/architecture specific code in their own packages. Yours, Tero