Coder Social home page Coder Social logo

libfic2's People

Contributors

nyacom avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

libfic2's Issues

build error

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?

Possible documentation improvements

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.