Nabil Posted May 30, 2019 Share Posted May 30, 2019 hello guys, i want to blink an led using the debian terminal . after compiping below c code using the " gcc blink_led.c -o blink_led " i got a segmentation fault message. any idea why ? blink_led.c Link to comment Share on other sites More sharing options...
jpeyron Posted June 10, 2019 Share Posted June 10, 2019 Hi @Nabil, Welcome to the digilent forums! We have reached out to more experience embedded linux engineers to see if they have some input for this thread. best regards, Jon Link to comment Share on other sites More sharing options...
vicentiu Posted June 12, 2019 Share Posted June 12, 2019 Taking a quick look at your program, you're not checking if fopen succeeded. If fopen fails, you continue to use fp even though it's not a valid file handle. You can also use gdb to identify which line is causing the segmentation fault. Link to comment Share on other sites More sharing options...
Question
Nabil
hello guys,
i want to blink an led using the debian terminal . after compiping below c code using the " gcc blink_led.c -o blink_led " i got a segmentation fault message. any idea why ?
blink_led.c
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.