Forum: µC & Digital Electronics Request for opinions about a library for different microcontrollers.

Author: Victor S. (vitomsc)
Posted on:

Rate this post
0 useful
not useful
Hello everyone.

I'm thinking about developing a peripherals library (severar libraries, 
in fact) with a common API for a variety of microcontrollers from 
different manufacturers and architectures.

I think this would be useful to reduce the time that a user needs to 
adapt to the use of 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 about this idea. Do you think that 
would be really helpful to have something like that? Thank you very much 
in advance.


Author: Kindergardener (Guest)
Posted on:

Rate this post
0 useful
not useful
There are already plenty of such libraries, written as drivers and 
included in RTOS such as Chibi/OS and FreeRTOS.

Author: phischu (Guest)
Posted on:

Rate this post
2 useful
not useful
In my opinion, as I'm based on the field of automotive software 
engineering, you seem to have the idea to develope something like what 
(OSEK and especially) AUTOSAR tries to achieve in the automotive ECU 

So you try to sepertate system relevant functions from the 
hardware/communication systems actually used.

That is, respecting the goals you want to achieve, a really good idea 
indeed. The problem is the amount of developement it takes.

In AUTOSAR e.g., every µc-distributor is paid quite well, just to 
release the micro controller abstraction layer (mcal) meeting AUTOSSAR 
specifications for their controllers.

In respect to the amount you've got to pay for a controller that meet 
the system requirements(regarding RAM and Flash memory sizes), you need 
to run the AUTOSAR RTOS, and the costs of the distribution of those 
mcals, there's actually no benefit or break even point for developing 
such ECUs nowadays, although AUTOSAR development started about over ten 
years ago, about in the year 2002.

Having a strong community behind you, helping to develope such a 
RTOS-standard, is absolutely necessary as this is no one man job. The 
experiences I made on this forum is that you have a lot of different 
people preferring not only their most likely programming language (as c, 
assembler, arduino e.g.) but also µC manufacturers (Atmel, PIC, MSP,...)

Maybe you want to have a look / google search in respect to AUTOSAR to 
get a point of view of regarding the ressources such a developement 
takes for a commercial product.

I myself (as I think many others) would appreciate it to write a program 
in my universal IDE and then just compile it to the contoller I've got 
lying on my table, using an universal e.g. JTAG-programmer.

I don't think, I might get to know this day, regarding the obstacles 
lying in the way, but please try to achieve your best.


Author: Victor S. (vitomsc)
Posted on:

Rate this post
0 useful
not useful
phischu, thank you very much for your great response.

Although I had sought if there were similar projects, I did not know the 
AUTOSAR standard. The extension and quality of the information that you 
have provided is very valuable for me.

My idea is not as ambitious as the complete AUTOSAR standard. It's 
impossible for me to reach this level of complexity in a reasonable 
time. My idea would be limited to something like the part of AUTOSAR 
that deals with de abstraction of the microcontroller peripherals. At 
this time, each manufacturer of microcontrollers (NXP, ST, TI, Atmel) 
provides a library for its own peripherals  with its own API. It would 
only unify this field.

It's very true what you say that the users of microcontrollers are very 
devoted to specific brands. Perhaps the idea of providing a common API 
would not have intrest for them.

Thank you again.


Author: Alexandre B. (anobli)
Posted on:

Rate this post
0 useful
not useful
Hello Victor,

I like your idea because I had same idea.
When I was student, I begun to write a library compatible with pic24 and 
msp430 microcontrollers. I'm working on this project since 3 years. It's 
a lot of work and require a lot of time. Working alone on this project 
is not possible. Since 2 year, I'm working and I don't have a lot of 
time to work on this project. For these reason, I think about publishing 
source code under LGPL, and I'm expecting get contribution from another 
people (like you ??).

Contact me if you want more details.


Author: chris_ (Guest)
Posted on:

Rate this post
0 useful
not useful
3 years ago, I made a proposal to develop a general API for 
Beitrag "BIOS für Mikrocontroller"
Unfortunately the response in this forum was not very promising.

Author: Alexandre B. (anobli)
Posted on:

Rate this post
0 useful
not useful
Unfortunately I don't understand dutch. I use google translate but 
translation is sometime weird.

I summarize (correct me if I'm wrong), you have proposed an API for 
microcontroller. Most people reject API because:
- difficult to configure
- memory footprint
- reliability
- performance

Author: Jonas R. (jonas_r18)
Posted on:

Rate this post
0 useful
not useful
I recommend taking a look at https://github.com/roboterclubaachen/xpcc, 
especially the examples.


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.