Hello all,
I use photon as a Gateway for my Home Automation system. I maintain my code in a local git repository. Last time I worked on this code was about 2 months back. Code was compiled flashed on Photon and everything going good. Today I started to work with the code again but unfortunately my previously compiled code (without any changes) is no longer compiling. It shows a error which I could not understand. I usually use Particle Dev IDE. The error it shows is
I dont understand what the error is and what is it to do with the file spark_wiring_arduino_constants.h. When I click on it, file is empty. I think the file is in Particel cloud.
To get more details on the error, I tried to build the folder using particel CLI. Even here I don’t understandt what the error is.
Could someone please help understand what the error is ? Here is the output of CLI command
Sorry, its quite long.
Could it be possible that any changes done by Particle team on cloud build tool change effecting my code ?
I also tried clean my working copy / resetting the working copy to one previous committ (which is 100% sure compiled) but still I get the same error
F:\Dropbox\HomeAutomation\workspace\Temp\TestPhotonBuild>particle compile photon Photon_Gateway
Compiling code for photon
Including:
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/BlynkHomeIfc.h
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/CloudConn.h
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/Common.h
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/DataFusion.h
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/HomeInterface.h
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/NetworkHandler.h
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/Node.h
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/NodeConfig.h
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/NodeHandler.h
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/nRF24L01.h
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/ParticleHomeIfc.h
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/Relay.h
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/RF24.h
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/RF24Network_config.h
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/RF24Network.h
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/RGBStrip.h
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/Sensor.h
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/Photon_Gateway.ino
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/BlynkHomeIfc.cpp
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/CloudConn.cpp
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/DataFusion.cpp
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/HomeInterface.cpp
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/NetworkHandler.cpp
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/Node.cpp
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/NodeConfig.cpp
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/NodeHandler.cpp
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/ParticleHomeIfc.cpp
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/Relay.cpp
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/RF24.cpp
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/RF24Network.cpp
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/RGBStrip.cpp
F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/Sensor.cpp
attempting to compile firmware
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/BlynkHomeIfc.h
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/CloudConn.h
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/Common.h
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/DataFusion.h
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/HomeInterface.h
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/NetworkHandler.h
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/Node.h
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/NodeConfig.h
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/NodeHandler.h
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/nRF24L01.h
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/ParticleHomeIfc.h
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/Relay.h
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/RF24.h
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/RF24Network_config.h
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/RF24Network.h
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/RGBStrip.h
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/Sensor.h
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/Photon_Gateway.ino
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/BlynkHomeIfc.cpp
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/CloudConn.cpp
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/DataFusion.cpp
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/HomeInterface.cpp
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/NetworkHandler.cpp
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/Node.cpp
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/NodeConfig.cpp
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/NodeHandler.cpp
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/ParticleHomeIfc.cpp
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/Relay.cpp
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/RF24.cpp
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/RF24Network.cpp
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/RGBStrip.cpp
pushing file: F:/Dropbox/HomeAutomation/workspace/Temp/TestPhotonBuild/Photon_Gateway/Sensor.cpp
Compile failed. Exiting.
Processing /workspace/Photon_Gateway.ino
make -C ../modules/photon/user-part all
make[1]: Entering directory '/firmware/modules/photon/user-part'
make -C ../../../user
make[2]: Entering directory '/firmware/user'
Building cpp file: /workspace/HomeInterface.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-6-m/workspace/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=6 -DPLATFORM_NAME=photon -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD006 -DUSBD_PID_CDC=0xC006 -DSPARK_PLATFORM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=6 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DPARTICLE_NO_ARDUINO_COMPATIBILITY=0 -DSYSTEM_VERSION_STRING=0.6.1 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/photon -I../hal/src/stm32f2xx -I../hal/src/stm32 -I../hal/src/photon/api -I../platform/shared/inc -I../platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I../platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F2xx/CMSIS/Include -I../platform/MCU/STM32F2xx/CMSIS/Device/ST/Include -I../dynalib/inc -I/workspace/ -I./libraries -I/workspace/ -I/workspace/ -I/workspace/ -I/workspace/ -I. -MD -MP -MF ../build/target/user/platform-6-m/workspace/HomeInterface.o.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 -DSPARK_PLATFORM_NET=BCM9WCDUSI09 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSE_THREADING=0 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_THREADING=0 -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x80A0000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=4 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,105 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\"" -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-6-m/workspace/HomeInterface.o /workspace/HomeInterface.cpp
In file included from /workspace/NetworkHandler.h:7:0,
from /workspace/Node.h:6,
from /workspace/NodeHandler.h:2,
from /workspace/HomeInterface.h:3,
from /workspace/HomeInterface.cpp:2:
/workspace/RF24.h:31:0: warning: "_BV" redefined [enabled by default]
#define _BV(x) (1<<(x))
^
In file included from ./inc/application.h:92:0,
from /workspace/Relay.h:6,
from /workspace/Node.h:2,
from /workspace/NodeHandler.h:2,
from /workspace/HomeInterface.h:3,
from /workspace/HomeInterface.cpp:2:
../wiring/inc/spark_wiring_arduino.h:131:0: note: this is the location of the previous definition
#define _BV(x) (((uint32_t)1) << (x))
^
Building cpp file: /workspace/RF24.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-6-m/workspace/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=6 -DPLATFORM_NAME=photon -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD006 -DUSBD_PID_CDC=0xC006 -DSPARK_PLATFORM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=6 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DPARTICLE_NO_ARDUINO_COMPATIBILITY=0 -DSYSTEM_VERSION_STRING=0.6.1 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/photon -I../hal/src/stm32f2xx -I../hal/src/stm32 -I../hal/src/photon/api -I../platform/shared/inc -I../platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I../platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F2xx/CMSIS/Include -I../platform/MCU/STM32F2xx/CMSIS/Device/ST/Include -I../dynalib/inc -I/workspace/ -I./libraries -I/workspace/ -I/workspace/ -I/workspace/ -I/workspace/ -I. -MD -MP -MF ../build/target/user/platform-6-m/workspace/RF24.o.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 -DSPARK_PLATFORM_NET=BCM9WCDUSI09 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSE_THREADING=0 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_THREADING=0 -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x80A0000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=4 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,105 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\"" -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-6-m/workspace/RF24.o /workspace/RF24.cpp
In file included from /workspace/RF24.cpp:25:0:
/workspace/RF24.h:31:0: warning: "_BV" redefined [enabled by default]
#define _BV(x) (1<<(x))
^
In file included from ./inc/application.h:92:0,
from /workspace/RF24.cpp:22:
../wiring/inc/spark_wiring_arduino.h:131:0: note: this is the location of the previous definition
#define _BV(x) (((uint32_t)1) << (x))
^
Building cpp file: /workspace/NodeConfig.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-6-m/workspace/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=6 -DPLATFORM_NAME=photon -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD006 -DUSBD_PID_CDC=0xC006 -DSPARK_PLATFORM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=6 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DPARTICLE_NO_ARDUINO_COMPATIBILITY=0 -DSYSTEM_VERSION_STRING=0.6.1 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/photon -I../hal/src/stm32f2xx -I../hal/src/stm32 -I../hal/src/photon/api -I../platform/shared/inc -I../platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I../platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F2xx/CMSIS/Include -I../platform/MCU/STM32F2xx/CMSIS/Device/ST/Include -I../dynalib/inc -I/workspace/ -I./libraries -I/workspace/ -I/workspace/ -I/workspace/ -I/workspace/ -I. -MD -MP -MF ../build/target/user/platform-6-m/workspace/NodeConfig.o.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 -DSPARK_PLATFORM_NET=BCM9WCDUSI09 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSE_THREADING=0 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_THREADING=0 -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x80A0000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=4 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,105 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\"" -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-6-m/workspace/NodeConfig.o /workspace/NodeConfig.cpp
In file included from ../wiring/inc/spark_wiring_async.h:22:0,
from ./inc/application.h:68,
from /workspace/NodeConfig.h:4,
from /workspace/NodeConfig.cpp:2:
../wiring/inc/spark_wiring_error.h: In member function 'const char* spark::Error::message() const':
../wiring/inc/spark_wiring_error.h:61:34: error: reference to 'system_error' is ambiguous
return system_error_message((system_error)type_, nullptr);
^
In file included from ../communication/src/protocol_defs.h:6:0,
from ../communication/src/spark_protocol_functions.h:32,
from ../wiring/inc/spark_wiring_version.h:27,
from ../wiring/inc/spark_wiring_system.h:28,
from ../wiring/inc/spark_wiring.h:46,
from ./inc/application.h:36,
from /workspace/NodeConfig.h:4,
from /workspace/NodeConfig.cpp:2:
../services/inc/system_error.h:66:3: note: candidates are: typedef enum system_error system_error
} system_error;
^
In file included from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/4.8.4/mutex:43:0,
from ../wiring/inc/spark_wiring_thread.h:31,
from ../wiring/inc/spark_wiring_watchdog.h:22,
from ../wiring/inc/spark_wiring_cloud.h:31,
from ../wiring/inc/spark_wiring.h:47,
from ./inc/application.h:36,
from /workspace/NodeConfig.h:4,
from /workspace/NodeConfig.cpp:2:
/usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/4.8.4/system_error:309:9: note: class std::system_error
class system_error : public std::runtime_error
^
../build/module.mk:267: recipe for target '../build/target/user/platform-6-m/workspace/NodeConfig.o' failed
make[2]: *** [../build/target/user/platform-6-m/workspace/NodeConfig.o] Error 1
make[2]: Leaving directory '/firmware/user'
../../../build/recurse.mk:11: recipe for target 'user' failed
make[1]: Leaving directory '/firmware/modules/photon/user-part'
make[1]: *** [user] Error 2
../build/recurse.mk:11: recipe for target 'modules/photon/user-part' failed
make: *** [modules/photon/user-part] Error 2
F:\Dropbox\HomeAutomation\workspace\Temp\TestPhotonBuild>