Forums

Saving data to a file

Started by Dee_ekaette May 21, 2008
I am fairly new to using CCStudio V3.3. I am trying to open up a file
and write data to it, however, i get these errors:

Warning: creating output section .cio without SECTIONS specification
Warning: creating .sysmem section with default size of 400 (hex)
words.

Use -heap option to change the default size.

error: can't allocate .text,size 00001cac (page 0) in PRAMH0 (avail:
00000ffe)

- I get a compilation error, and the output file is not created.

This is very puzzling to me as the only code I have added to my
existing code ( which is compiling without errors)is:

1. Include
2. Declare a file pointer: FILE *fp;
3. Try to open a file for writing: fp = fopen("results.txt", "w+");
4. Check that the operation was successfull:
if(fp == 0)
{
printf("Cannot open file. \n");
return;
}

Please help.