interrupts: simplify position of sw ISR table
We now place the linker directives for the SW ISR table in the common linker scripts, instead of repeating it everywhere. The table will be placed in RAM if dynamic interrupts are enabled. A dedicated section is used, as this data must not move in between build phases. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
47d30d087b
commit
506f15c381
22 changed files with 16 additions and 31 deletions
|
@ -88,9 +88,6 @@ SECTIONS {
|
|||
KEEP(*(".exc_vector_table.*"))
|
||||
KEEP(*(IRQ_VECTOR_TABLE))
|
||||
|
||||
#ifdef CONFIG_GEN_SW_ISR_TABLE
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
#endif
|
||||
*(.text)
|
||||
*(".text.*")
|
||||
*(.gnu.linkonce.t.*)
|
||||
|
|
|
@ -141,9 +141,6 @@ SECTIONS
|
|||
KEEP(*(.kinetis_flash_config))
|
||||
KEEP(*(".kinetis_flash_config.*"))
|
||||
|
||||
#ifdef CONFIG_GEN_SW_ISR_TABLE
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
#endif
|
||||
_vector_end = .;
|
||||
_image_text_start = .;
|
||||
*(.text)
|
||||
|
|
|
@ -189,9 +189,6 @@ SECTIONS
|
|||
|
||||
SECTION_DATA_PROLOGUE(_DATA_SECTION_NAME,,)
|
||||
{
|
||||
#ifdef CONFIG_GEN_SW_ISR_TABLE
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
#endif
|
||||
*(.data)
|
||||
*(".data.*")
|
||||
|
||||
|
|
|
@ -87,9 +87,6 @@ SECTIONS
|
|||
SECTION_PROLOGUE(_TEXT_SECTION_NAME,,)
|
||||
{
|
||||
. = ALIGN(4);
|
||||
#ifdef CONFIG_GEN_SW_ISR_TABLE
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
#endif
|
||||
KEEP(*(.openocd_debug))
|
||||
KEEP(*(".openocd_debug.*"))
|
||||
|
||||
|
|
|
@ -102,9 +102,6 @@ SECTIONS
|
|||
SECTION_PROLOGUE(_RODATA_SECTION_NAME,,)
|
||||
{
|
||||
. = ALIGN(4);
|
||||
#ifdef CONFIG_GEN_SW_ISR_TABLE
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
#endif
|
||||
*(.rodata)
|
||||
*(".rodata.*")
|
||||
*(.gnu.linkonce.r.*)
|
||||
|
|
|
@ -3,6 +3,13 @@
|
|||
DEVICE_INIT_SECTIONS()
|
||||
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
|
||||
|
||||
#if defined(CONFIG_GEN_ISR_TABLES) && defined(CONFIG_DYNAMIC_INTERRUPTS)
|
||||
SECTION_DATA_PROLOGUE(sw_isr_table, (OPTIONAL),)
|
||||
{
|
||||
*(SW_ISR_TABLE)
|
||||
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
|
||||
#endif
|
||||
|
||||
/* verify we don't have rogue .init_<something> initlevel sections */
|
||||
SECTION_DATA_PROLOGUE(initlevel_error, (OPTIONAL), )
|
||||
{
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
#if defined(CONFIG_GEN_ISR_TABLES) && !defined(CONFIG_DYNAMIC_INTERRUPTS)
|
||||
SECTION_PROLOGUE(sw_isr_table, (OPTIONAL),)
|
||||
{
|
||||
*(SW_ISR_TABLE)
|
||||
} GROUP_LINK_IN(ROMABLE_REGION)
|
||||
#endif
|
||||
#ifdef CONFIG_CPLUSPLUS
|
||||
SECTION_PROLOGUE(_CTOR_SECTION_NAME,,)
|
||||
{
|
||||
|
|
|
@ -646,7 +646,7 @@ class SizeCalculator:
|
|||
rw_sections = ["datas", "initlevel", "_k_task_list", "_k_event_list",
|
||||
"_k_memory_pool", "exceptions", "initshell",
|
||||
"_static_thread_area", "_k_timer_area", "_k_work_area",
|
||||
"_k_mem_slab_area", "_k_mem_pool_area",
|
||||
"_k_mem_slab_area", "_k_mem_pool_area", "sw_isr_table",
|
||||
"_k_sem_area", "_k_mutex_area", "_k_alert_area",
|
||||
"_k_fifo_area", "_k_lifo_area", "_k_stack_area",
|
||||
"_k_msgq_area", "_k_mbox_area", "_k_pipe_area",
|
||||
|
@ -660,7 +660,8 @@ class SizeCalculator:
|
|||
"priv_stacks_noinit"]
|
||||
# These get copied into RAM only on non-XIP
|
||||
ro_sections = ["text", "ctors", "init_array", "reset", "object_access",
|
||||
"rodata", "devconfig", "net_l2", "vector", "_bt_settings_area"]
|
||||
"rodata", "devconfig", "net_l2", "vector", "sw_isr_table",
|
||||
"_bt_settings_area"]
|
||||
|
||||
def __init__(self, filename, extra_sections):
|
||||
"""Constructor
|
||||
|
|
|
@ -521,7 +521,6 @@ SECTIONS
|
|||
_data_start = ABSOLUTE(.);
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
*(.gnu.linkonce.d.*)
|
||||
KEEP(*(.gnu.linkonce.d.*personality*))
|
||||
*(.data1)
|
||||
|
|
|
@ -527,7 +527,6 @@ SECTIONS
|
|||
_data_start = ABSOLUTE(.);
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
*(.gnu.linkonce.d.*)
|
||||
KEEP(*(.gnu.linkonce.d.*personality*))
|
||||
*(.data1)
|
||||
|
|
|
@ -403,7 +403,6 @@ SECTIONS
|
|||
_data_start = ABSOLUTE(.);
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
*(.gnu.linkonce.d.*)
|
||||
KEEP(*(.gnu.linkonce.d.*personality*))
|
||||
*(.data1)
|
||||
|
|
|
@ -531,7 +531,6 @@ SECTIONS
|
|||
_data_start = ABSOLUTE(.);
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
*(.gnu.linkonce.d.*)
|
||||
KEEP(*(.gnu.linkonce.d.*personality*))
|
||||
*(.data1)
|
||||
|
|
|
@ -359,7 +359,6 @@ SECTIONS
|
|||
_data_start = ABSOLUTE(.);
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
*(.gnu.linkonce.d.*)
|
||||
KEEP(*(.gnu.linkonce.d.*personality*))
|
||||
*(.data1)
|
||||
|
|
|
@ -169,7 +169,6 @@ SECTIONS
|
|||
*(.gnu.linkonce.s2.*)
|
||||
KEEP(*(.jcr))
|
||||
*(.dram1 .dram1.*)
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
_data_end = ABSOLUTE(.);
|
||||
. = ALIGN(4);
|
||||
} GROUP_LINK_IN(RAMABLE_REGION)
|
||||
|
|
|
@ -531,7 +531,6 @@ SECTIONS
|
|||
_data_start = ABSOLUTE(.);
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
*(.gnu.linkonce.d.*)
|
||||
KEEP(*(.gnu.linkonce.d.*personality*))
|
||||
*(.data1)
|
||||
|
|
|
@ -307,7 +307,6 @@ SECTIONS
|
|||
_data_start = ABSOLUTE(.);
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
*(.gnu.linkonce.d.*)
|
||||
KEEP(*(.gnu.linkonce.d.*personality*))
|
||||
*(.data1)
|
||||
|
|
|
@ -307,7 +307,6 @@ SECTIONS
|
|||
_data_start = ABSOLUTE(.);
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
*(.gnu.linkonce.d.*)
|
||||
KEEP(*(.gnu.linkonce.d.*personality*))
|
||||
*(.data1)
|
||||
|
|
|
@ -354,7 +354,6 @@ SECTIONS
|
|||
_data_start = ABSOLUTE(.);
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
*(.gnu.linkonce.d.*)
|
||||
KEEP(*(.gnu.linkonce.d.*personality*))
|
||||
*(.data1)
|
||||
|
|
|
@ -197,7 +197,6 @@ SECTIONS
|
|||
_data_start = ABSOLUTE(.);
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
*(.gnu.linkonce.d.*)
|
||||
KEEP(*(.gnu.linkonce.d.*personality*))
|
||||
*(.data1)
|
||||
|
|
|
@ -197,7 +197,6 @@ SECTIONS
|
|||
_data_start = ABSOLUTE(.);
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
*(.gnu.linkonce.d.*)
|
||||
KEEP(*(.gnu.linkonce.d.*personality*))
|
||||
*(.data1)
|
||||
|
|
|
@ -371,7 +371,6 @@ SECTIONS
|
|||
_data_start = ABSOLUTE(.);
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
*(.gnu.linkonce.d.*)
|
||||
KEEP(*(.gnu.linkonce.d.*personality*))
|
||||
*(.data1)
|
||||
|
|
|
@ -521,7 +521,6 @@ SECTIONS
|
|||
_data_start = ABSOLUTE(.);
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
KEEP(*(SW_ISR_TABLE))
|
||||
*(.gnu.linkonce.d.*)
|
||||
KEEP(*(.gnu.linkonce.d.*personality*))
|
||||
*(.data1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue