Saving data on RedPitaya and FILE type in C

Applications, development tools, FPGA, C, WEB
Post Reply
8lu3
Posts: 30
Joined: Thu Feb 25, 2016 7:05 pm

Saving data on RedPitaya and FILE type in C

Post by 8lu3 » Thu May 05, 2016 9:34 pm

Hi,
I want to save data on the RedPitaya within a C program. /var/ seems to be read-write but isn't there a better location to save files to?
I also get some strange compiler-errors when I try to open a file:

Code: Select all

#include <stdio.h>
..

FILE *f;
f = fopen(dir, "w");
Compiling failes with following error message:
error: a label can only be part of a statement and a declaration is not a statement
FILE *f;
^

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Saving data on RedPitaya and FILE type in C

Post by Nils Roos » Fri May 06, 2016 11:01 pm

Do you maybe have a colon instead of a semi-colon at the end of the previous line ?

8lu3
Posts: 30
Joined: Thu Feb 25, 2016 7:05 pm

Re: Saving data on RedPitaya and FILE type in C

Post by 8lu3 » Sat May 07, 2016 10:35 am

Ok thx. Indeed, the problem wasn't the statement itself, but that I tried to declare a variable within a switch-case block.

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: Google [Bot] and 109 guests