I'm using CCS 3.3.82.13 along with the cgtools 6.1.13. the target is the CPU cycle-accurate 64xx simulator.
I'm building an application to read some test vectors into the DSP from the PC filesystem using the C file I/O system (fopen, fread, fwrite, fclose, feof).The application is a simple C application (no DSP/BIOS) running in the 512kB core SRAM.
The problem is in the fread()/feof() functions. I'm first reading a few bytes of header information with fread(), then I begin reading 16-bit samples in chunks of BUFFER_LENGTH. The header fread()s work perfectly. However, after 50 or so bytes of samples are read (the exact number changes somewhat), fread() begins returning 0 bytes read and feof() returns true, even though the actual file size is about 32k bytes.
Here are the things I've tried:
1. Varying the BUFFER_LENGTH from 1 to 16 to 128 to 256 to 1024 - no change.
2. Increasing the heap (.sysmem) and stack (.stack) to 128k bytes each. no change.
3. Creating a linker command file and explicitly placing all the sections.
4. Aligning the .cio section to a 256-byte boundary.
5. Upgrading the toolchain (the previous version was 6.0.x).
Please help!
--Randy Yates