Zephyr API Documentation
4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
linker-tool-mwdt.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2020, Synopsys, Inc.
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
15
#ifndef ZEPHYR_INCLUDE_LINKER_LINKER_TOOL_MWDT_H_
16
#define ZEPHYR_INCLUDE_LINKER_LINKER_TOOL_MWDT_H_
17
18
/*
19
* mwdt linker doesn't have the following directives
20
*/
21
#define ASSERT(x, y)
22
#define SUBALIGN(x) ALIGN(x)
23
24
/*
25
* The GROUP_START() and GROUP_END() macros are used to define a group
26
* of sections located in one memory area, such as RAM, ROM, etc.
27
* The <where> parameter is the name of the memory area.
28
*/
29
#define GROUP_START(where)
30
#define GROUP_END(where)
31
32
/*
33
* The GROUP_LINK_IN() macro is located at the end of the section
34
* description and tells the linker that this section is located in
35
* the memory area specified by <where> argument.
36
*/
37
#define GROUP_LINK_IN(where) > where
38
45
#define GROUP_ROM_LINK_IN(vregion, lregion) > lregion
46
47
/*
48
* As GROUP_LINK_IN(), but takes a second argument indicating the
49
* memory region (e.g. "ROM") for the load address. Used for
50
* initialized data sections that on XIP platforms must be copied at
51
* startup.
52
*
53
* And, because output directives in GNU ld are "sticky", this must
54
* also be used on the first section *after* such an initialized data
55
* section, specifying the same memory region (e.g. "RAM") for both
56
* vregion and lregion.
57
*/
58
#ifdef CONFIG_XIP
59
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion AT > lregion
60
#else
61
#define GROUP_DATA_LINK_IN(vregion, lregion) > vregion
62
#endif
63
68
#ifdef CONFIG_XIP
69
#define GROUP_NOLOAD_LINK_IN(vregion, lregion) > vregion AT > vregion
70
#else
71
#define GROUP_NOLOAD_LINK_IN(vregion, lregion) > vregion
72
#endif
73
74
/*
75
* The SECTION_PROLOGUE() macro is used to define the beginning of a section.
76
* The <name> parameter is the name of the section, and the <option> parameter
77
* is to include any special options such as (NOLOAD). Page alignment has its
78
* own parameter since it needs abstraction across the different toolchains.
79
* If not required, the <options> and <align> parameters should be left blank.
80
*/
81
#define SECTION_PROLOGUE(name, options, align) name options : align
82
83
/*
84
* As for SECTION_PROLOGUE(), except that this one must (!) be used
85
* for data sections which on XIP platforms will have differing
86
* virtual and load addresses (i.e. they'll be copied into RAM at
87
* program startup). Such a section must (!) also use
88
* GROUP_LINK_IN_LMA to specify the correct output load address.
89
*/
90
#ifdef CONFIG_XIP
91
#define SECTION_DATA_PROLOGUE(name, options, align) \
92
name options ALIGN(8) : align
93
#else
94
#define SECTION_DATA_PROLOGUE(name, options, align) name options : align
95
96
#endif
97
98
#define SORT_BY_NAME(x) SORT(x)
99
100
#endif
/* ZEPHYR_INCLUDE_LINKER_LINKER_TOOL_MWDT_H_ */
zephyr
linker
linker-tool-mwdt.h
Generated on Sat Nov 16 2024 04:55:03 for Zephyr API Documentation by
1.12.0