Only define Serial ISRs when used

Abierto
#100 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
42/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
cpp
Área
embedded-iot

Línea de trabajo

Comienza comparando los objetos seriales de SAM y las definiciones de ISR con la implementación de AVR, donde cada objeto y cada ISR se encuentra en un archivo .cpp separado; el issue también señala el análisis de Arduino PR #1711. Se considera completado cuando las ISR seriales no utilizadas no se enlazan, mientras que un sketch o una library puede definir una ISR para un puerto serial que de otro modo no se utilizaría.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
HTML
Estrellas
91
Forks
111
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de arduino/ArduinoCore-sam

Todos los issues de arduino/ArduinoCore-sam

Issues similares

Más issues de Embedded & IoT

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.