Move interrupts to bootloader when IVSEL is set#546
Move interrupts to bootloader when IVSEL is set#546emanuelen5 wants to merge 3 commits intobuserror:masterfrom
Conversation
6021804 to
b80b39f
Compare
|
CI was failing, so I rebased onto the upstream master branch. I could see there were some changes to Github actions there. |
|
I see now that the CI build fails on the import of |
|
@emanuelen5 wrote:
It looks like that file is meant to be used in the context of a specific microcontroller, as it uses MCU-specific macros such as
This macro is defined by sim_core_declare.h as: #define _SFR_IO8(v) ((v)+32) |
|
I think the macro adds little, particularly when the argument is a raw number. 0x55 would be just as good, perhaps with more comment. But I think this too special-purpose to be merged. It might do something horrible on some other chip, as there is no test for Mega 88/168/328. And I would like to see at least a sketch of a general solution, including reset vector redirection. |
I wanted to simulate a bootloader with interrupts a while back, but realized that the value of IVSEL didn't affect the location of the interrupt table in simavr. So I added this patch to be able to try out my bootloader for an ATmega328p (in another project: emanuelen5/kitchen-timer#58) and switch between the bootloader and application interrupt table. Not sure if you want this upstream, or not, I just wanted to share it in case you find it valuable (since I have really appreciated simavr).
Note: