core-common-lib
core-common-lib copied to clipboard
CC3000_Host_Driver could not be compiled successfully
Environment: CentOS 7 ARM tool chain: gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2
How do I get core-common-lib:
git clone https://github.com/spark/core-common-lib.git
What happened:
cd core-common-lib/build
make
Invoking: ARM GCC C Compiler
mkdir -p obj/CC3000_Host_Driver/
arm-none-eabi-gcc -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -I../STM32F10x_StdPeriph_Driver/inc -I../STM32_USB-FS-Device_Driver/inc -I../SPARK_Services/src/inc -I../CC3000_Host_Driver -I../SPARK_Firmware_Driver/inc -I../SPARK_Services/inc -I../CMSIS/Include -I../CMSIS/Device/ST/STM32F10x/Include -I. -ffunction-sections -Wall -Wno-switch -fmessage-length=0 -MD -MP -MF obj/CC3000_Host_Driver/nvmem.o.d -DUSE_STDPERIPH_DRIVER -DSTM32F10X_MD -DUSE_SWD_JTAG -DRELEASE_BUILD -c -o obj/CC3000_Host_Driver/nvmem.o ../CC3000_Host_Driver/nvmem.c
In file included from ../CC3000_Host_Driver/nvmem.h:38:0,
from ../CC3000_Host_Driver/nvmem.c:45:
../CC3000_Host_Driver/cc3000_common.h:168:8: error: redefinition of 'struct timeval'
struct timeval
^~~~~~~
In file included from /root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/sys/select.h:26:0,
from /root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/sys/types.h:68,
from /root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/stdio.h:61,
from ../CC3000_Host_Driver/nvmem.c:43:
/root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/sys/_timeval.h:52:8: note: originally defined here
struct timeval {
^~~~~~~
In file included from ../CC3000_Host_Driver/nvmem.c:47:0:
../CC3000_Host_Driver/socket.h:146:0: warning: "fd_set" redefined
#define fd_set _types_fd_set_cc3000
In file included from /root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/sys/types.h:68:0,
from /root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/stdio.h:61,
from ../CC3000_Host_Driver/nvmem.c:43:
/root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/sys/select.h:57:0: note: this is the location of the previous definition
#define fd_set _types_fd_set
In file included from ../CC3000_Host_Driver/nvmem.c:47:0:
../CC3000_Host_Driver/socket.h:162:0: warning: "FD_SET" redefined
#define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp)
In file included from /root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/sys/types.h:68:0,
from /root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/stdio.h:61,
from ../CC3000_Host_Driver/nvmem.c:43:
/root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/sys/select.h:59:0: note: this is the location of the previous definition
# define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS)))
In file included from ../CC3000_Host_Driver/nvmem.c:47:0:
../CC3000_Host_Driver/socket.h:163:0: warning: "FD_CLR" redefined
#define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp)
In file included from /root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/sys/types.h:68:0,
from /root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/stdio.h:61,
from ../CC3000_Host_Driver/nvmem.c:43:
/root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/sys/select.h:60:0: note: this is the location of the previous definition
# define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS)))
In file included from ../CC3000_Host_Driver/nvmem.c:47:0:
../CC3000_Host_Driver/socket.h:164:0: warning: "FD_ISSET" redefined
#define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp)
In file included from /root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/sys/types.h:68:0,
from /root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/stdio.h:61,
from ../CC3000_Host_Driver/nvmem.c:43:
/root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/sys/select.h:61:0: note: this is the location of the previous definition
# define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS)))
In file included from ../CC3000_Host_Driver/nvmem.c:47:0:
../CC3000_Host_Driver/socket.h:165:0: warning: "FD_ZERO" redefined
#define FD_ZERO(fdsetp) __FD_ZERO (fdsetp)
In file included from /root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/sys/types.h:68:0,
from /root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/stdio.h:61,
from ../CC3000_Host_Driver/nvmem.c:43:
/root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/sys/select.h:62:0: note: this is the location of the previous definition
# define FD_ZERO(p) (__extension__ (void)({ \
In file included from ../CC3000_Host_Driver/nvmem.c:47:0:
../CC3000_Host_Driver/socket.h:418:14: error: conflicting types for 'select'
extern INT16 select(INT32 nfds, fd_set *readsds, fd_set *writesds,
^~~~~~
In file included from /root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/sys/types.h:68:0,
from /root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/stdio.h:61,
from ../CC3000_Host_Driver/nvmem.c:43:
/root/gcc-arm-none-eabi-6-2017-q2-update/arm-none-eabi/include/sys/select.h:73:5: note: previous declaration of 'select' was here
int select __P ((int __n, fd_set *__readfds, fd_set *__writefds,
^~~~~~
make: *** [obj/CC3000_Host_Driver/nvmem.o] Error 1
This library is deprecated - all the functionality here has been merged into the spark/firmware
repo.