Hi,
Setup:
OMAPL138 (SYSBIOS 6.34.02.18 is running on both ARM and DSP). This is on DSP.
I have created a user defined C IO driver as shown below.
status = add_device("device",
_MSA,
device_open,
device_close,
device_read,
device_write,
device_lseek,
device_unlink,
device_rename);
This is working as expected i.e. if I do fopen("device:foo.txt") the function device_open gets called.
Now if JTAG is connected and I give fopen("foo.txt"), it checks the debug folder and returns NULL if file is not there.
But if JTAG is not connected and I try to run the code using an AIS file, fopen("foo.txt") returns a valid pointer and further fgets gives me whatever data is in CIO buffer i.e. previous "device:" data. If CIO buffer is empty, fgets retuns a valid pointer but the string length is zero.
Is this expected behaviour? Should not fopen("foo.txt") return NULL?
thanks, Durga