This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

fopen leads to os_error

Hi everybody,

I work on an Project which based on a LPC1758 with RTX (use µVision v4.60). During os_sys_init i initialize the filesystem with finit (work with SD-Card on SPI). After that I open two files and load some Settings (Close this files when finished).
Code Looks similar to this:

__task void Init(void){
 finit(NULL);
 setupdatei = fopen(file,"r");
 //Read ...
 fclose(setupdatei);
 ...
}

Until now everything works well. To ensure the right function I must use a higher stacksize for the init Routine:

static U64 stk1[2000/8];

int main (void) {
 os_sys_init_user (Init, 200, &stk1, sizeof(stk1));
 while(1);
}

During my following program I create some additional tasks and call "fopen" again. There are my Problem - No matter what I try the RTX run into an os_error and signals stack-overflow for the Task which call fopen. But the debuger indicates a stack load of less then 25%!!! I try out different Settings for stack size (up to 4096 Bytes!) and a lot more without any success!

Any ideas?

0