Arduino core vs Arduino API

What are the differences between Arduino core and Arduino API ?

API - application program interface

What is the meaning of core programming in C, C++, Java, etc.?

isn't core referring to the hardware of the processor (core), which in this case is Atmel (328p). It dictates the capabilities of the processor without any additional hardware. This includes timer, PWM controllers, ADCs, USART, ...

ochui:
What are the differences between Arduino core and Arduino API ?

From where have you obtained those phrases?

It will be easier to give a useful answer if we know the context in which the phrases are used. Perhaps you can provide links to the texts that contain them.

...R

In the case of Arduino specifically, a "core" refers to the implementation of the hardware-specific functions that make up Arduino (GitHub - arduino/ArduinoCore-avr: The Official Arduino AVR core, for example), and the "Arduinocore-API" (GitHub - arduino/ArduinoCore-API: Hardware independent layer of the Arduino cores defining the official API) is the hardware independent part.

(It's pretty ambiguous, since the "Ardunio user API" is the list of functions provided by Arduino to user sketches (digitalWrite() and so on.) The User API is the sum of the Core and the Core API.)

westfw:
(It's pretty ambiguous, since the "Ardunio user API" is the list of functions provided by Arduino to user sketches (digitalWrite() and so on.) The User API is the sum of the Core and the Core API.

so are those core functions applications?

are there interfaces other than APIs?

what's an application?

Ah the problem of the Arduino founders & arduino.cc developers calling everything "Arduino".
The boards, the "language", the IDE, the core, the libraries.
IMO, It is a mess and has been pretty much since the beginning.

Here is my take on this:

An Arduino core is all the s/w and tools that is used to provide a s/w abstraction layer for a particular processor and set of boards that use that/those processors.
It includes various tools like the gcc compiler tools to compile and link the code for processors in the core and then upload it to a board.

The Arduino API is the functions & API that the core s/w implements.

There is also a difference between the "core" and the "core library".

For example, the Arduino IDE ships with the AVR core library s/w (all the source code to this comes with the IDE) and all the gcc tools needed to compile code for AVR processors and upload it to a board.
This core library s/w implements things like digitalRead(), digitalWrite(), shiftOut(), millis(), and all the Arduino API functions.
For the AVR processor, the core library is written in C.
The core also includes the known board types that use the processors that are supported by the core.

An Arduino core usually also includes a common base set of libraries, like Wire, EEprom, SoftwareSerial, SPI.
These libraries are written in C++ and not technically the core library but do come with the core since they are specific to the processors supported by the core library.
The AVR core comes with support for Uno, Leonardo, Mega and several other AVR based boards.

The Arduino API is much more nebulous, particularly since the Arduino founders keep calling "Arduino" a language.
There is no such thing as the "Arduino" language.
Arduino uses C++ as its programming language.
Over the years there are some de-facto API functions and some common libraries that work on any core that are shipped with the IDE
3rd party cores for other non-AVR processors typically implement the same APIs & functions in the core library that come with the AVR core as well as provide the base set of core libraries like Wire, EEprom, SoftWareSerial, and SPI.

Where things also can get further confusing is that Arduino founders have decided that programming is scary and have in many cases re-implemented things that at already existed in C/C++ and given them new names.
IMO, this is a very silly thing to be doing. They should have stuck to the C/C++ names when possible.

--- bill

so are those core functions applications?
are there interfaces other than APIs?
what's an application?

It's all layers of API. Usually to get labeled "API", it should be well-documented and somewhat standardized.
There are also "Internal Interfaces", and "Application Binary Interface" (ABI.)
For example, the ARM embedded API (eabi) says which registers are used for passing arguments (or how to set up the stack), which registers have to have their values preserved, and etc.

A core is something that does something.
An API is something that the core exposes to the users, so the users can instruct the core to do something.

This is a pretty good picture - it's about ARM, but it applies more generally as well.

Each arrow is an API.
The "Arduino Core" would include the "Middleware" components and functions, and perhaps the "peripheral" functions (sometimes an Arduino Core is built on top of vendor-provided peripheral functions, or partially so. The Due Core is built somewhat on top of Atmel's "libsam" (which is old, deprecated, and hard to find documentation for, alas.)

1 Like

IMHO this speculation about meaning is a waste of time until the OP shows us the context in which he has seen the phrases used.

...R