Skip to content
This repository was archived by the owner on Jul 21, 2021. It is now read-only.

Error: Expected ')' before numeric constant (1.2.0.28) #169

Closed
rei-vilo opened this issue Oct 26, 2017 · 6 comments
Closed

Error: Expected ')' before numeric constant (1.2.0.28) #169

rei-vilo opened this issue Oct 26, 2017 · 6 comments
Assignees
Labels
Milestone

Comments

@rei-vilo
Copy link

rei-vilo commented Oct 26, 2017

When using a standard building tool, the code at lines 98 and 100 of header file ~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/include/ipv4/lwip/ip_addr.h on DevKit release 1.2.0.28:

/** 255.255.255.255 */
#define IPADDR_NONE         ((u32_t)0xffffffffUL)
/** 127.0.0.1 */
#define IPADDR_LOOPBACK     ((u32_t)0x7f000001UL)

throws the errors

In file included from ~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/include/lwip/sockets.h:43:0,

                 from ~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/include/mico_socket.h:21,

                 from ~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/include/mico.h:38,

                 from ~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/EMW10xxInterface.h:22,

                 from main.cpp:12:

~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/include/ipv4/lwip/ip_addr.h:98:37: Expected ')' before numeric constant

 #define IPADDR_NONE         ((u32_t)0xffffffffUL)
                                     ^

~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/include/ipv4/lwip/inet.h:49:29: In expansion of macro 'IPADDR_NONE'

 #define INADDR_NONE         IPADDR_NONE
                             ^

~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/cores/arduino/IPAddress.h:78:17: In expansion of macro 'INADDR_NONE'

 const IPAddress INADDR_NONE(0,0,0,0);
                 ^

Commenting the two lines 98 and 100 on header file ~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/include/ipv4/lwip/ip_addr.h solves the issue.

@lirenhe
Copy link
Member

lirenhe commented Oct 29, 2017

We are investigating this issue. Could you provide some sample code or repo steps for the compiling issue?

@rei-vilo
Copy link
Author

rei-vilo commented Oct 29, 2017

I'm using the example SensorStatus.

  • SensorStatus.ino has been renamed to SensorStatus.cpp.
  • #include "SensorStatus.cpp" has been added to main.cpp.
  • The error is raised when compiling main.cpp.
  • Commenting the two lines 98 and 100 of ip_addr.h solves the issue.

~/Library/Arduino15/packages/AZ3166/tools/arm-none-eabi-gcc/5_4-2016q3/bin/arm-none-eabi-g++ -c -O0 -g3 -w -mcpu=cortex-m4 -DARDUINO=10805 -DEMBEDXCODE=822 -DARDUINO_MXCHIP_AZ3166 -DARDUINO_ARCH_STM32F4 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -D__MBED__=1 -DDEVICE_I2CSLAVE=1 -DTARGET_LIKE_MBED -DLWIP_TIMEVAL_PRIVATE=0 -DDEVICE_PORTOUT=1 -DUSBHOST_OTHER -DDEVICE_PORTINOUT=1 -DTARGET_RTOS_M4_M7 -DDEVICE_LOWPOWERTIMER=1 -DDEVICE_RTC=1 -DTOOLCHAIN_object -DDEVICE_SERIAL_ASYNCH=1 -DTARGET_STM32F4 -D__CMSIS_RTOS -DTARGET_EMW1062 -DTOOLCHAIN_GCC -DDEVICE_CAN=1 -DTARGET_CORTEX_M -DTARGET_DEBUG -DDEVICE_I2C_ASYNCH=1 -DTARGET_LIKE_CORTEX_M4 -DTARGET_M4 -DTARGET_UVISOR_UNSUPPORTED -DDEVICE_QSPI=1 -DDEVICE_SPI_ASYNCH=1 -DMBED_BUILD_TIMESTAMP=1490085708.63 -DDEVICE_PWMOUT=1 -DDEVICE_INTERRUPTIN=1 -DDEVICE_I2C=1 -DTRANSACTION_QUEUE_SIZE_SPI=2 -D__CORTEX_M4 -DDEVICE_STDIO_MESSAGES=1 -DHSE_VALUE=26000000L -DTARGET_FF_MORPHO -D__FPU_PRESENT=1 -DTARGET_FF_ARDUINO -DDEVICE_PORTIN=1 -DTARGET_STM -DDEVICE_SERIAL_FC=1 -DDEVICE_SDIO=1 -DDEVICE_TRNG=1 -D__MBED_CMSIS_RTOS_CM -DDEVICE_SLEEP=1 -DTOOLCHAIN_GCC_ARM -DTARGET_MXCHIP -DDEVICE_SPI=1 -DUSB_STM_HAL -DMXCHIP_LIBRARY -DDEVICE_SPISLAVE=1 -DDEVICE_ANALOGIN=1 -DDEVICE_SERIAL=1 -DDEVICE_ERROR_RED=1 -DTARGET_AZ3166 -DARM_MATH_CM4 -DLPS22HB_I2C_PORT=MICO_I2C_1 -DDONT_USE_UPLOADTOBLOB -DUSE_MBED_TLS -include mbed_config.h -MMD -mthumb -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -std=gnu++11 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wvla -fmessage-length=0 -fno-threadsafe-statics -fno-rtti -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/hal -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/cmsis -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/EEPROMInterface -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/cmsis/TOOLCHAIN_GCC -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/drivers -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/events -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/events/equeue -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/filesystem -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/filesystem/bd -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/filesystem/fat -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/filesystem/fat/ChaN -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/frameworks -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/frameworks/greentea-client -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/frameworks/greentea-client/greentea-client -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/frameworks/greentea-client/source -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/frameworks/unity -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/frameworks/unity/source -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/frameworks/unity/unity -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/frameworks/utest -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/frameworks/utest/source -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/frameworks/utest/utest -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/mbedtls -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/mbedtls/importer -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/mbedtls/inc -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/mbedtls/inc/mbedtls -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/mbedtls/platform -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/mbedtls/platform/inc -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/mbedtls/platform/src -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/mbedtls/src -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/nanostack -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/netsocket -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/features/storage -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/hal -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/hal/storage_abstraction -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/platform -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/rtos -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/rtos/rtx -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/rtos/rtx/TARGET_CORTEX_M -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7 -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_GCC -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/targets -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/targets/TARGET_MXCHIP -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/targets/TARGET_MXCHIP/TARGET_AZ3166 -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/targets/TARGET_MXCHIP/TARGET_AZ3166/device -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/targets/TARGET_MXCHIP/TARGET_AZ3166/device/TOOLCHAIN_GCC_ARM -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/targets/TARGET_STM -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/targets/TARGET_STM/TARGET_STM32F4 -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/targets/TARGET_STM/TARGET_STM32F4/device -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/TARGET_STM -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/TARGET_AZ3166 -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/TARGET_STM/peripherals -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/TARGET_STM/wlan_bus_driver -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/libraries -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/libraries/drivers -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/libraries/drivers/gpio_btn -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/libraries/drivers/spi_flash -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/libraries/drivers/gpio_btn -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/libraries/drivers/display/VGM128064 -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/libraries/utilities -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/libwlan -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/libwlan/TARGET_EMW1038 -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/include -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/include/mico_drivers -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-sys -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-sys/arch -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1 -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/api -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/core -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/core/ipv4 -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/core/snmp -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/include -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/include/ipv4 -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/include/ipv4/lwip -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/include/ipv6 -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/include/ipv6/lwip -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/include/lwip -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/include/netif -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/netif -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/platform -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/platform/EWARM -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/platform/GCC -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/platform/RVMDK -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/platform/include -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/platform/mbed -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/platform/mbed/peripherals -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/rtos -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/system -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/system/command_console -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/system/emw10xx-driver/mico/system/easylink -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/cores/arduino/NTPClient -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/cores/arduino/cognitive/speech -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/cores/arduino/drivers -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/cores/arduino/cli -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/cores/arduino/drivers/I2S_Audio -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/cores/arduino/httpserver -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/cores/arduino/MQTT -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/cores/arduino/drivers/Sensors -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/cores/arduino/httpclient -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/cores/arduino/httpclient/http_parser -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/cores/arduino/system -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/cores/arduino/drivers/FileSystem -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/cores/arduino/az_iot/ -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/cores/arduino/az_iot/iothub_client/inc -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/cores/arduino/az_iot/umqtt/inc -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/cores/arduino/az_iot/umqtt/c-utility/inc -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/cores/arduino/Telemetry -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/cores/arduino/parson -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/cores/arduino -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/libraries -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/variants/MXChip_AZ3166 -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0 -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/libraries/Sensors/src/ -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/libraries/Sensors/src/utility/ -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/libraries/WiFi/src/ -I~/Library/Arduino15/packages/AZ3166/hardware/stm32f4/1.2.0/libraries/WiFi/src/utility/ -I~/Library/Developer/Xcode/DerivedData/t-820-AzureSensors-cnlxwlmrloogwecstaxemjieuvin/Build/Products/Debug main.cpp -o ~/Library/Developer/Xcode/DerivedData/t-820-AzureSensors-cnlxwlmrloogwecstaxemjieuvin/Build/Products/Debug/main.cpp.o

@lirenhe
Copy link
Member

lirenhe commented Oct 30, 2017

This is caused by the name conflict in source code. To solve this, please modify:
cores\arduino\IPAddress.h line:78
const IPAddress IP_ADDR_NONE(0,0,0,0);

\libraries\WiFi\src\AZ3166WiFiUdp.cpp line 156:
return IP_ADDR_NONE;

We will include this fix into our next release.

@lirenhe lirenhe self-assigned this Oct 30, 2017
@lirenhe lirenhe added the bug label Oct 30, 2017
@rei-vilo
Copy link
Author

It works, thank you!

@rei-vilo
Copy link
Author

Up to you to close the ticket when the patch is included and delivered in a new release.

@ArthurMa1978 ArthurMa1978 added this to the Sprint 127 milestone Nov 17, 2017
@ArthurMa1978
Copy link
Member

This has been fixed and include in the 1.2.1 release

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants