Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Only define Serial ISRs when used

Open
#100 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
embedded-iot

Research direction

Start by comparing the SAM serial object and ISR definitions with the AVR implementation, where each object and ISR is placed in a separate .cpp file; the issue also points to the Arduino PR #1711 analysis. Done means unused serial ISRs are not linked, while a sketch or library can define an ISR for an otherwise unused serial port.

Written by the indexing model from the issue text.

Description

(There is an identical issue for sam here)

Currently, I think that the Serial interrupt handlers are always included in the link (or maybe always included if any serial object is used). Ideally, none of these would be included by default, and only the ISRs for serial objects that are actually used are included. This would leave the way open for libraries or sketches to define their own serial ISR for any otherwise unused serial ports.

This behaviour is already implemented on AVR, by putting the definition of each serial object and its corresponding ISR in a separate .cpp file, and separating all serial objects from each other. Due to the way linking works wrt .a files, this should have the desired effect (when care is taken not to include any stray references to these serial objects). See https://github.com/arduino/Arduino/pull/1711#issuecomment-29745866 for the analysis I did on the original implementation on AVR.

I created this issue after suggesting this as an alternative for #95 (and see also https://github.com/arduino/ArduinoCore-avr/pull/299).

I will not have time to actually implement this, but I'm happy to support anyone that wants to give a stab at it.

Dominant language
HTML
Stars
91
Forks
112
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from arduino/ArduinoCore-sam

All issues in arduino/ArduinoCore-sam

Similar issues

More Embedded & IoT issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.