Skip to content
Permalink
Browse files

soc: arm: st_stm32: Port CCM sections to use the Cmake function

Remove them from linker.ld

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
  • Loading branch information...
oyvindronningstad authored and nashif committed Mar 12, 2019
1 parent f2a1572 commit 000103906ab230e6160ab17828187bef2beee26c
@@ -489,45 +489,6 @@ SECTIONS

GROUP_END(RAMABLE_REGION)

#ifdef DT_CCM_BASE_ADDRESS

GROUP_START(CCM)

SECTION_PROLOGUE(_CCM_BSS_SECTION_NAME, (NOLOAD),SUBALIGN(4))
{
__ccm_start = .;
__ccm_bss_start = .;
*(.ccm_bss)
*(".ccm_bss.*")
} GROUP_LINK_IN(CCM)

__ccm_bss_end = .;

SECTION_PROLOGUE(_CCM_NOINIT_SECTION_NAME, (NOLOAD),SUBALIGN(4))
{
__ccm_noinit_start = .;
*(.ccm_noinit)
*(".ccm_noinit.*")
} GROUP_LINK_IN(CCM)

__ccm_noinit_end = .;

SECTION_PROLOGUE(_CCM_DATA_SECTION_NAME,,SUBALIGN(4))
{
__ccm_data_start = .;
*(.ccm_data)
*(".ccm_data.*")
} GROUP_LINK_IN(CCM AT> ROMABLE_REGION)

__ccm_data_end = .;
__ccm_end = .;

__ccm_data_rom_start = LOADADDR(_CCM_DATA_SECTION_NAME);

GROUP_END(CCM)

#endif /* DT_CCM_BASE_ADDRESS */

#ifdef CONFIG_CUSTOM_SECTIONS_LD
/* Located in project source directory */
#include <custom-sections.ld>
@@ -2,3 +2,5 @@

zephyr_sources_ifdef(CONFIG_ARM_MPU arm_mpu_regions.c)
zephyr_sources(stm32cube_hal.c)

zephyr_linker_sources_ifdef(DT_CCM_BASE_ADDRESS SECTIONS ccm.ld)
@@ -0,0 +1,36 @@
/* Copied from linker.ld */

GROUP_START(CCM)

SECTION_PROLOGUE(_CCM_BSS_SECTION_NAME, (NOLOAD),SUBALIGN(4))
{
__ccm_start = .;
__ccm_bss_start = .;
*(.ccm_bss)
*(".ccm_bss.*")
} GROUP_LINK_IN(CCM)

__ccm_bss_end = .;

SECTION_PROLOGUE(_CCM_NOINIT_SECTION_NAME, (NOLOAD),SUBALIGN(4))
{
__ccm_noinit_start = .;
*(.ccm_noinit)
*(".ccm_noinit.*")
} GROUP_LINK_IN(CCM)

__ccm_noinit_end = .;

SECTION_PROLOGUE(_CCM_DATA_SECTION_NAME,,SUBALIGN(4))
{
__ccm_data_start = .;
*(.ccm_data)
*(".ccm_data.*")
} GROUP_LINK_IN(CCM AT> ROMABLE_REGION)

__ccm_data_end = .;
__ccm_end = .;

__ccm_data_rom_start = LOADADDR(_CCM_DATA_SECTION_NAME);

GROUP_END(CCM)

0 comments on commit 0001039

Please sign in to comment.
You can’t perform that action at this time.