Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]Compilation error of silabs-sensors in silabs_examples #135

Closed
QingtianHoorii opened this issue Aug 4, 2023 · 2 comments
Closed

[BUG]Compilation error of silabs-sensors in silabs_examples #135

QingtianHoorii opened this issue Aug 4, 2023 · 2 comments
Assignees
Labels
bug Silabs determined this issue is a bug

Comments

@QingtianHoorii
Copy link

Description of the issue

I encountered a compilation error when trying to use the "sl_uart_log_output=true" option to enable the serial port logging feature provided by you. This error may be present in many of the sample routines.I believe this is a minor spelling mistake and I hope you can fix it.

FAILED: obj/third_party/connectedhomeip/examples/platform/silabs/efr32-common.syscalls_stubs.cpp.o
arm-none-eabi-g++ -MMD -MF obj/third_party/connectedhomeip/examples/platform/silabs/efr32-common.syscalls_stubs.cpp.o.d -march=armv8-m.main+dsp -mcpu=cortex-m33 -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -Og -g2 -fno-common -ffunction-sections -fdata-sections --specs=nosys.specs --specs=nano.specs -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wall -Werror -Wstack-usage=8192 -Wextra -Wshadow -Wunreachable-code -Wvla -Wformat -Wformat-nonliteral -Wformat-security -Wno-deprecated-declarations -Wno-missing-field-initializers -Wno-unknown-warning-option -Wno-unused-parameter -Wno-cast-function-type -Wno-psabi -Wno-maybe-uninitialized -fdiagnostics-color -fno-strict-aliasing -Wno-type-limits -fmacro-prefix-map=../third_party/connectedhomeip/= -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/util/plugin/security_manager/ -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/hardware/kit/common/bsp -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/hardware/board/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/hardware/driver/memlcd/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/hardware/driver/memlcd/src/ls013b7dh03 -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/hardware/driver/configuration_over_swo/inc/ -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/bootloader -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/bootloader/config -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/bootloader/config/s2/btl_interface -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/bootloader/api -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/CMSIS/Core/Include -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/CMSIS/RTOS2/Include -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/common/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/emdrv/common/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/emdrv/gpiointerrupt/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/emdrv/dmadrv/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/emdrv/nvm3/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/emdrv/rtcdrv/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/emlib/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/halconfig/inc/hal-config -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/peripheral/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/radio/rail_lib/common -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/radio/rail_lib/chip/efr32 -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/radio/rail_lib/chip/efr32/rf/common/cortex -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/radio/rail_lib/protocol/ieee802154 -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/radio/rail_lib/plugin/pa-conversions -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/radio/rail_lib/plugin/rail_util_pti -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/radio/rail_lib/plugin/rail_util_rf_path -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/service/device_init/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/service/hfxo_manager/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/service/hfxo_manager/src -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/service/mpu/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/service/power_manager/inc/ -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/service/power_manager/src/ -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/service/sleeptimer/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/service/system/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/service/udelay/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/service/legacy_hal/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/service/token_manager/config -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/service/token_manager/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/service/token_manager/test -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/service/token_manager/test/include -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/service/token_manager/test/stack/config -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/service/token_manager/test/stack/include -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/middleware/glib -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/middleware/glib/config -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/middleware/glib/glib -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/middleware/glib/dmd -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/base/hal/plugin/psstore -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/base/hal/plugin/antenna -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/protocol/bluetooth/inc/ -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/util/plugin/plugin-common/fem-control -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/util/silicon_labs/silabs_core/graphics -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/util/silicon_labs/silabs_core/memory_manager -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/util/third_party/mbedtls/include -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/util/third_party/mbedtls/include/psa -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/util/third_party/mbedtls/library -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/security/sl_component/sl_alt/include -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/security/sl_component/sl_protocol_crypto/src -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/security/sl_component/sl_mbedtls_support/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/security/sl_component/sl_mbedtls_support/config/ -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/security/sl_component/sl_psa_driver/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/security/sl_component/sl_psa_driver/inc/public -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/security/sl_component/se_manager/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/security/sl_component/se_manager/src/ -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/util/third_party/freertos/cmsis/Include -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/util/third_party/freertos/kernel/include -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/driver/debug/inc -isystem../third_party/connectedhomeip/third_party/silabs/matter_support/matter/efr32/efr32mg24/BRD4187C/config -isystem../third_party/connectedhomeip/third_party/silabs/matter_support/matter/efr32/efr32mg24/BRD4187C/autogen -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/radio/rail_lib/hal -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/radio/rail_lib/hal/efr32 -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/driver/leddrv/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/driver/button/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/hardware/driver/mx25_flash_shutdown/inc/sl_mx25_flash_shutdown_usart -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/emdrv/uartdrv/inc -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/emdrv/uartdrv/config -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/hardware/driver/memlcd/inc/memlcd_usart -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/Device/SiliconLabs/EFR32MG24/Include -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/radio/rail_lib/chip/efr32/efr32xg2x -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/radio/rail_lib/plugin/pa-conversions/efr32xg24 -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/radio/rail_lib/plugin/pa-conversions/efr32xg24/config -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/service/device_init/config/s2/ -isystem../third_party/connectedhomeip/third_party/silabs/gecko_sdk/platform/emdrv/spidrv/inc -Wno-maybe-uninitialized -Wno-shadow -Wno-error=array-parameter -Wno-error=array-bounds -mcmse -Wno-format-nonliteral -std=gnu++14 -fno-rtti -Wnon-virtual-dtor -DOTA_PERIODIC_TIMEOUT=86400 -DDISPLAY_ENABLED -DQR_CODE_ENABLED -DSILABS_OTA_ENABLED -DCHIP_HAVE_CONFIG_H=1 -DMBEDTLS_CONFIG_FILE=\"efr32-chip-mbedtls-config.h\" -DMBEDTLS_PSA_CRYPTO_CONFIG_FILE=\"psa_crypto_config.h\" -D__STARTUP_CLEAR_BSS -DHARD_FAULT_LOG_ENABLE -DCORTEXM3_EFM32_MICRO -DSILABS_LOG_ENABLED=true -DNVM3_DEFAULT_NVM_SIZE=40960 -DNVM3_DEFAULT_MAX_OBJECT_SIZE=4092 -DKVS_MAX_ENTRIES=255 -DEFR32_OPENTHREAD_API -DPHY=EMBER_PHY_RAIL -DCORTEXM3 -DMICRO=EMBER_MICRO_CORTEXM3_EFR32 -DPLAT=EMBER_PLATFORM_CORTEXM3 -DEFR32MG24B220F1536IM48=1 -DBRD4187C=1 -DSL_SUPRESS_DEPRECATION_WARNINGS_SDK_3_1 -D__HEAP_SIZE=0 -DSL_CATALOG_FREERTOS_KERNEL_PRESENT=1 -DMBEDTLS_THREADING_C=1 -DMBEDTLS_THREADING_ALT=1 -DSL_THREADING_ALT=1 -DSL_COMPONENT_CATALOG_PRESENT=1 -DPLATFORM_HEADER=\"platform-header.h\" -DUSE_NVM3=1 -DSL_CATALOG_POWER_MANAGER_PRESENT -DSL_CATALOG_SLEEPTIMER_PRESENT -DSILABS_LOG_OUT_UART=1 -DSILABS_LOG_OUT_RTT=0 -DENABLE_WSTK_LEDS -DCHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI=1 -DCONFIG_ENABLE_UART -DCONFIG_USE_EXTERNAL_FLASH -DEFR32MG24 -DEFR32_SERIES2_CONFIG4_MICRO -DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=\<lib/address_resolve/AddressResolve_DefaultImpl.h\> -DSL_SENSOR_TYPE=1 -DBLE_DEV_NAME=\"SL-OCC-SENSOR\" -DOPENTHREAD_PROJECT_CORE_CONFIG_FILE=\"OpenThreadConfig.h\" -DOPENTHREAD_CORE_CONFIG_PLATFORM_CHECK_FILE=\"openthread-core-efr32-config-check.h\" -DPACKAGE_NAME=\"OPENTHREAD\" -DPACKAGE_VERSION=\"1.0.0\" -DRADIO_CONFIG_DMP_SUPPORT=1 -DEFR32MG24B220F1536IM48 -I../third_party/connectedhomeip/examples/platform/silabs/efr32 -I../third_party/connectedhomeip/examples/platform/silabs/display -I../third_party/connectedhomeip/examples/common/QRCode/repo/c -I../third_party/connectedhomeip/src/include -I../third_party/connectedhomeip/src -Igen/include -I../third_party/connectedhomeip/zzz_generated/app-common -I../third_party/connectedhomeip/src/platform/silabs/efr32 -I../third_party/connectedhomeip/silabs_examples/silabs-sensors/efr32/include -I../third_party/connectedhomeip/src/lib -I../third_party/connectedhomeip/examples/platform/silabs -I../third_party/connectedhomeip/third_party/jlink/segger_rtt/RTT -Igen/include/RTT -I../third_party/connectedhomeip/third_party/nlassert/repo/include -I../third_party/connectedhomeip/third_party/nlio/repo/include -I../third_party/connectedhomeip/third_party/silabs/gecko_sdk/util/third_party/openthread/include -I../third_party/connectedhomeip/examples/providers -I../third_party/connectedhomeip/zzz_generated/lighting-app -Igen/third_party/connectedhomeip/silabs_examples/silabs-sensors/efr32/data_model -Igen/third_party/connectedhomeip/silabs_examples/silabs-sensors/efr32/data_model/zapgen -I../third_party/connectedhomeip/third_party/silabs/gecko_sdk/util/third_party/openthread/examples/platforms -I../third_party/connectedhomeip/third_party/silabs/gecko_sdk/util/third_party/openthread/src -I../third_party/connectedhomeip/third_party/silabs/gecko_sdk/util/third_party/openthread/src/core -I../third_party/connectedhomeip/examples/platform/silabs/efr32/project_include -I../third_party/connectedhomeip/examples/platform/efr32 -I../third_party/connectedhomeip/third_party/silabs/matter_support/matter/efr32/efr32mg24/BRD4187C -I../third_party/connectedhomeip/third_party/silabs/gecko_sdk/protocol/openthread/platform-abstraction/efr32 -c ../third_party/connectedhomeip/examples/platform/silabs/syscalls_stubs.cpp -o obj/third_party/connectedhomeip/examples/platform/silabs/efr32-common.syscalls_stubs.cpp.o
../third_party/connectedhomeip/examples/platform/silabs/syscalls_stubs.cpp: In function 'int _read(int, char*, int)':
../third_party/connectedhomeip/examples/platform/silabs/syscalls_stubs.cpp:177:12: error: expected primary-expression before '=' token
  177 |     return = uartConsoleRead(ptr, len);
      |            ^
At global scope:
cc1plus: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnostics
[18/598] c++ obj/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes/sensor_data_model.Accessors.cpp.o
ninja: build stopped: subcommand failed.

Steps to reproduce the issue

1.Activate Environment
2./silabs_examples/silabs-sensors/efr32
3.edit ./args.gni: add this option "sl_uart_log_output=true"
4.compile it with following:
 export SILABS_BOARD=BRD4187C 
 gn gen ./out  
 ninja  -C  ./out  
5.The error occurred.

Device type(s) and network topology

Matter over Thread
BRD4187C

Proposed solution(s)

Make the following modifications to the code:

--- a/examples/platform/silabs/syscalls_stubs.cpp
+++ b/examples/platform/silabs/syscalls_stubs.cpp
@@ -174,7 +174,7 @@ int __attribute__((weak)) _read(int file, char * ptr, int len)
 {
     (void) file;
 #if SILABS_LOG_OUT_UART
-    return = uartConsoleRead(ptr, len);
+    return uartConsoleRead(ptr, len);
 #else
     (void) ptr;
     (void) len;
~

SMG version

release_2.1.0-1.1

Protocol(s)

Thread

Hardware platform(s)

BRD4187C

Development platform(s)

No response

Captured data or logs

No response

@silabs-sebastien silabs-sebastien added investigating Silabs is currently investigating this issue bug Silabs determined this issue is a bug labels Aug 14, 2023
@silabs-sebastien
Copy link
Collaborator

silabs-sebastien commented Aug 14, 2023

@QingtianHoorii Thanks for reporting this! We'll look at this shortly and I'll post an update here once available.

@silabs-sebastien silabs-sebastien self-assigned this Aug 16, 2023
@silabs-sebastien
Copy link
Collaborator

@QingtianHoorii This issue was already fixed on 2023-06-11. You can view PR # 27187 here, which states:

Fix the redundant assignment equals sign, which causes compilation to fail.

@silabs-sebastien silabs-sebastien removed the investigating Silabs is currently investigating this issue label Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Silabs determined this issue is a bug
Projects
None yet
Development

No branches or pull requests

2 participants