Skip to content

Commit 0578731

Browse files
committed
README_BUILD: Document DMA path environment var
Describe the LIBIIO_DMA_HEAP_PATH environment variable and provide an usage example. Signed-off-by: Dan Nechita <[email protected]>
1 parent d4a2b67 commit 0578731

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README_BUILD.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,32 @@ It will try to link against the `call_function` symbol even though it's clearly
161161

162162
For this reason, when building with MSVC, please build in `RelWithDebInfo` mode. If you try to build in `Debug` mode, it will error.
163163

164+
## Environment Variable Configuration
165+
166+
### DMA Heap Path Configuration
167+
168+
libiio supports configuring the DMA heap path globally through the `LIBIIO_DMA_HEAP_PATH` environment variable. This overrides the default `/dev/dma_heap/system` path for all IIO devices.
169+
170+
#### Supported Format (Global Only)
171+
```bash
172+
export LIBIIO_DMA_HEAP_PATH=heap_name
173+
```
174+
This will use `/dev/dma_heap/<heap_name>` for every device.
175+
176+
**Example:**
177+
```bash
178+
export LIBIIO_DMA_HEAP_PATH=cma,linux
179+
./an_iio_application
180+
```
181+
Uses `/dev/dma_heap/cma,linux` globally.
182+
183+
#### Constraints and Fallback Behavior
184+
185+
- Heap name must be 1-64 characters
186+
- Empty, unset, or too-long values fall back to the default `system` heap
187+
188+
This feature is intended for users who need to select an alternative DMA heap present under `/dev/dma_heap/` (for example a reserved or CMA heap).
189+
164190
## Instructions applicable to Microcontroller configurations
165191

166192
### Install Prerequisites/Dependencies

0 commit comments

Comments
 (0)