zephyr/soc/riscv/openisa_rv32m1/CMakeLists.txt
Øyvind Rønningstad 05f0d85b6a extensions.cmake: Replace TEXT_START with ROM_START
In zephyr_linker_sources().
This is done since the point of the location is to place things at given
offsets. This can only be done consistenly if the linker code is placed
into the _first_ section.

All uses of TEXT_START are replaced with ROM_START.

ROM_START is only supported in some arches, as some arches have several
custom sections before text. These don't currently have ROM_START or
TEXT_START available, but that could be added with a bit of refactoring
in their linker script.

No SORT_KEYs are changed.

This also fixes an error introduced when TEXT_START was added, where
TEXT_SECTION_OFFSET was applied to riscv's common linker.ld instead of
to openisa_rv32m1's specific linker.ld.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-01-23 03:22:59 -08:00

23 lines
488 B
CMake

# Copyright (c) 2018 Foundries.io Ltd
#
# SPDX-License-Identifier: Apache-2.0
if(CONFIG_SOC_OPENISA_RV32M1_RI5CY)
if (CONFIG_RISCV_GENERIC_TOOLCHAIN)
zephyr_compile_options(-march=rv32imc)
else()
zephyr_compile_options(-march=rv32imcxpulpv2)
endif()
elseif(CONFIG_SOC_OPENISA_RV32M1_ZERO_RISCY)
zephyr_compile_options(-march=rv32imc)
endif()
zephyr_sources(
vector.S
soc_irq.S
wdog.S
soc.c
)
zephyr_linker_sources(ROM_START SORT_KEY 0x0vectors vector_table.ld)