Here is the basic information regarding my project:
CCS 5.1.0.09000
BIOS 6.32.05.54 (RTSC)
CGT 7.3.2
Target Processor : C674x (in the DM8168)
I have a fully functional DSP application that I'm migrating from COFF to EABI. The EABI project builds fine, but I have encountered a runtime problem where I require some guidance.
In my application, the Host processor and DSP use a shared memory structure to communicate with one another. The memory map looks like this (courtesy of my RTSC configuration):
SHMEM bc000000 01000000 006fcfb0 00903050 RW
VECS bd000000 00000200 00000200 00000000 RW X
DDR2 bd000200 02fffe00 012ba597 01d45869 RW X
So, the shared memory starts @ BC000000 and the CODE/DATA start @ BD000000.
In my BIOS configuration file, I defined:
Program.sectMap["SharedMemory"] = new Program.SectionSpec();
Program.sectMap["SharedMemory"].loadSegment = "SHMEM";
In my source, I defined:
#pragma DATA_SECTION("SharedMemory");
volatile audio_dsp_external_memory_t Host2DspSharedMemory;
In my design, the Host processor populates the shared memory structure with data that describes the DSP's role. The Host loads the DSP binary and manages DSP boot. The DSP application reads the shared memory structure at runtime to learn its role and then passes data back-and-forth to the Host via the shared memory structure.
This worked great for COFF, but is broken in my EABI version. It looks to me like the EABI binary load zeroes out the shared memory, which is not at all what I want. I confirmed this by using JTAG to first inspect the shared memory structure, then loaded the program, inspected shared memory again, and found its contents were initialized to zeroes.
From the COFF->EABI migration spec, I see:
"In ANSI C, global and static variables that are not explicitly initialized, must be set to 0 before program
execution. The C/C++ EABI compiler supports preinitialization of uninitialized variables by default. This
can be turned off by specifying the linker option --zero_init=off. COFF ABI does not support zero
initialization."
So, I rebuilt my application with '--zero_init=off'. Now, I see that the shared memory structure is no longer zeroed, but I have encountered other runtime problems that I don't yet understand.
Here's my question. Is my scheme for defining the shared memory structure as a DATA_SECTION the right way to create a shared memory structure? Is there a better way to map in this shared memory to the DSP application, where the EABI format will not result in a preinitialization of this memory?
Regards,
Matt