Zephyr API Documentation
4.0.0
A Scalable Open Source RTOS
4.0.0
Toggle main menu visibility
Main Page
Related Pages
Topics
Data Structures
Data Structures
Data Structure Index
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
Files
File List
Globals
All
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
f
g
h
i
k
l
m
n
o
p
r
s
t
u
x
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Macros
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
▼
Zephyr API Documentation
►
Introduction
Deprecated List
►
Topics
►
Data Structures
▼
Files
▼
File List
►
doc
►
kernel
►
lib
►
subsys
▼
zephyr
►
acpi
►
app_memory
►
arch
►
audio
►
bluetooth
►
canbus
►
console
►
crypto
►
data
►
debug
►
devicetree
►
dfu
►
display
►
drivers
►
dsp
►
dt-bindings
►
fs
►
input
►
internal
►
ipc
►
kernel
▼
linker
►
devicetree_regions.h
►
iterable_sections.h
►
linker-defs.h
linker-devnull.h
►
linker-tool-gcc.h
►
linker-tool-lld.h
►
linker-tool-mwdt.h
linker-tool.h
section_tags.h
sections.h
►
utils.h
►
llext
►
logging
►
lorawan
►
math
►
mem_mgmt
►
mgmt
►
misc
►
modbus
►
modem
►
multi_heap
►
net
►
platform
►
pm
►
posix
►
random
►
retention
►
rtio
►
sd
►
sensing
►
settings
►
shell
►
sip_svc
►
stats
►
storage
►
sys
►
task_wdt
►
timing
►
toolchain
►
tracing
►
usb
►
usb_c
►
xen
►
zbus
►
zvfs
►
bindesc.h
►
cache.h
►
device.h
►
devicetree.h
►
fatal.h
►
fatal_types.h
►
init.h
►
irq.h
►
irq_multilevel.h
►
irq_nextlevel.h
►
irq_offload.h
►
kernel.h
kernel_includes.h
►
kernel_structs.h
►
kernel_version.h
►
net_buf.h
►
shared_irq.h
►
smf.h
►
spinlock.h
►
sw_isr_table.h
►
sys_clock.h
►
syscall.h
►
toolchain.h
types.h
►
Globals
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
Loading...
Searching...
No Matches
linker-devnull.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2023 Nordic Semiconductor ASA
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
/*
8
* DESCRIPTION
9
* Platform independent set of macros for creating a memory segment for
10
* aggregating data that shall be kept in the elf file but not in the binary.
11
*/
12
13
#ifndef ZEPHYR_INCLUDE_LINKER_LINKER_DEVNULL_H_
14
15
#if defined(CONFIG_LINKER_DEVNULL_MEMORY)
16
17
#if defined(CONFIG_XIP)
18
#if (!defined(ROM_ADDR) && !defined(ROM_BASE)) || !defined(ROM_SIZE)
19
#error "ROM_SIZE, ROM_ADDR or ROM_BASE not defined"
20
#endif
21
#endif
/* CONFIG_XIP */
22
23
#if (!defined(RAM_ADDR) && !defined(RAM_BASE)) || !defined(RAM_SIZE)
24
#error "RAM_SIZE, RAM_ADDR or RAM_BASE not defined"
25
#endif
26
27
#if defined(CONFIG_XIP) && !defined(ROM_ADDR)
28
#define ROM_ADDR ROM_BASE
29
#endif
30
31
#if !defined(RAM_ADDR)
32
#define RAM_ADDR RAM_BASE
33
#endif
34
35
#define ROM_END_ADDR (ROM_ADDR + ROM_SIZE)
36
#define DEVNULL_SIZE CONFIG_LINKER_DEVNULL_MEMORY_SIZE
37
#define ROM_DEVNULL_END_ADDR (ROM_END_ADDR + DEVNULL_SIZE)
38
#define MAX_ADDR UINT32_MAX
39
40
/* Determine where to put the devnull region. It should be adjacent to the ROM
41
* region. If ROM starts after RAM or the distance between ROM and RAM is big
42
* enough to fit the devnull region then devnull region is placed just after
43
* the ROM region. If it cannot be done then the devnull region is placed before
44
* the ROM region. It is possible that the devnull region cannot be placed
45
* adjacent to the ROM (e.g. ROM starts at 0 and RAM follows ROM). In that
46
* case compilation fails and the devnull region is not supported in that
47
* configuration.
48
*/
49
#if !defined(CONFIG_XIP)
50
51
#if RAM_ADDR >= DEVNULL_SIZE
52
#define DEVNULL_ADDR (RAM_ADDR - DEVNULL_SIZE)
53
#else
54
#define DEVNULL_ADDR (RAM_ADDR + RAM_SIZE)
55
#endif
56
57
#else
/* CONFIG_XIP */
58
59
#if ((ROM_ADDR > RAM_ADDR) && ((MAX_ADDR - ROM_END_ADDR) >= DEVNULL_SIZE)) || \
60
((ROM_END_ADDR + DEVNULL_SIZE) <= RAM_ADDR)
61
#define DEVNULL_ADDR ROM_END_ADDR
62
#elif ROM_ADDR > DEVNULL_SIZE
63
#define DEVNULL_ADDR (ROM_ADDR - DEVNULL_SIZE)
64
#else
65
#error "Cannot place devnull segment adjacent to ROM region."
66
#endif
67
68
#endif
/* CONFIG_XIP */
69
70
#define DEVNULL_REGION DEVNULL_ROM
71
72
#endif
/* CONFIG_LINKER_DEVNULL_MEMORY */
73
74
#endif
/* ZEPHYR_INCLUDE_LINKER_LINKER_DEVNULL_H_ */
zephyr
linker
linker-devnull.h
Generated on Sat Nov 16 2024 04:55:03 for Zephyr API Documentation by
1.12.0