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.

SM320F28335-EP: External RAM initialization problem

Part Number: SM320F28335-EP
Other Parts Discussed in Thread: C2000WARE

My application needs a large data buffer for computation. We have a 1MB external RAM. The code has 2 parts, one is for control which is written in C, the other is for computation/algorithm, which is written in C++. The C++ uses template, virtual function and operator overloading ... I can build the ok, but run time always trapped into illegal_isr(). After a few weeks of troubleshooting, I realized that the problem has to do with the external memory and C++ virtual function table. I guess the compiler doesn't know that external memory was not available during bootstrap and uses it to store some virtual tables, but after my code started and config the external memory, it is filled with random data.

I think there might be 2 possible solutions.

1. Re-write the C++ code, so that the external RAM is only used as data buffer, not program. I am not exactly sure how to achieve it. 

2. If we can modify the bootstrap to config and enable the external memory before initialization, it may solve our problem. 

I am not very familiar with C++, that part of the code is written by another programmer. I am integrating it into my C code. I am not using RTOS, my CCS version is 6.0.1. 

Again, my question is that is it possible for me to modify the bootstrap to config and enable my external RAM. Or, is there other ways to solve my problem? I can provide more details if needed.

Thank you for your help,

Nelson

  • Nelson,

        Please send your linker command file. An expert from our software team will take a look.

  • Nelson,

                There are two solutions to your problem:

    1. Configure the XINTF in code_start section in C:\ti\c2000\C2000Ware_5_02_00_00\device_support\f2833x\common\source\DSP2833x_CodeStartBranch.asm. Note that this section is executed right after the boot-ROM branches to Flash (i.e. before cinit). You need to initialize the XINTF in assembly. 
    2. Modify your linker command file to only use the external RAM as a data buffer and not program.
    my CCS version is 6.0.1. 

    You may want to consider updating to the latest version V12.7.1 https://www.ti.com/tool/CCSTUDIO?keyMatch=ccs%2012%20download#downloads 

  • Hi Hareesh,

    Thanks for the quick response, your 1st option is what I am looking for, I will definitely try that. Thanks for the tip. My coworker is trying the 2nd option now, but I am not sure if he can achieve it any time soon.

    I did try CCS 12.5, it didn't make much difference. Do you think 12.7 will be different?

    Thank you so much for your help.

    Nelson

  • I did try CCS 12.5, it didn't make much difference. Do you think 12.7 will be different?

    No, if you are starting a new project, it is a good idea to use the most recent version of the tools. This ensures that you derive the benefit of all the bug fixes till date.

    On the same note, if this is a new project, you may want to take a look at our newer devices. Our newer devices are more powerful and have more features but often at a lesser cost. You can find suggestions for functionally-compatible newer devices in the device homepage under the title "Similar products you might be interested in". We have also published numerous migration guides to help you migrate to our newer devices.