Page 1 of 1

Opinions about a library with common API for different MCUs

Posted: Tue Sep 03, 2013 5:10 am
by vitomsc
Hello everyone.

I'm thinking of developing a peripheral library with common API for a variety of microcontrollers from different manufacturers and architectures. I think this would be useful to facilitate reducing the time that a user need to adapt to using a different microcontroller and to facilitate porting an application made for a type of microcontroller to another (especially if it's from a different manufacturer). I would like to know your opinion on this idea. Do you think that would be really useful to have something like that? Thank you very much in advance.

Victor

Re: Opinions about a library with common API for different M

Posted: Tue Sep 03, 2013 5:15 am
by cfb
Are you aware of ARM's Cortex Microcontroller Software Interface Standard (CMSIS)?

http://www.arm.com/products/processors/ ... andard.php

Re: Opinions about a library with common API for different M

Posted: Tue Sep 03, 2013 5:34 am
by vitomsc
Yes, I'm aware of it. But the CMSIS leaves out the device peripherals driver library. According to CMSIS this is work for the silicon vendor. It's true that the peripherals from different manufacturers have differences but also many similarities. The notion is to develop a peripheral driver library with a common API to exploit the similarities. What do you think about that?

Re: Opinions about a library with common API for different M

Posted: Thu Sep 05, 2013 9:01 pm
by stevech
on small microprocessors, non-Linux, non-Andriod, I don't know of any standards in APIs for the MCU's peripherals.

Re: Opinions about a library with common API for different M

Posted: Sun Sep 08, 2013 8:45 pm
by hsutherl
I agree it sounds like a terrific idea. But once you get into it I fear the trade-offs you'll have to make between consistency, performance, and flexibility will turn the project into an ugly mess.

For example, I'm very impressed with the stupendous effort ST has made to provide a library that works with their cortex-M parts. Yet, while I wouldn't say "ugly mess", I think it is fair to say that it can be less than intuitive to set up at times, while simultaneously providing larger code and longer execution times than you'd get with direct register access.

That said, have you looked at what Giovanni Di Sirio has done with Chibios ?

Re: Opinions about a library with common API for different M

Posted: Mon Sep 09, 2013 8:38 am
by ntfreak
cortexm specific but perhaps worth a look - http://libopencm3.org/

Spen

Re: Opinions about a library with common API for different M

Posted: Fri Sep 13, 2013 5:10 am
by vitomsc
hsutherl wrote: That said, have you looked at what Giovanni Di Sirio has done with Chibios ?
Thank you, hsutherl. My idea is very simmilar to the HAL layer of ChibiOS. I should have had this idea many years ago. I don't know if there would be something better I can do after the magnificent work of Giovanni Di Sirio.