Skip to content

Commit 4342d0e

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 7f18723 commit 4342d0e

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
@@ -164,6 +164,32 @@ It will try to link against the `call_function` symbol even though it's clearly
164164

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

167+
## Environment Variable Configuration
168+
169+
### DMA Heap Path Configuration
170+
171+
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.
172+
173+
#### Supported Format (Global Only)
174+
```bash
175+
export LIBIIO_DMA_HEAP_PATH=heap_name
176+
```
177+
This will use `/dev/dma_heap/<heap_name>` for every device.
178+
179+
**Example:**
180+
```bash
181+
export LIBIIO_DMA_HEAP_PATH=cma,linux
182+
./an_iio_application
183+
```
184+
Uses `/dev/dma_heap/cma,linux` globally.
185+
186+
#### Constraints and Fallback Behavior
187+
188+
- Heap name must be 1-64 characters
189+
- Empty, unset, or too-long values fall back to the default `system` heap
190+
191+
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).
192+
167193
## Instructions applicable to Microcontroller configurations
168194

169195
### Install Prerequisites/Dependencies

0 commit comments

Comments
 (0)