isr_tables: Simplify how the spurious irq function address is found

Instead of finding the address of the spurious irq function in the
intList section we now rely on the linker to find the address in the
_irq_spurious symbol.

This is a migration from using code generation to using the C language
which we in the general case we should aways strive towards.

In this specific case it makes the generated code 'irq_tables.c'
easier to read as we replace magic numbers with the &_irq_spurious
token.

Also, the path through the build system that _irq_spurious makes is
much shorter, so it is much easier for a user to understand how it is
used.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit is contained in:
Sebastian Bøe 2018-05-09 12:00:24 +02:00 committed by Andrew Boie
commit 8f321b48ac
3 changed files with 26 additions and 20 deletions

View file

@ -10,17 +10,16 @@
* What we create here is a data structure:
*
* struct {
* void *spurious_irq_handler;
* void *sw_irq_handler;
* u32_t num_isrs;
* u32_t num_vectors;
* struct _isr_list isrs[]; <- of size num_isrs
* }
*
* Which indicates the memory address of the spurious IRQ handler and the
* number of isrs that were defined, the total number of IRQ lines in the
* system, followed by an appropriate number of instances of
* struct _isr_list. See include/sw_isr_table.h
* Which indicates the memory address of the number of isrs that were
* defined, the total number of IRQ lines in the system, followed by
* an appropriate number of instances of struct _isr_list. See
* include/sw_isr_table.h
*
* You will need to declare a bogus memory region for IDT_LIST. It doesn't
* matter where this region goes as it is stripped from the final ELF image.