zephyr/include/zephyr
Grzegorz Swiderski e5d14c6821 riscv: linker: Fallback to Kconfig when defining ROM region
With `CONFIG_XIP=y`, this linker script would derive the ROM region from
the chosen `zephyr,flash` DT node with "soc-nv-flash" or "jedec,spi-nor"
as its compatible. If the node was absent or had a different compatible,
then linking would fail with:

    undefined symbol `ROM_BASE' referenced in expression

Fix this by using `CONFIG_FLASH_BASE_ADDRESS` and `CONFIG_FLASH_SIZE`
for ROM base and size respectively. The existing DT logic is preserved
for compatibility with out-of-tree boards, so the flash Kconfigs serve
as a mere fallback.

In addition, use `CONFIG_FLASH_LOAD_OFFSET` and `CONFIG_FLASH_LOAD_SIZE`
if defined, to align with some other architectures' linker scripts. For
the existing in-tree RISC-V boards, this should not make a difference.

The alternative would've been making sure that all boards and SoCs have
the relevant Kconfigs set, and only using those in the linker script.
The downside is that `CONFIG_FLASH_SIZE` is given in units of 1 KiB,
while some existing boards - hifive1_revb, sparkfun_red_v_things_plus -
have more granular flash sizes, which would've been rounded down.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-02-05 14:05:57 +01:00
..
acpi lib: acpi: add device resource enum support 2024-01-31 15:03:06 +01:00
app_memory
arch riscv: linker: Fallback to Kconfig when defining ROM region 2024-02-05 14:05:57 +01:00
audio include: audio: dmic: add DMIC_STATE_ERROR enum 2024-01-17 14:43:52 +01:00
bluetooth Bluetooth: VCP: Fix missing guards for AICS and VOCS 2024-02-05 13:13:00 +01:00
canbus
console doc: console_api group added to doxygen 2023-11-22 09:37:38 +00:00
crypto
data
debug
devicetree devicetree: remove label property accessors 2023-12-01 13:09:56 -08:00
dfu
display include: drivers: mipi_dsi: split MIPI DCS values into separate header 2024-01-31 16:01:45 +00:00
drivers drivers: mipi_dbi: clarify write size for mipi_write_display 2024-02-02 11:52:17 -06:00
dsp
dt-bindings dt-bindings: misc: add nordic,nrf-ficr helper definitions 2024-02-02 16:40:11 +01:00
fs
input input: add two input to hid code translation functions 2024-01-24 10:44:40 +01:00
internal syscall_handler: Fix warnings in K_SYSCALL_MEMORY 2023-12-28 09:52:15 +01:00
ipc
kernel kernel: move z_init_cpu to private kernel headers 2024-01-17 11:57:20 -05:00
linker arch: arm: Update to support local ISR declaration 2024-02-02 19:49:36 +01:00
llext llext: Support memory protection 2024-02-02 13:06:28 -05:00
logging logging: add flag to skip source info 2024-01-22 14:05:11 -05:00
lorawan lorawan: include: add missing Doxygen comments 2023-11-23 10:05:42 +01:00
math
mem_mgmt mem_mgmt: Add a memory attributes memory allocator 2023-11-27 19:56:48 +01:00
mgmt ec_host_cmd: improve handling IN_PROGRESS commands 2024-01-31 10:34:47 -06:00
modbus modbus: Document exception codes 2023-11-28 19:32:33 -05:00
modem modem: chat: Implement TRANSMIT_IDLE event 2024-01-25 11:22:42 +01:00
multi_heap
net net: net_pkt: add peer sockaddr member in net_pkt struct 2024-02-02 09:42:18 -06:00
pm pm: device_runtime: Extend existing API with ISR_SAFE mode 2024-02-01 15:03:42 +01:00
portability
posix posix: sched: Implement sched_rr_get_interval 2024-02-02 12:42:50 +01:00
random
retention
rtio rtio: Fix unused argument 2024-01-31 22:12:36 +01:00
sd include: sd: revise the minimum alignment of card_buffer to 4-bytes 2024-01-18 20:04:50 +01:00
sensing sensing: sensing_sensor: fix doxygen warnings 2024-01-30 18:42:30 +01:00
settings
shell shell: Fix shell init procedure when configured as inactive on startup 2024-01-21 16:01:36 +01:00
sip_svc
stats
storage storage/flash_map: Retire macros deprecated in release 3.2 2024-01-31 09:08:12 -06:00
sys sys: util: Accept empty FOR_EACH 2024-01-29 11:32:54 +01:00
task_wdt
timing os: timing: polish doxygen 2023-12-12 19:10:33 +01:00
toolchain toolchain: gcc: fix GCC < 11.0.0 build with -Wundef 2023-11-24 14:45:08 +01:00
tracing pm: device_runtime: Add delay to async put 2023-12-12 10:57:34 +01:00
usb usb: device_next: new USB Audio 2 implementation 2024-02-01 15:07:37 +01:00
usb_c
xen
zbus zbus: add priority boost feature 2024-01-04 09:41:54 +01:00
bindesc.h
cache.h cache: introduce incoherent cache interface 2024-02-03 13:42:33 -05:00
device.h pm: device_runtime: Extend with synchronous runtime PM 2024-02-01 15:03:42 +01:00
devicetree.h docs: rename intel,pcie compatible id to pcie-controller 2024-01-31 15:03:06 +01:00
fatal_types.h
fatal.h
init.h init: adjust the SYS_INIT dev field init to play nice with older compilers 2024-01-26 09:44:04 +01:00
irq_multilevel.h drivers: intc: manage multi-level interrupt configs 2023-12-11 18:23:23 -05:00
irq_nextlevel.h drivers: intc: manage multi-level interrupt configs 2023-12-11 18:23:23 -05:00
irq_offload.h
irq.h
kernel_includes.h
kernel_structs.h
kernel_version.h
kernel.h kernel: work: Fix race in workqueue thread 2024-01-03 10:20:19 +01:00
shared_irq.h drivers: interrupt_controller: changes in shared irq 2024-01-31 13:47:39 -06:00
smf.h
spinlock.h
sw_isr_table.h arch: sw_isr_table: Implement local interrupt table entry creation 2024-02-02 19:49:36 +01:00
sys_clock.h
syscall.h
toolchain.h
types.h
zephyr.h