Navigation Menu

Skip to content
Piotr Esden-Tempski edited this page Jan 18, 2017 · 1 revision

This page is dedicated to not yet completely answered questions or questions whose answers were not agreed on with the project members.

How does libopencm3 compare to...?

CMSIS

libopencm3 has wider goals than CMSIS: Not only does it contain implementations for basic Cortex features, it also includes chip specific implementations both for common functionality (eg. linker scripts, interrupt names, gpio functions where applicable) and individual chips' features (eg. peripherials). For many chips and development boards, a compiler with a small libc and libopencm3 are sufficient for building applications.

As opposed to CMSIS, libopencm3 is free software.

There is a sub-project of libopencm3 called libopencmsis, which implements some of CMSIS' interfaces for compatibility.

Someone who has actually worked with CMSIS should confirm the factual acurracy of this. -- @chrysn

avr-libc

libopencm3 does not aim to be a standard C library; for example, it will not provide string functions (strings.h) or memory management. (Often, newlibc is used for that purpose with libopencm3.)

Apart from that, libopencm3 does for Cortex-M3 just what avr-libc does for the AVR platform: It provides register definitions for the various chips and convenience / helper functions for using them in an abstract way.

avr-libc programs are less dependent on the chip used, as the supported chips all come from the same vendor (while Cortex manufacturers often implement their own GPIO peripherials), and because the project is far more mature.