[Solved] nrfProg compile problem

Post here to get support
Post Reply
duxiaoshi
Beginner
Posts: 2
Joined: Tue Dec 24, 2013 3:29 am

[Solved] nrfProg compile problem

Post by duxiaoshi »

Hi, all

I am using Ubuntu 11.10 64bit

i have install libftdi and libftdi-dev...

when i compile the nrfProg, output following errors:
dell@dell:~/Bitcraze/crazyradio-firmware/nrfProg$ make
cc -lftdi nrfProg.o nrfSpi.o commands.o -o nrfProg
nrfSpi.o: In function `ftdiSendBuffer':
nrfSpi.c:(.text+0x34): undefined reference to `ftdi_write_data'
nrfSpi.c:(.text+0x4d): undefined reference to `ftdi_get_error_string'
nrfSpi.o: In function `ftdiRecvBuffer':
nrfSpi.c:(.text+0xc7): undefined reference to `ftdi_read_data'
nrfSpi.c:(.text+0xe0): undefined reference to `ftdi_get_error_string'
nrfSpi.o: In function `spiInit':
nrfSpi.c:(.text+0x134): undefined reference to `ftdi_init'
nrfSpi.c:(.text+0x148): undefined reference to `ftdi_usb_open'
nrfSpi.c:(.text+0x15b): undefined reference to `ftdi_get_error_string'
nrfSpi.c:(.text+0x193): undefined reference to `ftdi_set_interface'
nrfSpi.c:(.text+0x1a1): undefined reference to `ftdi_get_error_string'
nrfSpi.c:(.text+0x1de): undefined reference to `ftdi_set_bitmode'
nrfSpi.c:(.text+0x1ec): undefined reference to `ftdi_get_error_string'
nrfSpi.o: In function `spiDeinit':
nrfSpi.c:(.text+0x45a): undefined reference to `ftdi_usb_close'
nrfSpi.c:(.text+0x464): undefined reference to `ftdi_deinit'
collect2: ld returned 1 exit status
make: *** [nrfProg] Error 1
i think those functions are already referenced by including "ftdi.h", so is there anything i should add to make this package?
or some other things i need?
atomicdog
Expert
Posts: 105
Joined: Tue Mar 12, 2013 2:50 am
Location: San Diego

Re: nrfProg compile problem

Post by atomicdog »

You can try double checking the paths to the FTDI header files in the nrfProg source code. Maybe they got installed in a different place.
6-DOF CF | wireless xbox 360 controller
duxiaoshi
Beginner
Posts: 2
Joined: Tue Dec 24, 2013 3:29 am

Re: nrfProg compile problem

Post by duxiaoshi »

atomicdog wrote:You can try double checking the paths to the FTDI header files in the nrfProg source code. Maybe they got installed in a different place.

yeah, i checked ftdi.h file, the ftdi.h file exists in /usr/local/include/libftdi1

so i just use
gcc -lftdi nrfProg.o nrfSpi.o commands.o -o nrfProg


it works
Post Reply