Only define Serial ISRs when used

オープン
#100 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
42/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp
領域
embedded-iot

調査の方向性

まず、SAM のシリアルオブジェクトと ISR 定義を AVR 実装と比較します。AVR 実装では、各オブジェクトと各 ISR が個別の .cpp ファイルに配置されています。この issue では Arduino PR #1711 の分析も参照されています。未使用のシリアル ISR がリンクされず、sketch または library が、それ以外では未使用のシリアルポート用に ISR を定義できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

(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.

主要言語
HTML
スター
91
フォーク
111
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

arduino/ArduinoCore-sam のほかの issue

arduino/ArduinoCore-sam の issue をすべて見る

似ている issue

Embedded & IoT の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。