Arduino Core

For help with the bus itself (not a specific product).
Posts: 210
Joined: Sun Sep 18, 2016 6:07 pm

Arduino Core

Postby rpu_bus » Thu Nov 30, 2017 2:32 pm

Let's talk about the files that provide the functions you may use with your programs. I often see Arduino people call these the Arduino core, but that is just a name.

After Arduino allowed others to add there own core to the IDE then many did, Some examples include

Linux calls these sort of things system functions

My programs for AVR do not use an Arduino core, I have placed my functions like uart.c inside a directory called lib, e.g. /lib/uart.c

I have taken some of the functions from various peoples open source projects and added/removed stuff e.g. on uart.c I added stdio redirectable [streams] and made [flush] dump its buffer.


The [Standard IO facilities] in avr-libc is a little bewildering but equally wonderful and I wanted to use them, which I now can with the redirect. However this is not the Arduino way, so my programs are incompatable with all Arduino Cores I have seen.

[Standard IO facilities]:

When I want the uart.c functions I have to [include] them in my program and control the [build] tools with a Makefile so it compiles. My Makefile is simple, I use it like a framing system that shows where things are relative the current build. I have been able to step away from a project for a while and then back into it with surprising ease so I am increasingly convinced this is a good technique, but for it to scale up I think the build system needs to be more modular, which I have not looked into how that might be done (for all I know it is already an option with Makefiles).

[include]: ... main.c#L21
[build]: ... kefile#L10

Return to “Installation, Troubleshooting, and Usage”

Who is online

Users browsing this forum: No registered users and 1 guest