Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zephyr opanamp rsc dev 1 #1

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions include/zephyr/arch/arm/cortex_m/scripts/linker.ld
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2013-2014 Wind River Systems, Inc.
* Copyright 2024 NXP
Copy link
Collaborator

@dbaluta dbaluta Sep 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reformat commit message as follows:

linker: Move resource_table to generic cortex M linker file
 
In order to avoid copying the '.resource_table' section each time we add support for a new board
lets have this section in the generic linker file and enable it using CONFIG_OPENAMP_RSC_TABLE.

A commit should specifically state WHY the change is needed. In this case the change is needed because we want to avoid copying the linker section every time we want to add support for a new board.

*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -515,3 +516,13 @@ SECTION_PROLOGUE(.last_section,,)
_flash_used = LOADADDR(.last_section) + SIZEOF(.last_section) - __rom_region_start;

}

/*Add resource table section for openamp_rsc example*/
#if defined(CONFIG_OPENAMP_RSC_TABLE)
SECTIONS{
SECTION_PROLOGUE(.resource_table,, SUBALIGN(8))
{
KEEP(*(.resource_table*))
} GROUP_LINK_IN(ROMABLE_REGION)
}
#endif
10 changes: 0 additions & 10 deletions soc/nxp/imx/imx8m/m7/linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,3 @@ MEMORY
}

#include <zephyr/arch/arm/cortex_m/scripts/linker.ld>

SECTIONS
{
#ifdef CONFIG_OPENAMP_RSC_TABLE
SECTION_PROLOGUE(.resource_table,, SUBALIGN(8))
{
KEEP(*(.resource_table*))
} GROUP_LINK_IN(ROMABLE_REGION)
#endif
}