cancel
Showing results for 
Search instead for 
Did you mean: 

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 ?

Mrunal A
Associate III

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?

2 REPLIES 2

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 Venmo
Up vote any posts that you find helpful, it shows what's working..

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

So I was confused.