[Embedded] rust-lld: error: memory.x:6: region 'FLASH' already defined

Hi,

I have this memory.x

MEMORY
{
  /* NOTE 1 K = 1 KiBi = 1024 bytes */
  FLASH : ORIGIN = 0x00000000, LENGTH = 1024K
  RAM : ORIGIN = 0x20000000, LENGTH = 256K
}

and this error message:

 = note: rust-lld: error: memory.x:4: region 'FLASH' already defined
          >>>   FLASH : ORIGIN = 0x00000000, LENGTH = 1024K
          >>>       

For testing purpose, I tried removing the FLASH line:

  = note: rust-lld: error: c:\Users\Geobomatic\Dev\embedded\demo\target\thumbv7em-none-eabihf\debug\build\cortex-m-rt-c18516fb3cf57635\out\link.x:66: memory region not defined: FLASH
          >>>   .vector_table ORIGIN(FLASH) :
          >>>  

What am I missing? :-/

1 Like

I tried cortex_m_quickstart - Rust
and have the same already defined error Oo

in .cargo/config I changed the linker for the gnu one instead of the provided LLD and it works. Maybe something broke in latest stable :-/

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.