I’m trying to build a project using STL vectors, and am having some issues. I think I’ve seen these before long ago in some other platform. However, for particle, I can’t figure out how to fix it. Probably a define somewhere. Any ideas would be much appreciated. I’m building using Eclipse, a makefile project, and the gcc version listed below. The firmware is the latest from git, latest branch. Did I miss a step setting everything up? I saw some other posts about gcc 4.9.3 being a problem, but none were related to my problem that I could tell.
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc-arm-none-eabi-49/20150609/bin/…/lib/gcc/arm-none-eabi/4.9.3/lto-wrapper
Target: arm-none-eabi
Configured with: /Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2015q2-20150609/src/gcc/configure --target=arm-none-eabi --prefix=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2015q2-20150609/install-native --libexecdir=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2015q2-20150609/install-native/lib --infodir=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2015q2-20150609/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2015q2-20150609/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2015q2-20150609/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2015q2-20150609/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2015q2-20150609/install-native/arm-none-eabi --build=x86_64-apple-darwin10 --host=x86_64-apple-darwin10 --with-gmp=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2015q2-20150609/build-native/host-libs/usr --with-mpfr=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2015q2-20150609/build-native/host-libs/usr --with-mpc=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2015q2-20150609/build-native/host-libs/usr --with-isl=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2015q2-20150609/build-native/host-libs/usr --with-cloog=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2015q2-20150609/build-native/host-libs/usr --with-libelf=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2015q2-20150609/build-native/host-libs/usr --with-host-libstdcxx=’-static-libgcc -Wl,-lstdc++ -lm’ --with-pkgversion=‘GNU Tools for ARM Embedded Processors’ --with-multilib-list=armv6-m,armv7-m,armv7e-m,cortex-m7,armv7-r
Thread model: single
gcc version 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 224288] (GNU Tools for ARM Embedded Processors)
mkdir -p …/…/…/build/target/user-part/platform-6-m/
arm-none-eabi-g++ -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=6 -DPLATFORM_NAME=photon -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD006 -DUSBD_PID_CDC=0xC006 -DINCLUDE_PLATFORM=1 -fno-builtin -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=0.4.6 -DRELEASE_BUILD -Werror -I./inc -I…/…/…/user/inc -I…/…/…/dynalib/inc -I…/…/…/services/inc -I…/…/…/hal/inc -I…/…/…/hal/shared -I…/…/…/hal/src/photon -I…/…/…/hal/src/stm32f2xx -I…/…/…/hal/src/stm32 -I…/…/…/hal/src/photon/api -I…/…/…/system/inc -I…/…/…/rt-dynalib/inc -I…/…/…/wiring/inc -I…/…/…/modules/photon/system-part1/inc -I…/…/…/modules/shared/stm32f2xx/inc -I…/…/…/platform/shared/inc -I…/…/…/platform/MCU/STM32F2xx/CMSIS/Include -I…/…/…/platform/MCU/STM32F2xx/CMSIS/Device/ST/Include -I…/…/…/platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I…/…/…/platform/MCU/shared/STM32/inc -I…/…/…/platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I…/…/…/platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc -I…/…/…/platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I…/…/…/platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -I. -MD -MP -MF …/…/…/build/target/user-part/platform-6-m/windowlights.elf.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x80A0000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=3 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,7 -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb …/…/…/build/target/user-part/platform-6-m/src/module_info.o …/…/…/build/target/user-part/platform-6-m/src/user_export.o …/…/…/build/target/user-part/platform-6-m/src/user_module.o …/…/…/build/target/user-part/platform-6-m/src/newlib_stubs.o --output …/…/…/build/target/user-part/platform-6-m/windowlights.elf -Wl,–whole-archive …/…/…/hal/src/photon/lib/STM32F2xx_Peripheral_Libraries.a -Wl,–no-whole-archive -L…/…/…/build/target/user/platform-6-m/applications/windowlights/ -L…/…/…/build/target/services-dynalib/arm/ -L…/…/…/build/target/hal-dynalib/platform-6-m/ -L…/…/…/build/target/system-dynalib/platform-6-m/ -L…/…/…/build/target/rt-dynalib/platform-6-m/ -L…/…/…/build/target/wiring/platform-6-m/ -L…/…/…/build/target/communication-dynalib/platform-6-m/ -L…/…/…/build/target/platform/platform-6-m/ -L…/…/…/build/target/wiring_globals/platform-6-m/ -L…/…/…/hal/src/photon/lib/ -Wl,–whole-archive -luser -lhal-dynalib -lservices-dynalib -lsystem-dynalib -lrt-dynalib -lwiring -lcommunication-dynalib -lplatform -lwiring_globals -Wl,–no-whole-archive -L…/…/…/build/arm/linker -lnosys -L…/…/…/modules/photon/system-part2 -L…/…/…/modules/photon/system-part1 -L. -T./linker.ld -Wl,–defsym,USER_FIRMWARE_IMAGE_SIZE=0x20000 -Wl,–defsym,USER_FIRMWARE_IMAGE_LOCATION=0x80A0000 -Wl,-Map,…/…/…/build/target/user-part/platform-6-m/windowlights.map -lstdc++_nano -lm -Wl,–start-group -lgcc -lg_nano -lc_nano -Wl,–end-group -Wl,–start-group -lgcc -lc_nano -Wl,–end-group -nostartfiles -Xlinker --gc-sections
…/…/…/build/target/user/platform-6-m/applications/windowlights//libuser.a(pixelvector.o): In function _kill': /Users/pete/Projects/particle.io/windowlights-firmware/user/applications/windowlights/pixelvector.cpp:28: multiple definition of
_getpid’
…/…/…/build/target/user-part/platform-6-m/src/newlib_stubs.o:/Users/pete/Projects/particle.io/windowlights-firmware/modules/photon/user-part/src/newlib_stubs.cpp:70: first defined here
…/…/…/build/target/user/platform-6-m/applications/windowlights//libuser.a(pixelvector.o): In function __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(int) const': /Users/pete/Projects/particle.io/windowlights-firmware/user/applications/windowlights/pixelvector.cpp:29: multiple definition of
_kill’
…/…/…/build/target/user-part/platform-6-m/src/newlib_stubs.o:/Users/pete/Projects/particle.io/windowlights-firmware/modules/photon/user-part/src/newlib_stubs.cpp:64: first defined here
collect2: error: ld returned 1 exit status