Only define Serial ISRs when used
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from arduino/ArduinoCore-sam
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
arduino/ArduinoCore-sam#129 ·
-
Type: Bug USB: CDC serial
Difficulty 4/5 3-5 days Newbie friendliness 52/100
arduino/ArduinoCore-sam#153 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
arduino/ArduinoCore-sam#151 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
arduino/ArduinoCore-sam#147 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
arduino/ArduinoCore-sam#146 ·
All issues in arduino/ArduinoCore-sam
Similar issues
-
scope:mqtt-bridge type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
bvis/aegis-hass#588 · 1 comment ·
Maintainers usually reply within 1 day
-
integration: homewizard
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
home-assistant/core#186409 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
joleys/niko-home-control-II#321 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100