hungalab / libfic2 Goto Github PK
View Code? Open in Web Editor NEWFiC Control library for Raspberry Pi
FiC Control library for Raspberry Pi
Hi Nyacom,
I tried building the library but got the following warnings & errors
(ficwww) [hikari@atlantis libfic2]$ make
make ficlib2
make[1]: Entering directory '/home/hlab/hikari/Repos/libfic2'
gcc -O2 -g ficlib2.c -o ficlib2
ficlib2.c: In function ‘fic_prog_sm16’:
ficlib2.c:737:31: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
printf("Transfer %d / %d [%.02f %%]\n", i, size, (i/(float)size)*100);
~^
%ld
ficlib2.c:737:36: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
printf("Transfer %d / %d [%.02f %%]\n", i, size, (i/(float)size)*100);
~^
%ld
ficlib2.c: In function ‘fic_prog_sm8’:
ficlib2.c:816:31: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
printf("Transfer %d / %d [%.02f %%]\n", i, size, (i/(float)size)*100);
~^
%ld
ficlib2.c:816:36: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
printf("Transfer %d / %d [%.02f %%]\n", i, size, (i/(float)size)*100);
~^
%ld
ficlib2.c: In function ‘fic_gpio_open’:
ficlib2.c:1010:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
fprintf(stderr, "ERROR: mmap error %d\n", (int)gpio_map);//errno also set!
^
ficlib2.c: In function ‘test_fpga_prog’:
ficlib2.c:1048:20: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
printf("TEST: %d bytes are transffered\n", tx);
~^
%ld
ficlib2.c:1043:5: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
read(fd, buf, size);
^~~~~~~~~~~~~~~~~~~
/tmp/ccN2iqs5.o: In function `fic_prog_init_sm16':
/home/hlab/hikari/Repos/libfic2/ficlib2.c:643: undefined reference to `fic_clr_gpio'
/tmp/ccN2iqs5.o: In function `fic_prog_init_sm8':
/home/hlab/hikari/Repos/libfic2/ficlib2.c:671: undefined reference to `fic_clr_gpio'
collect2: error: ld returned 1 exit status
Makefile:10: recipe for target 'ficlib2' failed
make[1]: *** [ficlib2] Error 1
make[1]: Leaving directory '/home/hlab/hikari/Repos/libfic2'
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 2
Could you help here?
I think it should be pointed out that the library only works with python3, in my case I had to use sudo python3 pyficlibtest.py
Also the ring_8bit.bin file does not exist in the repository. Maybe this could be added?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.