Make the number of interrupt vectors configurable - #8
Conversation
ccec189 to
4e72f20
Compare
|
Thanks for the PR. IIRC, the reason I wrote the code in 99d5a71 the way I did was to make it straightforward to either add some indicator as to which 8051 interrupt source triggered the RISC-V interrupt or to implement a custom interrupt handler in the 8051 code (since handling it in the emulated RISC-V might be to slow for some interrupts). If we're going to abandon that, it would probably be better to make the macro emit Probably the long term strategy should be to do what you suggested in #9, since right now there's no way for the RISC-V code to know which interrupt was fired without checking literally every interrupt source on the microcontroller. |
Some modern 8051 microcontrollers have a lot of ISRs. STC8H8K64U for example has 28. Hopefully this PR should be a simple enough one that isn't intrusive at all.
Would be an interesting idea to see if this allows porting of libraries like TinyUSB to it.