-
Notifications
You must be signed in to change notification settings - Fork 33
/
Kconfig
86 lines (74 loc) · 2.76 KB
/
Kconfig
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
menuconfig RUST
bool "Rust"
select THREAD_CUSTOM_DATA
# Static initializers for Zephyr >=3.7
select STATIC_INIT_GNU if TOOLCHAIN_SUPPORTS_STATIC_INIT_GNU
# Static initializers for Zephyr 2.x
select CPLUSPLUS if !TOOLCHAIN_SUPPORTS_STATIC_INIT_GNU
help
Rust language support.
if RUST
# Define this choice to use PICOLIBC_USE_MODULE on 3.7 and be compatible with 2.x
# This breaks older 3.x versions because PICOLIBC_SOURCE is not a choice there
# It is not possible to use 'select' with a 'choice'
choice PICOLIBC_SOURCE
prompt "Source of Picolibc"
default PICOLIBC_USE_MODULE
config PICOLIBC_USE_MODULE
bool "Picolibc from module"
endchoice
choice RUST_GLOBAL_ALLOCATOR
prompt "Rust global allocator"
default RUST_ALLOC_POOL if USERSPACE
help
The global allocator can either use k_malloc or a dedicated sys mem
pool for Rust allocations. A dedicated pool is the default for userspace
because the pool must be placed in a shared memory region accessible
to all Rust userspace threads. If an application wants to provide its
own allocator with #[global_allocator] and avoid creating a Zephyr
sys_mem_pool, select RUST_ALLOC_KMALLOC.
config RUST_ALLOC_KMALLOC
bool "k_malloc"
help
Adjust the pool size with CONFIG_HEAP_MEM_POOL_SIZE. Must be non-zero.
config RUST_ALLOC_POOL
bool "Dedicated memory pool"
help
Required for userspace.
endchoice
if RUST_ALLOC_POOL
config RUST_HEAP_MEM_POOL_MAX_SIZE
int "Rust heap memory pool block size (in bytes)"
default 1024
help
This option specifies the max block size of the heap memory pool
created specifically to act as the Rust global allocator. Must be a
power of 2. A size of zero means that no heap memory pool is defined.
config RUST_HEAP_MEM_POOL_MIN_SIZE
int "The smallest blocks in the Rust heap memory pool (in bytes)"
default 32
help
This option specifies the size of the smallest block partition.
Option must be a power of 2 and less than or equal to the heap block
size.
config RUST_HEAP_MEM_POOL_NMAX
int "Rust heap memory pool size (in blocks)"
default 8
help
This option specifies the number of max block size blocks in the Rust
heap.
endif
rsource "mutex-pool/Kconfig"
endif
config UART_BUFFERED
bool "UART fifo buffered driver"
depends on SERIAL && UART_INTERRUPT_DRIVEN
select POLL
help
Allows wrapping the raw UART API with software RX and TX FIFOs that
can be accessed from user space. Interrupt handlers move data between
the hardware fifos and memory. This way, interrupt handlers do not
need to be specifically written to deal with application-specific
UART use cases from kernel mode. Signals are provided for a thread to
be woken on read or write readiness. Behaves similarly to a UNIX
file, supporting blocking and non-blocking reads and writes.