aboutsummaryrefslogtreecommitdiff
path: root/config/libc/picolibc.in
blob: 6c4c6cac795d44924ae9831ea18d47a77a01a514 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# picolibc options

## depends on BARE_METAL && CONFIGURE_has_meson && CONFIGURE_has_ninja
## select CC_CORE_NEEDED
## select LIBC_SUPPORT_THREADS_NATIVE

## help Picolibc is a C library intended for use on embedded systems. It is a
## help conglomeration of several library parts, all under BSD-compatible software
## help licenses that make them easily usable on embedded products.
## help
## help This requres GCC with picolibc support which is only available
## help for GCC version 12.2.0 or later. A crosstool-ng dependency conflict
## help prevents that from being managed automatically.
##

config LIBC_PICOLIBC_CXA_ATEXIT
    def_bool y
    select LIBC_PROVIDES_CXA_ATEXIT

config LIBC_PICOLIBC_TARGET_CFLAGS
    string
    prompt "Target CFLAGS for picolibc"
    default ""
    help
      Used to add specific options when compiling the target libraries
      (eg. -ffunction-sections -fdata-sections), which can't be defined
      in global TARGET_CFLAGS, because they shall be not used for the
      gcc target libraries.
      Note:  Both TARGET_CFLAGS and LIBC_PICOLIBC_TARGET_CFLAGS are used
             to compile the libraries.

      Leave blank if you don't know better.

config LIBC_PICOLIBC_IO_C99FMT
    bool
    prompt "Enable IOs on C99 formats"
    default y
    help
      Enable support for IOs on C99 formats.

config LIBC_PICOLIBC_REGISTER_FINI
    bool
    prompt "Enable finalization function registration using atexit"
    help
        Enable finalization function registration using atexit.

config LIBC_PICOLIBC_ATEXIT_DYNAMIC_ALLOC
    bool
    prompt "Enable dynamic allocation of atexit entries"
    help
        Enable dynamic allocation of atexit entries.

config LIBC_PICOLIBC_GLOBAL_ATEXIT
    bool
    prompt "Enable atexit data structure as global variable"
    help
        Enable atexit data structure as global variable, instead
        of being thread-local.

config LIBC_PICOLIBC_LITE_EXIT
    bool
    prompt "Enable lite exit"
    default y
    help
        Enable lite exit, a size-reduced implementation of exit that doesn't
        invoke clean-up functions such as _fini or global destructors.

config LIBC_PICOLIBC_MULTITHREAD
    bool
    prompt "Enable support for multiple threads"
    default y
    help
        Enable support for multiple threads.

config LIBC_PICOLIBC_RETARGETABLE_LOCKING
    bool
    prompt "Enable retargetable locking"
    default y
    help
        Enable retargetable locking to allow the operating system to override
        the dummy lock functions defined within picolibc.

config LIBC_PICOLIBC_EXTRA_SECTIONS
    bool
    prompt "Place each function & data element in their own section"
    help
        Place each function & data symbol in their own section. This allows
        the linker to garbage collect unused symbols at link time.

config LIBC_PICOLIBC_ENABLE_TARGET_OPTSPACE
    bool
    prompt "Optimize picolibc for size"
    default y
    help
      Pass --enable-target-optspace to picolibc configure.

      This will compile picolibc with -Os.

config LIBC_PICOLIBC_LTO
    bool
    prompt "Enable Link Time Optimization"
    depends on CC_GCC_USE_LTO
    help
      Builds the libraries with -flto to enable more aggressive link time
      optimization. You will need to add -flto-partition=one to your
      application's link line to keep the RETURN assembler macro together
      with it's consumers.

config LIBC_PICOLIBC_NANO_MALLOC
    bool
    prompt "Enable Nano Malloc"
    default y
    help
      PICOLIBC has two implementations of malloc family's functions, one in
      `mallocr.c' and the other one in `nano-mallocr.c'.  This options
      enables the nano-malloc implementation, which is for small systems
      with very limited memory.  Note that this implementation does not
      support `--enable-malloc-debugging' any more.

config LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY
    string
    prompt "Extra config for picolibc"
    default ""
    help
      Extra flags to pass to meson when configuring picolibc.

config LIBC_PICOLIBC_DEFAULT_FLASH_ADDR
    string
    prompt "Default flash address for picolibc.ld"
    default "0x10000000"
    help
      Sets the default base adddress for the read-only portion of the
      application when linked using the default picolibc link
      script. Can be overridden on the linker command line using
      -Wl,--defsym=__flash=<value>

config LIBC_PICOLIBC_DEFAULT_FLASH_SIZE
    string
    prompt "Default flash size for picolibc.ld"
    default "0x00010000"
    help
      Sets the default size for the read-only portion of the
      application when linked using the default picolibc link script.
      Can be overridden on the linker command line using
      -Wl,--defsym=__flash_size=<value>

config LIBC_PICOLIBC_DEFAULT_RAM_ADDR
    string
    prompt "Default ram address for picolibc.ld"
    default "0x20000000"
    help
      Sets the default base adddress for the read-write portion of the
      application when linked using the default picolibc link
      script. Can be overridden on the linker command line using
      -Wl,--defsym=__ram=<value>

config LIBC_PICOLIBC_DEFAULT_RAM_SIZE
    string
    prompt "Default ram size for picolibc.ld"
    default "0x00008000"
    help
      Sets the default size for the read-write portion of the
      application when linked using the default picolibc link script.
      Can be overridden on the linker command line using
      -Wl,--defsym=__ram_size=<value>