Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[patch #6805] Numeric interrupt vectors #765

Closed
avrs-admin opened this issue Jan 31, 2022 · 3 comments
Closed

[patch #6805] Numeric interrupt vectors #765

avrs-admin opened this issue Jan 31, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@avrs-admin
Copy link

Sun 12 Apr 2009 07:26:05 AM CEST

This patch allows a C++ interrupt handler name to be represented by a number, and while the name will be mangled as usual, the number survives for later linking. The patch provides for an optional numeric argument to the signal function.

An interrupt function prototype using this system for the same USART0 receiver interrupt looks like:

void IntName(void) attribute ((signal(18), __INTR_ATTRS));

file #17905: ClassInterrupts2.zip

This issue was migrated from https://savannah.nongnu.org/patch/?6805

@avrs-admin
Copy link
Author

Anatoly Sokolov
Sun 12 Apr 2009 04:10:51 PM CEST

The patch for the GCC is not complete.

  1. No numeric argument to the 'interrupt' attribute is implemented.
  2. Not possible use one interrupt handler for some interrupt vectors.

I propose to implement the interface for interrupt handler functions as:

attribute ((vectors(N1[, N2[, ...]]), [signal, interrupt, nmi, naked]))
void handler_mame (void);

The 'vectors' attribute specify interrupt vector numbers for handler function.

The 'signal', 'interrupt', 'nmi' and 'naked' attributes specify type of handler function. Need use only one. The default attribute is  'signal'.

Anatoly.

@avrs-admin
Copy link
Author

Ron Kreymborg
Mon 13 Apr 2009 03:16:53 AM CEST

Good idea - a more complete implementation that mine (which was based on Marek's original). I assume it will use the number for the vector and not the "handler_name" (the C++ requirement).

Just curious - what is an example of (2)?

Ron

@sprintersb
Copy link
Collaborator

Fixed by 5023931. Notice that this is only the AVR-LibC part. The feature relies on avr-gcc PR116056 added in v15.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants