I am using an LPC2468 processor with external SDRAM starting at address 0xA000000 in addition to the the processors built in RAM. I need to define variables in both address spaces.
My predecessor used type name __at (0xA???????) to do this. Some of these variables are arrays of structures so its not always easy to know what the next address should be. Very prone to error.
Do I need to define each variable using the __attribute__ modifier? If so, how? Perhaps using the name attribute and defining the memory space in the scatter file?
Is there a way to say, from here until I say otherwise use this memory space ? Or does each variable need its own qualifier?
Thanks
Use a Scatter File (like a linker script) to define the memory regions, and direct the variables into section that resided in the SDRAM address space.