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.

Memory Setting - Sections falls into a memory region that is not writable

Other Parts Discussed in Thread: TMS320DM642

Dear All,

   I’m new on the use of Code Composer Studio, and I have a question about memory setting.

I have a C program which size is big (debug out file is about 8.02 MB).

I have the following hardware setting:

Emulator: Blackhawk XDS560v2

DSP: DM642 Evaluation Module

Code Composer Studio: Version: 5.1.1.00031

Target Configuration:

Connection: Blackhawk XDS560v2-USB System Trace Emulator

Board or Device: both EVMDM642 and TMS320DM642

 

For my purpose, the memory necessary for both program and data are around 20 MB. I thought it could be possible to load the program in the SDRAM instead of the 4MB Flash memory (should it be possible, am I correct?), but I cannot figure out how to do.

When I set the Target Configuration as simulator, I could successfully run the program by change the Stack and Heap size from link preference.

I tried various programs and configurations, and I got the following messages (hope that they can be helpful).

 

Installed libraries:

EVMDM642 Target content from:

http://c6000.spectrumdigital.com/evmdm642/

Copied in: C:\ti\ccsv5\ccs_base\emulation\boards

C6000 CSL Library from:

http://www.ti.com/tool/sprc090

Installed in: C:\Program Files\C6xCSL

Used: lib_3x

 

Programs tested:

 

PROGRAM

LED from EVMDM642 in

C:\ti\ccsv5\ccs_base\emulation\boards\evmdm642\examples\bsl\led

Note:

Changed the include and link path associated to CCSv3_3 to the new paths (EVMDM642 and CSL path folders).

Compile: OK

Start Debug: OK

Run: The programs stop at EVMDM642_init();

The LED “DS1..9” blink one time.

 

PROGRAM

Hello World

Compile: OK

Start Debug: OK

Run: Ok! It displays “Hello World!” on stdout.

If I change the STACK size from Properties/C6000 Linker/Basic Options

Set C system stack size: from 800 to 800000

Message:

C64x: GEL Output: GEL StartUp Complete.

C64x: Loader: One or more sections of your program falls into a memory region that is not writable.  These regions will not actually be written to the target.  Check your linker configuration and/or memory map.

If I change the STACK and HEAP size from Properties/C6000 Linker/Basic Options

Set Heap size for C/C++ dynamic memory allocation: from 800 to 800000

Message:

Invalid CIO command (0).  Memory map prevented reading of target memory at 0x0018E750

 

PROGRAMS

SYS/BIOS – Generic Examples – Clock Example / Memory Example

Platform: ti.platforms.evmDM642

Compile: OK

Start Debug: Failed

Message:

C64x: GEL Output: GEL StartUp Complete.

C64x: Loader: One or more sections of your program falls into a memory region that is not writable.  These regions will not actually be written to the target.  Check your linker configuration and/or memory map.

C64x: Error: (Error -2044 @ 0x7FD73148) Internal error: Requested breakpoint does not exist. Restart the application. If error persists, please report the error. (Emulation package 5.0.569.0)

 

PROGRAMS

My Program

Program size: 8.02 MB

Message:

C64x: GEL Output: GEL StartUp Complete.

C64x: Loader: One or more sections of your program falls into a memory region that is not writable.  These regions will not actually be written to the target.  Check your linker configuration and/or memory map.

C64x: Error: (Error -2044 @ 0x10F00010) Internal error: Requested breakpoint does not exist. Restart the application. If error persists, please report the error. (Emulation package 5.0.569.0)

 

I don’t know which configuration should be the best to use:

I tried Empty projects, DSP/BIOS, and Empty projects with RTSC Configuration file.

 Even if the final version of the software will be smaller and faster, I have a strict deadline and a help will be really appreciated.

 

Thank You in advance!

 

Regards,

Alessandro

  • Hello Alessandro,

    Alessandro Moro said:
    C64x: Loader: One or more sections of your program falls into a memory region that is not writable.  These regions will not actually be written to the target.  Check your linker configuration and/or memory map.

    This is a common error when your program is build to be loaded in memory regions of which:

    a) does not exist on the target

    b) conflicts with the debugger memory map

    c) has not yet been initialized

    d) some or all of the above

    You need to make sure you are building your program with a valid linker command file for your target (DM642 EVM). You can try reusing one that comes with the target content package for the DM642 from Spectrum Digital (SD). or you can create one of your own. In any case i suggest reading the below document to learn more about linker command files. This will give you the essential information to understand how CCS knows where to load your program:

    See section 7.5 of: http://www.ti.com/lit/ug/spru186v/spru186v.pdf

    When creating your linker command file, you need to know the layout of memory on your target. The startup GEL file is a good place to look. Check out the EVMDM642.gel file that comes from SD. Look at the 'setup_memory_map()' routine where it sets up the debugger memory map.

    Hope this helps.

    Thanks

    ki

    Regarding c), it looks like external memory is initialized when you connect to the target via the 'init_emif()' routine in the GEL file.

  • Dear  Mr.  Ki-Soo Lee,

      thank you so much for your reply and sorry if I write back so late. I tried several options and read the documentation you sent to me.

    It was really helpful and helped me to clarify a lot of points.

    I successfully run my project.

    I created a new SYS/BIOS project and add a cfg file. I also changed the GEL file selected by default

    Blackawk XDS560v2-USB System Trace Emulator / EVMDM642

    with the GEL file into the target content at spectrum digital website ( http://c6000.spectrumdigital.com/evmdm642/ ).

    Best regards,

    Alessandro