This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
art Number: TM4C1294NCPDT
Tool/software: Code Composer Studio
I'm using the TM4C1294 microcontroller for my IoT application. I'm been facing some issues with ram usage and planned to go for a external ram for more ram available.
I've been reading the following example ti.com/tool/TIDM-TM4C129XSDRAM and it seems pretty straight-foward the hardware requirements, but I still have some question about the firmware development using the external RAM.
My question is more into the linker and how to treat my code using both external and internal RAM. On the example before, the author used the following line to make sure he was accessing the external RAM:
g_pui16EPISdram = (uint16_t *)0x60000000;
His linker was also the default, so I'm assuming when allocating variables on my code, such variables would never use the external RAM, right?
#define APP_BASE 0x00000000
#define RAM_BASE 0x20000000
/* System memory map */
/* Application stored in and executes from internal flash */
FLASH (RX) : origin = APP_BASE, length = 0x00100000
/* Application uses internal RAM for data */
SRAM (RWX) : origin = 0x20000000, length = 0x00040000
/* Section allocation in memory */
.intvecs: > APP_BASE
.text : > FLASH
.const : > FLASH
.cinit : > FLASH
.pinit : > FLASH
.init_array : > FLASH
.vtable : > RAM_BASE
.data : > SRAM
.bss : > SRAM
.sysmem : > SRAM
.stack : > SRAM
__STACK_TOP = __stack + 256;
So, my question is: is it possible to use the external and internal RAM as one linear memory bank? Can I program just as if I had using my internal RAM? What modifications to the example would be required to do such?
I intend to use this with TI-RTOS, does this change the answer or still the same?
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Charles Tsai:
I understand that the external RAM will start at address 0x60000000 and how to explicit ask for the microcontroller to read and write from such addresses. I'm wondering if it is possible to make this transparent for the rest of my code. Since I already have a few thousand lines of code and several .c and .h files, it would require me a bunch of work and consideration of which variable is going to which memory.
When I used the MSP430 with FRAM, that would be done by writing a #pragma right before the variable declaration so that specific region would be allocated on FRAM instead of normal RAM. I'm assuming the FRAM memory region was declared on the linker beforehand.
Again, the example you mentioned shows how to point to a specific address on external RAM, that is clear to me. What is not is how to use the external RAM with minimum hassle on my future code or code rework on my already tested and working code.
In reply to daniolip:
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.