Skip to main content
Mrunal A
Associate III
June 25, 2019
Question

Why Linker file needs to be modified to use External memory(RAM/Flash) if I can access external memory using communication modes like SPI,I2C,etc ?

  • June 25, 2019
  • 1 reply
  • 905 views

I have seen many examples to use external memory as heap but for it they have modified the linker and added section of needed memory. But I am curious if I can access the external memory using standard communication interfaces like I2c, SPI, etc then why to edit linker? What are the benefits of modifying linker vs the accessing the memory using I2C?

    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    June 25, 2019

    The processor can access all available memory.

    The linker's job is place code/data, and the script defines where the regions to use are situated. External memory is not functional unless the CPU sets them up with code you supply, so in the non-board specific cases it typically doesn't describe memories that aren't available.

    Perhaps review texts on Assemblers, Compilers, Linkers and Loaders to understand the function of each.

    Peripherals in this context have fixed/absolute addresses, and the linkers job is not to assign them addresses.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Mrunal A
    Mrunal AAuthor
    Associate III
    June 26, 2019

    I have read this answer on SO : https://stackoverflow.com/a/22684093

    So I was confused.