forked from Imagelibrary/rtems
bsps/stm32h7: provide linkcmds for SRAM, FLASH_SDRAM and SRAM_SDRAM linking
Sponsored-By: Precidata
This commit is contained in:
@@ -117,6 +117,12 @@ links:
|
||||
uid: linkcmds
|
||||
- role: build-dependency
|
||||
uid: linkcmdssdram
|
||||
- role: build-dependency
|
||||
uid: linkcmdssram
|
||||
- role: build-dependency
|
||||
uid: linkcmdssramsdram
|
||||
- role: build-dependency
|
||||
uid: linkcmdsflashsdram
|
||||
- role: build-dependency
|
||||
uid: ../../bspopts
|
||||
type: build
|
||||
|
||||
49
spec/build/bsps/arm/stm32h7/linkcmdsflashsdram.yml
Normal file
49
spec/build/bsps/arm/stm32h7/linkcmdsflashsdram.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
build-type: script
|
||||
do-build: |
|
||||
bld.install_as("${BSP_LIBDIR}/linkcmds.flash_sdram", "linkcmds.flash_sdram")
|
||||
do-configure: |
|
||||
content = """INCLUDE linkcmds.memory
|
||||
|
||||
REGION_ALIAS ("REGION_START", FLASH);
|
||||
REGION_ALIAS ("REGION_VECTOR", FLASH);
|
||||
REGION_ALIAS ("REGION_TEXT", FLASH);
|
||||
REGION_ALIAS ("REGION_TEXT_LOAD", FLASH);
|
||||
REGION_ALIAS ("REGION_RODATA", FLASH);
|
||||
REGION_ALIAS ("REGION_RODATA_LOAD", FLASH);
|
||||
REGION_ALIAS ("REGION_DATA", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_DATA_LOAD", FLASH);
|
||||
REGION_ALIAS ("REGION_FAST_TEXT", ITCM);
|
||||
REGION_ALIAS ("REGION_FAST_TEXT_LOAD", ITCM);
|
||||
REGION_ALIAS ("REGION_FAST_DATA", DTCM);
|
||||
REGION_ALIAS ("REGION_FAST_DATA_LOAD", DTCM);
|
||||
REGION_ALIAS ("REGION_BSS", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_WORK", SDRAM_2);
|
||||
REGION_ALIAS ("REGION_STACK", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_NOCACHE", SRAM_1);
|
||||
REGION_ALIAS ("REGION_NOCACHE_LOAD", FLASH);
|
||||
|
||||
bsp_vector_table_in_start_section = 1;
|
||||
"""
|
||||
|
||||
if conf.env.STM32H7_ENABLE_MPU_ALIGNMENT:
|
||||
content += """
|
||||
bsp_align_text_and_rodata_end_to_power_of_2 = 1;
|
||||
"""
|
||||
|
||||
content += """
|
||||
INCLUDE linkcmds.armv7m
|
||||
"""
|
||||
f = conf.bldnode.make_node(
|
||||
conf.env.VARIANT + "/linkcmds.flash_sdram"
|
||||
)
|
||||
f.parent.mkdir()
|
||||
f.write(content)
|
||||
conf.env.append_value("cfg_files", f.abspath())
|
||||
enabled-by: true
|
||||
links: []
|
||||
prepare-build: null
|
||||
prepare-configure: null
|
||||
type: build
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
|
||||
copyrights:
|
||||
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
|
||||
49
spec/build/bsps/arm/stm32h7/linkcmdssram.yml
Normal file
49
spec/build/bsps/arm/stm32h7/linkcmdssram.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
build-type: script
|
||||
do-build: |
|
||||
bld.install_as("${BSP_LIBDIR}/linkcmds.sram", "linkcmds.sram")
|
||||
do-configure: |
|
||||
content = """INCLUDE linkcmds.memory
|
||||
|
||||
REGION_ALIAS ("REGION_START", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_VECTOR", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_TEXT", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_TEXT_LOAD", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_RODATA", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_RODATA_LOAD", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_DATA", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_DATA_LOAD", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_FAST_TEXT", ITCM);
|
||||
REGION_ALIAS ("REGION_FAST_TEXT_LOAD", ITCM);
|
||||
REGION_ALIAS ("REGION_FAST_DATA", DTCM);
|
||||
REGION_ALIAS ("REGION_FAST_DATA_LOAD", DTCM);
|
||||
REGION_ALIAS ("REGION_BSS", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_WORK", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_STACK", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_NOCACHE", SRAM_1);
|
||||
REGION_ALIAS ("REGION_NOCACHE_LOAD", SRAM_AXI);
|
||||
|
||||
bsp_vector_table_in_start_section = 1;
|
||||
"""
|
||||
|
||||
if conf.env.STM32H7_ENABLE_MPU_ALIGNMENT:
|
||||
content += """
|
||||
bsp_align_text_and_rodata_end_to_power_of_2 = 1;
|
||||
"""
|
||||
|
||||
content += """
|
||||
INCLUDE linkcmds.armv7m
|
||||
"""
|
||||
f = conf.bldnode.make_node(
|
||||
conf.env.VARIANT + "/linkcmds.sram"
|
||||
)
|
||||
f.parent.mkdir()
|
||||
f.write(content)
|
||||
conf.env.append_value("cfg_files", f.abspath())
|
||||
enabled-by: true
|
||||
links: []
|
||||
prepare-build: null
|
||||
prepare-configure: null
|
||||
type: build
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
|
||||
copyrights:
|
||||
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
|
||||
49
spec/build/bsps/arm/stm32h7/linkcmdssramsdram.yml
Normal file
49
spec/build/bsps/arm/stm32h7/linkcmdssramsdram.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
build-type: script
|
||||
do-build: |
|
||||
bld.install_as("${BSP_LIBDIR}/linkcmds.sram_sdram", "linkcmds.sram_sdram")
|
||||
do-configure: |
|
||||
content = """INCLUDE linkcmds.memory
|
||||
|
||||
REGION_ALIAS ("REGION_START", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_VECTOR", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_TEXT", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_TEXT_LOAD", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_RODATA", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_RODATA_LOAD", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_DATA", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_DATA_LOAD", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_FAST_TEXT", ITCM);
|
||||
REGION_ALIAS ("REGION_FAST_TEXT_LOAD", ITCM);
|
||||
REGION_ALIAS ("REGION_FAST_DATA", DTCM);
|
||||
REGION_ALIAS ("REGION_FAST_DATA_LOAD", DTCM);
|
||||
REGION_ALIAS ("REGION_BSS", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_WORK", SDRAM_2);
|
||||
REGION_ALIAS ("REGION_STACK", SRAM_AXI);
|
||||
REGION_ALIAS ("REGION_NOCACHE", SRAM_1);
|
||||
REGION_ALIAS ("REGION_NOCACHE_LOAD", SRAM_AXI);
|
||||
|
||||
bsp_vector_table_in_start_section = 1;
|
||||
"""
|
||||
|
||||
if conf.env.STM32H7_ENABLE_MPU_ALIGNMENT:
|
||||
content += """
|
||||
bsp_align_text_and_rodata_end_to_power_of_2 = 1;
|
||||
"""
|
||||
|
||||
content += """
|
||||
INCLUDE linkcmds.armv7m
|
||||
"""
|
||||
f = conf.bldnode.make_node(
|
||||
conf.env.VARIANT + "/linkcmds.sram_sdram"
|
||||
)
|
||||
f.parent.mkdir()
|
||||
f.write(content)
|
||||
conf.env.append_value("cfg_files", f.abspath())
|
||||
enabled-by: true
|
||||
links: []
|
||||
prepare-build: null
|
||||
prepare-configure: null
|
||||
type: build
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
|
||||
copyrights:
|
||||
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
|
||||
@@ -13,8 +13,9 @@ format: '{}'
|
||||
links: []
|
||||
name: STM32H7_DEFAULT_LINKCMDS
|
||||
description: |
|
||||
The default linker command file. Must be either linkcmds.flash or
|
||||
linkcmds.sdram.
|
||||
The default linker command file. Must be either linkcmds.flash,
|
||||
linkcmds.sdram, linkcmds.sram, linkcmds.sram_sdram
|
||||
or linkcmds.flash_sdram
|
||||
type: build
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
|
||||
copyrights:
|
||||
|
||||
Reference in New Issue
Block a user