allow setting exception handler to the same value, as this might happen if exceptions are set dynamically on both cores, but VTOR is the same... this should indeed cause an error if the values differ, but not otherwise (#385)

This commit is contained in:
Graham Sanderson 2021-05-11 10:34:41 -05:00 committed by GitHub
parent 36dda1c5c4
commit 508828f8ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,7 @@ exception_handler_t exception_set_exclusive_handler(enum exception_number num, e
#if !PICO_NO_RAM_VECTOR_TABLE
uint32_t save = save_and_disable_interrupts();
exception_handler_t current = exception_get_vtable_handler(num);
hard_assert(exception_is_compile_time_default(current));
hard_assert(handler == current || exception_is_compile_time_default(current));
set_raw_exception_handler_and_restore_interrupts(num, handler, save);
#else
panic_unsupported();