Struct ld_memory::MemorySection[][src]

pub struct MemorySection { /* fields omitted */ }

Implementations

Divide memory section into slots.

This can be used to divide a memory section into multiple slots of equal size, e.g., for an active / passive image scheme on MCUs.

slot starts at zero for the first slot.

Read options from environment

This will evaluate the following environment variables:

VariableDefault
LDMEMORY_OFFSET0
LDMEMORY_PAGESIZE1
LDMEMORY_NUM_SLOTS2
LDMEMORY_SLOTNone

If an offset is given, the whole section will be offset and shortened by the given value. If a pagesize is given, the slots will start and end will be aligned at the pagesize.

If a slot number is given, the remaining section will be divided into <prefix>_NUM_SLOTS slots, aligned to <prefix>_PAGESIZE, and the <prefix>_SLOTth (starting at 0) will be returned.

Note: from_env_with_prefix can be used to use a different prefix than the default prefix LDMEMORY_.

Read slot options from environment with custom prefix

See from_env().

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.