[][src]Function r0::init_data

pub unsafe fn init_data<T>(sdata: *mut T, edata: *mut T, sidata: *const T) where
    T: Word

Initializes the .data section by copying it from the location indicated by sidata.

Arguments

  • sdata: Pointer to the start of the .data section in RAM.
  • edata: Pointer to the open/non-inclusive end of the .data section in RAM (the value behind this pointer will not be modified).
  • sidata: .data section Load Memory Address (LMA). Data will be copied from here.
  • Use T to indicate the alignment of the .data section and its LMA.

Safety

  • Must be called exactly once, before the application has started.
  • edata >= sdata.
  • The sdata -> edata region must not overlap with the sidata -> ... region.
  • sdata, edata and sidata must be T aligned.