For LPC 1768 develop using uVision 4.21. I set the target memory to:
IROM1: 0x0 0x80000 IRAM1: 0x10000000 0x8000 IRAM2: 0x2007c000 0x8000
But someone told me I can also set to:
IROM1: 0x0 0x80000 IRAM1: 0x10000000 0x8000 RAM2: 0x2007c000 0x8000
Because LPC 1768 does not has the external memory controller and linker does not care the on/off chip. Is that correct? If yes, if chip (like LPC 1788) does has the external memory controller, can I still set like that just because linker does not care the on/off chip memory?
If you plan to use pheripherial memory as standard RAM, you need to check if it is powered up before the program wants to zero-initialize and potentially assign initialization values to variables stored in these extra memory regions.
In my original post, I use LPC 1768 which only has on-chip memory.
By the way, LPC 1768 does not has the external memory controller. Can it has external memory?
Of course the LPC1768 can have external memory.
But since it doesn't have any external memory controller, it will not be able to have any memory-mapped external memory, i.e. to use external memory you either have to connect serially connected memory (SPI, I2C or similar) or manually generate addresses on some GPIO pins and then do data reads/writes on some other GPIO pins.
But I'm sorry for the confusion - the 1768 don't have any internal RAM that needs to be separately powered up, which the 2368 does.
I am assuming you are talking about use memory like SD card which could hold some data. Not the memory which code can run on it like on-chip memory does.
Yes. If you connect external memory, read-only or read-write, then you must write accessor functions to access them. Code can not be run from them, and compiler-generated code can not access variables stored there.
The big brothers in the processor family, who have a memory controller for external memory, supports memory-mapped data outside of the processor. But your processor do not have any address + data bus for interfacing address-mapped memory externally.
for LPC 1788, it has external memory controller. So code should can access the variables stored in external memory. Is that true?