Shreehari
Member level 4
Hello
I had written a code to read the digital output of my embedded system.and compiled i through the GDB.and executed in target system.But it gives Segmentation fault error.My program is simple and is written below...
the value is a file located in do5 file.
-----------------------------------------------------------------------------------------
#include<stdio.h>
main()
{
FILE *file =fopen("/sys/class/sbc2800/d05/value","wt");
fprintf(file,"1");
fclose(file);
}
----------------------------------------------------------------------------------------
Pls rply ..I am using ARM 9 processor.and logged as root. and also please tell me how to generate the executable in tiny model(like compact,small,medium,tiny).
Regards
I had written a code to read the digital output of my embedded system.and compiled i through the GDB.and executed in target system.But it gives Segmentation fault error.My program is simple and is written below...
the value is a file located in do5 file.
-----------------------------------------------------------------------------------------
#include<stdio.h>
main()
{
FILE *file =fopen("/sys/class/sbc2800/d05/value","wt");
fprintf(file,"1");
fclose(file);
}
----------------------------------------------------------------------------------------
Pls rply ..I am using ARM 9 processor.and logged as root. and also please tell me how to generate the executable in tiny model(like compact,small,medium,tiny).
Regards