zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.49k stars 6.42k forks source link

Lora sender sample build error for esp32 #33876

Closed houssine97 closed 2 years ago

houssine97 commented 3 years ago

Describe the bug When building a project with the esp32 , I get build errors for example: -- Generating done -- Build files have been written to: C:/Users/houssine/zephyrproject/zephyr/build [70/139] Building C object zephyr/lib/posix/CMakeFiles/lib__posix.dir/pthread_common.c.obj FAILED: zephyr/lib/posix/CMakeFiles/lib__posix.dir/pthread_common.c.obj C:\Users\houssine\.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -DKERNEL -D_FORTIFY_SOURCE=2 -D__LINUX_ERRNO_EXTENSIONS__ -D__ZEPHYR__=1 -I../kernel/include -I../arch/xtensa/include -I../include -Izephyr/include/generated -I../soc/xtensa/esp32 -I../soc/xtensa/esp32/include -I../lib/libc/newlib/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/adapter/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/adapter/include/crypto -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/adapter/include/wifi -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_common/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_rom/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/xtensa/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/xtensa/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/soc/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/soc/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/soc/esp32/private_include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/src/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/driver/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/soc/esp32 -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_wifi/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/efuse/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/efuse/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_system/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_wifi/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_timer/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_timer/private_include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_netif/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_event/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/log/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/wpa_supplicant/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/wpa_supplicant/port/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/wpa_supplicant/src -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/wpa_supplicant/include/esp_supplicant -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/wpa_supplicant/src/crypto -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/spi_flash/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/spi_flash/private_include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/bootloader_support/include -Os -imacros C:/Users/houssine/zephyrproject/zephyr/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -imacros C:/Users/houssine/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/Users/houssine/zephyrproject/zephyr/samples/drivers/lora/send=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/Users/houssine/zephyrproject/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/Users/houssine/zephyrproject=WEST_TOPDIR -ffunction-sections -fdata-sections -mlongcalls -std=c99 -MD -MT zephyr/lib/posix/CMakeFiles/lib__posix.dir/pthread_common.c.obj -MF zephyr\lib\posix\CMakeFiles\lib__posix.dir\pthread_common.c.obj.d -o zephyr/lib/posix/CMakeFiles/lib__posix.dir/pthread_common.c.obj -c C:/Users/houssine/zephyrproject/zephyr/lib/posix/pthread_common.c In file included from C:/Users/houssine/zephyrproject/zephyr/lib/posix/pthread_common.c:10: ../include/posix/time.h:90:15: error: static declaration of 'clock_gettime' follows non-static declaration __syscall int clock_gettime(clockid_t clock_id, struct timespec *ts); ^~~~~~~~~~~~~ In file included from ../include/posix/time.h:12, from C:/Users/houssine/zephyrproject/zephyr/lib/posix/pthread_common.c:10: c:\users\houssine\.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\xtensa-esp32-elf\sys-include\time.h:187:5: note: previous declaration of 'clock_gettime' was here int clock_gettime (clockid_t clock_id, struct timespec *tp); ^~~~~~~~~~~~~ In file included from C:/Users/houssine/zephyrproject/zephyr/lib/posix/pthread_common.c:10: ../include/posix/time.h:94:5: error: conflicting types for 'timer_create' int timer_create(clockid_t clockId, struct sigevent *evp, timer_t *timerid); ^~~~~~~~~~~~ In file included from ../include/posix/time.h:12, from C:/Users/houssine/zephyrproject/zephyr/lib/posix/pthread_common.c:10: c:\users\houssine\.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\xtensa-esp32-elf\sys-include\time.h:192:5: note: previous declaration of 'timer_create' was here int timer_create (clockid_t clock_id, ^~~~~~~~~~~~ [71/139] Building C object zephyr/lib/posix/CMakeFiles/lib__posix.dir/nanosleep.c.obj FAILED: zephyr/lib/posix/CMakeFiles/lib__posix.dir/nanosleep.c.obj C:\Users\houssine\.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -DKERNEL -D_FORTIFY_SOURCE=2 -D__LINUX_ERRNO_EXTENSIONS__ -D__ZEPHYR__=1 -I../kernel/include -I../arch/xtensa/include -I../include -Izephyr/include/generated -I../soc/xtensa/esp32 -I../soc/xtensa/esp32/include -I../lib/libc/newlib/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/adapter/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/adapter/include/crypto -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/adapter/include/wifi -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_common/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_rom/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/xtensa/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/xtensa/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/soc/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/soc/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/soc/esp32/private_include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/src/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/driver/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/soc/esp32 -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_wifi/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/efuse/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/efuse/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_system/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_wifi/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_timer/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_timer/private_include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_netif/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_event/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/log/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/wpa_supplicant/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/wpa_supplicant/port/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/wpa_supplicant/src -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/wpa_supplicant/include/esp_supplicant -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/wpa_supplicant/src/crypto -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/spi_flash/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/spi_flash/private_include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/bootloader_support/include -Os -imacros C:/Users/houssine/zephyrproject/zephyr/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -imacros C:/Users/houssine/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/Users/houssine/zephyrproject/zephyr/samples/drivers/lora/send=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/Users/houssine/zephyrproject/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/Users/houssine/zephyrproject=WEST_TOPDIR -ffunction-sections -fdata-sections -mlongcalls -std=c99 -MD -MT zephyr/lib/posix/CMakeFiles/lib__posix.dir/nanosleep.c.obj -MF zephyr\lib\posix\CMakeFiles\lib__posix.dir\nanosleep.c.obj.d -o zephyr/lib/posix/CMakeFiles/lib__posix.dir/nanosleep.c.obj -c C:/Users/houssine/zephyrproject/zephyr/lib/posix/nanosleep.c In file included from C:/Users/houssine/zephyrproject/zephyr/lib/posix/nanosleep.c:12: ../include/posix/time.h:90:15: error: static declaration of 'clock_gettime' follows non-static declaration __syscall int clock_gettime(clockid_t clock_id, struct timespec *ts); ^~~~~~~~~~~~~ In file included from ../include/posix/time.h:12, from C:/Users/houssine/zephyrproject/zephyr/lib/posix/nanosleep.c:12: c:\users\houssine\.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\xtensa-esp32-elf\sys-include\time.h:187:5: note: previous declaration of 'clock_gettime' was here int clock_gettime (clockid_t clock_id, struct timespec *tp); ^~~~~~~~~~~~~ In file included from C:/Users/houssine/zephyrproject/zephyr/lib/posix/nanosleep.c:12: ../include/posix/time.h:94:5: error: conflicting types for 'timer_create' int timer_create(clockid_t clockId, struct sigevent *evp, timer_t *timerid); ^~~~~~~~~~~~ In file included from ../include/posix/time.h:12, from C:/Users/houssine/zephyrproject/zephyr/lib/posix/nanosleep.c:12: c:\users\houssine\.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\xtensa-esp32-elf\sys-include\time.h:192:5: note: previous declaration of 'timer_create' was here int timer_create (clockid_t clock_id, ^~~~~~~~~~~~ [75/139] Building C object zephyr/drivers/i2c/CMakeFiles/drivers__i2c.dir/i2c_esp32.c.obj ninja: build stopped: subcommand failed. FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' --build 'C:\Users\houssine\zephyrproject\zephyr\build' To Reproduce Steps to reproduce the behavior:

  1. Build using west build -b esp32 samples\drivers\lora\send

Expected behavior send a message with lora.

sylvioalves commented 3 years ago

@houssine97 Lora expects NEWLIB_C support which is not working for ESP32 yet. Would you try adding CONFIG_NATIVE_APPLICATION=y into you prj.conf to see if it compiles properly? This is not the solution but at least confirms the error.

houssine97 commented 3 years ago

hi i addedd CONFIG_NATIVE_APPLICATION=y and this is the error that i get `[0/1] Re-running CMake... Including boilerplate (Zephyr base (cached)): C:/Users/houssine/zephyrproject/zephyr/cmake/app/boilerplate.cmake -- Application: C:/Users/houssine/zephyrproject/zephyr/samples/drivers/lora/send -- Zephyr version: 2.5.99 (C:/Users/houssine/zephyrproject/zephyr) -- Found west (found suitable version "0.9.0", minimum required is "0.7.1") -- git describe failed: fatal: No names found, cannot describe anything.; BUILD_VERSION is left undefined -- Board: esp32 -- Cache files will be written to: C:/Users/houssine/zephyrproject/zephyr/.cache -- Found dtc: C:/ProgramData/chocolatey/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") -- Found toolchain: espressif (C:/Users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf) -- Found BOARD.dts: C:/Users/houssine/zephyrproject/zephyr/boards/xtensa/esp32/esp32.dts -- Generated zephyr.dts: C:/Users/houssine/zephyrproject/zephyr/build/zephyr/zephyr.dts -- Generated devicetree_unfixed.h: C:/Users/houssine/zephyrproject/zephyr/build/zephyr/include/generated/devicetree_unfixed.h -- Generated device_extern.h: C:/Users/houssine/zephyrproject/zephyr/build/zephyr/include/generated/device_extern.h Parsing C:/Users/houssine/zephyrproject/zephyr/Kconfig Loaded configuration 'C:/Users/houssine/zephyrproject/zephyr/boards/xtensa/esp32/esp32_defconfig' Merged configuration 'C:/Users/houssine/zephyrproject/zephyr/samples/drivers/lora/send/prj.conf' Configuration saved to 'C:/Users/houssine/zephyrproject/zephyr/build/zephyr/.config' Kconfig header saved to 'C:/Users/houssine/zephyrproject/zephyr/build/zephyr/include/generated/autoconf.h' CMake Deprecation Warning at C:/Users/houssine/zephyrproject/modules/lib/civetweb/CMakeLists.txt:2 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- Configuring done -- Generating done -- Build files have been written to: C:/Users/houssine/zephyrproject/zephyr/build [6/131] Building C object CMakeFiles/app.dir/src/main.c.obj FAILED: CMakeFiles/app.dir/src/main.c.obj C:\Users\houssine.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -DKERNEL -D_FORTIFY_SOURCE=2 -DZEPHYR=1 -IC:/Users/houssine/zephyrproject/zephyr/include -Izephyr/include/generated -IC:/Users/houssine/zephyrproject/zephyr/soc/xtensa/esp32 -IC:/Users/houssine/zephyrproject/zephyr/soc/xtensa/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/adapter/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/adapter/include/crypto -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/adapter/include/wifi -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_common/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_rom/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/xtensa/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/xtensa/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/soc/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/soc/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/soc/esp32/private_include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/src/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/driver/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/soc/soc/esp32 -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_wifi/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/efuse/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/efuse/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_system/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_wifi/esp32/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_timer/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_timer/private_include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_netif/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/esp_event/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/log/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/wpa_supplicant/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/wpa_supplicant/port/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/wpa_supplicant/src -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/wpa_supplicant/include/esp_supplicant -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/wpa_supplicant/src/crypto -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/spi_flash/include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/spi_flash/private_include -IC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/bootloader_support/include -Os -imacros C:/Users/houssine/zephyrproject/zephyr/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -imacros C:/Users/houssine/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/Users/houssine/zephyrproject/zephyr/samples/drivers/lora/send=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/Users/houssine/zephyrproject/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/Users/houssine/zephyrproject=WEST_TOPDIR -ffunction-sections -fdata-sections -mlongcalls -std=c99 -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles\app.dir\src\main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c C:/Users/houssine/zephyrproject/zephyr/samples/drivers/lora/send/src/main.c In file included from C:/Users/houssine/zephyrproject/zephyr/include/toolchain.h:41, from C:/Users/houssine/zephyrproject/zephyr/include/init.h:10, from C:/Users/houssine/zephyrproject/zephyr/include/device.h:22, from C:/Users/houssine/zephyrproject/zephyr/samples/drivers/lora/send/src/main.c:7: C:/Users/houssine/zephyrproject/zephyr/include/toolchain/gcc.h:62:36: error: static assertion failed: "No default LoRa radio specified in DT"

define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)

                                ^~~~~~~~~~~~~~

C:/Users/houssine/zephyrproject/zephyr/samples/drivers/lora/send/src/main.c:14:1: note: in expansion of macro 'BUILD_ASSERT' BUILD_ASSERT(DT_NODE_HAS_STATUS(DEFAULT_RADIO_NODE, okay), ^~~~ In file included from C:/Users/houssine/zephyrproject/zephyr/include/arch/xtensa/arch.h:18, from C:/Users/houssine/zephyrproject/zephyr/include/arch/cpu.h:27, from C:/Users/houssine/zephyrproject/zephyr/include/kernel_includes.h:33, from C:/Users/houssine/zephyrproject/zephyr/include/kernel.h:17, from C:/Users/houssine/zephyrproject/zephyr/include/init.h:11, from C:/Users/houssine/zephyrproject/zephyr/include/device.h:22, from C:/Users/houssine/zephyrproject/zephyr/samples/drivers/lora/send/src/main.c:7: C:/Users/houssine/zephyrproject/zephyr/samples/drivers/lora/send/src/main.c: In function 'main': C:/Users/houssine/zephyrproject/zephyr/include/devicetree.h:208:32: error: 'DT_N_ALIAS_lora0_P_label' undeclared (first use in this function); did you mean 'DT_N_ALIAS_uart_0'?

define DT_ALIAS(alias) DT_CAT(DT_NALIAS, alias)

                            ^~~~~~~~~~~

C:/Users/houssine/zephyrproject/zephyr/include/devicetree.h:2210:24: note: in definition of macro 'DT_CAT'

define DT_CAT(a1, a2) a1 ## a2

                    ^~

C:/Users/houssine/zephyrproject/zephyr/include/devicetree.h:606:27: note: in expansion of macro 'DT_PROP'

define DT_LABEL(node_id) DT_PROP(node_id, label)

                       ^~~~~~~

C:/Users/houssine/zephyrproject/zephyr/samples/drivers/lora/send/src/main.c:16:23: note: in expansion of macro 'DT_LABEL'

define DEFAULT_RADIO DT_LABEL(DEFAULT_RADIO_NODE)

                   ^~~~~~~~

C:/Users/houssine/zephyrproject/zephyr/include/devicetree.h:208:25: note: in expansion of macro 'DT_CAT'

define DT_ALIAS(alias) DT_CAT(DT_NALIAS, alias)

                     ^~~~~~

C:/Users/houssine/zephyrproject/zephyr/samples/drivers/lora/send/src/main.c:13:28: note: in expansion of macro 'DT_ALIAS'

define DEFAULT_RADIO_NODE DT_ALIAS(lora0)

                        ^~~~~~~~

C:/Users/houssine/zephyrproject/zephyr/samples/drivers/lora/send/src/main.c:16:32: note: in expansion of macro 'DEFAULT_RADIO_NODE'

define DEFAULT_RADIO DT_LABEL(DEFAULT_RADIO_NODE)

                            ^~~~~~~~~~~~~~~~~~

C:/Users/houssine/zephyrproject/zephyr/samples/drivers/lora/send/src/main.c:32:32: note: in expansion of macro 'DEFAULT_RADIO' lora_dev = device_get_binding(DEFAULT_RADIO); ^~~~~ C:/Users/houssine/zephyrproject/zephyr/include/devicetree.h:208:32: note: each undeclared identifier is reported only once for each function it appears in

define DT_ALIAS(alias) DT_CAT(DT_NALIAS, alias)

                            ^~~~~~~~~~~

C:/Users/houssine/zephyrproject/zephyr/include/devicetree.h:2210:24: note: in definition of macro 'DT_CAT'

define DT_CAT(a1, a2) a1 ## a2

                    ^~

C:/Users/houssine/zephyrproject/zephyr/include/devicetree.h:606:27: note: in expansion of macro 'DT_PROP'

define DT_LABEL(node_id) DT_PROP(node_id, label)

                       ^~~~~~~

C:/Users/houssine/zephyrproject/zephyr/samples/drivers/lora/send/src/main.c:16:23: note: in expansion of macro 'DT_LABEL'

define DEFAULT_RADIO DT_LABEL(DEFAULT_RADIO_NODE)

                   ^~~~~~~~

C:/Users/houssine/zephyrproject/zephyr/include/devicetree.h:208:25: note: in expansion of macro 'DT_CAT'

define DT_ALIAS(alias) DT_CAT(DT_NALIAS, alias)

                     ^~~~~~

C:/Users/houssine/zephyrproject/zephyr/samples/drivers/lora/send/src/main.c:13:28: note: in expansion of macro 'DT_ALIAS'

define DEFAULT_RADIO_NODE DT_ALIAS(lora0)

                        ^~~~~~~~

C:/Users/houssine/zephyrproject/zephyr/samples/drivers/lora/send/src/main.c:16:32: note: in expansion of macro 'DEFAULT_RADIO_NODE'

define DEFAULT_RADIO DT_LABEL(DEFAULT_RADIO_NODE)

                            ^~~~~~~~~~~~~~~~~~

C:/Users/houssine/zephyrproject/zephyr/samples/drivers/lora/send/src/main.c:32:32: note: in expansion of macro 'DEFAULT_RADIO' lora_dev = device_get_binding(DEFAULT_RADIO); ^~~~~ [11/131] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/hex.c.obj ninja: build stopped: subcommand failed. FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' --build 'C:\Users\houssine\zephyrproject\zephyr\build`

sylvioalves commented 3 years ago

Hi @houssine97. I guess you have been using a custom board with a lora radio.
C:/Users/houssine/zephyrproject/zephyr/include/toolchain/gcc.h:62:36: error: static assertion failed: "No default LoRa radio specified in DT"

You need to add the radio configuration into device tree to have it mapped properly.

One way is adding an .overlay file within the project with the radio instance/pin configs.

houssine97 commented 3 years ago

hi @sylvioalves the board i am using is Heltec WiFi LoRa 32 V2 boards and i this is the overlay that i created for adding the radio configuration into device tree but the code is not building.

`/ {
aliases {
    lora0 = &lora;
 };
};
&spi3 {
     status = "okay";
     lora:  SX127x@0 {
         compatible = "semtech,sx1276";
         reg = <0>;
         label = "sx127x";
         reset-gpios = <&gpio0 14 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
         dio-gpios = <&gpio0 26 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,
            <&gpio1 34 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,
            <&gpio1 5 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
         spi-max-frequency = <1000000>;
         power-amplifier-output = "pa-boost";
     };
};
 `

this is the error i get

`Generated C:/Users/houssine/zephyrproject/zephyr/build/esp-idf/build/bootloader/bootloader.bin
[144/151] Linking C executable zephyr\zephyr_prebuilt.elf
FAILED: zephyr/zephyr_prebuilt.elf zephyr/zephyr_prebuilt.map
cmd.exe /C "cd . && C:\Users\houssine\.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe   zephyr/CMakeFiles/zephyr_prebuilt.dir/misc/empty_file.c.obj -o zephyr\zephyr_prebuilt.elf  -Wl,-T  zephyr/linker.cmd  -Wl,-Map=C:/Users/houssine/zephyrproject/zephyr/build/zephyr/zephyr_prebuilt.map  -Wl,--whole-archive  app/libapp.a  zephyr/libzephyr.a  zephyr/arch/common/libarch__common.a  zephyr/arch/arch/xtensa/core/libarch__xtensa__core.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/i2c/libdrivers__i2c.a  zephyr/drivers/spi/libdrivers__spi.a  zephyr/drivers/lora/libloramac-node.a  zephyr/drivers/serial/libdrivers__serial.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  zephyr/CMakeFiles/offsets.dir/./arch/xtensa/core/offsets/offsets.c.obj  -L"c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0"  -LC:/Users/houssine/zephyrproject/zephyr/build/zephyr  -lgcc  zephyr/arch/common/libisr_tables.a  -Wl,--gc-sections  -Wl,--build-id=none  -Wl,--sort-common=descending  -Wl,--sort-section=alignment  -Wl,-u,_OffsetAbsSyms  -Wl,-u,_ConfigAbsSyms  -lhal  -LC:/Users/houssine/zephyrproject/modules/hal/espressif/zephyr/../components/xtensa/esp32 && cmd.exe /C "cd /D C:\Users\houssine\zephyrproject\zephyr\build\zephyr && "C:\Program Files\CMake\bin\cmake.exe" -E echo ""
c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/lib\libc.a(lib_a-stdio.o):(.literal+0x20): warning: _close_r is not implemented and will always fail
c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/lib\libc.a(lib_a-makebuf.o):(.literal+0x8): warning: _fstat_r is not implemented and will always fail
c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/lib\libc.a(lib_a-stdio.o):(.literal+0xc): warning: _lseek_r is not implemented and will always fail
c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/lib\libc.a(lib_a-stdio.o):(.literal+0x4): warning: _read_r is not implemented and will always fail
c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/lib\libc.a(lib_a-stdio.o):(.literal+0x10): warning: _write_r is not implemented and will always fail
c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/lib\libc.a(lib_a-fputs.o):(.literal+0x1c): warning: pthread_setcancelstate is not implemented and will always fail
c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/lib\libc.a(lib_a-assert.o):(.literal+0xc): warning: __getreent is not implemented and will always fail
c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: zephyr/drivers/lora/libloramac-node.a(sx1276.c.obj):(.literal.SX1276GetTimeOnAir+0x18): undefined reference to `round'
c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: zephyr/drivers/lora/libloramac-node.a(sx1276.c.obj):(.literal.SX1276GetTimeOnAir+0x1c): undefined reference to `ceil'
c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: zephyr/drivers/lora/libloramac-node.a(sx1276.c.obj):(.literal.SX1276GetTimeOnAir+0x20): undefined reference to `floor'
c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: zephyr/drivers/lora/libloramac-node.a(sx1276.c.obj): in function `SX1276GetTimeOnAir':
C:/Users/houssine/zephyrproject/modules/lib/loramac-node/src/radio/sx1276/sx1276.c:713: undefined reference to `round'
c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Users/houssine/zephyrproject/modules/lib/loramac-node/src/radio/sx1276/sx1276.c:763: undefined reference to `ceil'
c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Users/houssine/zephyrproject/modules/lib/loramac-node/src/radio/sx1276/sx1276.c:761: undefined reference to `floor'
c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/lib\libc.a(lib_a-assert.o):(.literal+0xc): undefined reference to `abort'
c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/lib\libc.a(lib_a-assert.o): in function `__assert_func':
/builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/newlib/newlib/libc/stdlib/assert.c:58: undefined reference to `abort'
c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/lib\libc.a(lib_a-raise.o):(.literal+0x0): undefined reference to `_getpid_r'
c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/lib\libc.a(lib_a-raise.o):(.literal+0x4): undefined reference to `_kill_r'
c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/lib\libc.a(lib_a-raise.o): in function `_raise_r':
/builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/newlib/newlib/libc/signal/raise.c:66: undefined reference to `_getpid_r'
c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/newlib/newlib/libc/signal/raise.c:66: undefined reference to `_kill_r'
c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: c:/users/houssine/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/lib\libnosys.a(sbrk.o):(.literal+0x4): undefined reference to `end'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' --build 'C:\Users\houssine\zephyrproject\zephyr\build'`
houssine97 commented 3 years ago

@sylvioalves ??

sylvioalves commented 3 years ago

Hi @houssine97, someone on the team is analyzing that.

houssine97 commented 3 years ago

@sylvioalves thank you

houssine97 commented 3 years ago

@sylvioalves any update?

sylvioalves commented 3 years ago

@houssine97, not yet, supporting newlibc is tricky. We are working on it.

github-actions[bot] commented 3 years ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

protobits commented 3 years ago

If this is still an issue preventing lora to be used on ESP32 maybe we can keep this open to track the missing feature?

cdrx commented 2 years ago

I've just tested this and get the same error.

@sylvioalves could this be reopened?

cdrx commented 2 years ago

@sylvioalves what needs to be worked on to make this work? I'm having a hard time understanding the various pieces here

adalava commented 2 years ago

With the samples/drivers/lora/send/ I get the following build errors:

In file included from /home/alfredoj/zephyrproject/zephyr/lib/posix/pthread_common.c:10: /home/alfredoj/zephyrproject/zephyr/include/posix/time.h:90:15: error: static declaration of 'clock_gettime' follows non-static declaration __syscall int clock_gettime(clockid_t clock_id, struct timespec ts); ^~~~~ In file included from /home/alfredoj/zephyrproject/zephyr/include/posix/time.h:12, from /home/alfredoj/zephyrproject/zephyr/lib/posix/pthread_common.c:10: /home/alfredoj/.espressif/tools/zephyr/xtensa-esp32-elf/xtensa-esp32-elf/sys-include/time.h:187:5: note: previous declaration of 'clock_gettime' was here int clock_gettime (clockid_t clock_id, struct timespec tp);

And:

In file included from /home/alfredoj/zephyrproject/zephyr/lib/posix/pthread_common.c:10: /home/alfredoj/zephyrproject/zephyr/include/posix/time.h:94:5: error: conflicting types for 'timer_create' int timer_create(clockid_t clockId, struct sigevent evp, timer_t timerid); ^~~~ In file included from /home/alfredoj/zephyrproject/zephyr/include/posix/time.h:12, from /home/alfredoj/zephyrproject/zephyr/lib/posix/pthread_common.c:10: /home/alfredoj/.espressif/tools/zephyr/xtensa-esp32-elf/xtensa-esp32-elf/sys-include/time.h:192:5: note: previous declaration of >'timer_create' was here int timer_create (clockid_t clock_id,

github-actions[bot] commented 2 years ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

cdrx commented 2 years ago

I think this is still an issue.

@sylvioalves could this be reopened please?

jeronimoagullo commented 2 years ago

I am facing the same issue when I try to build the example with TensorFlow Lite, which requires the use of newlibc too. I there any update? Thanks

sylvioalves commented 2 years ago

Hi, please, update Zephyr to latest main, run west update then west espressif update.
Notice that now ESP32 uses Zephyr-SDK 0.14.1. Please, also run export ZEPHYR_TOOLCHAIN_VARIANT="zephyr" so that it uses the SDK as expected.
In case you have issues running west update regarding hal_espressif, try deleting hal_espressif folder and run west update again.

jeronimoagullo commented 2 years ago

Hi @sylvioalves

Thank you very much for your answer.

I tried firstly to use the Zephyr toolchain instead of the ESP-IDF. I am trying to compile for esp32, thus I am building with west build -b esp32 -p. My computer OS is Windows 11. However, when I get the following error.

(.venv) C:\Workspace\zephyrproject\zephyr\samples\hello_world>west build -b esp32 -p
-- west build: making build dir C:\Workspace\zephyrproject\zephyr\samples\hello_world\build pristine
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: C:/Workspace/zephyrproject/zephyr/samples/hello_world
-- Found Python3: C:/Workspace/zephyrproject/.venv/Scripts/python.exe (found suitable exact version "3.10.4") found components: Interpreter
-- Cache files will be written to: C:/Workspace/zephyrproject/zephyr/.cache
-- Zephyr version: 3.0.99 (C:/Workspace/zephyrproject/zephyr)
-- Found west (found suitable version "0.13.1", minimum required is "0.7.1")
-- Board: esp32
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.14.1 (C:/Workspace/zephyr-sdk-0.14.1)
-- Found dtc: C:/ProgramData/chocolatey/bin/dtc.exe (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found toolchain: zephyr 0.14.1 (C:/Workspace/zephyr-sdk-0.14.1)
-- Found BOARD.dts: C:/Workspace/zephyrproject/zephyr/boards/xtensa/esp32/esp32.dts
-- Generated zephyr.dts: C:/Workspace/zephyrproject/zephyr/samples/hello_world/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/Workspace/zephyrproject/zephyr/samples/hello_world/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: C:/Workspace/zephyrproject/zephyr/samples/hello_world/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: C:/Workspace/zephyrproject/zephyr/samples/hello_world/build/zephyr/dts.cmake
C:/Workspace/zephyrproject/zephyr/samples/hello_world/build/zephyr/zephyr.dts:138.27-216.5: Warning (simple_bus_reg): /soc/pin-controller: missing or empty reg/ranges property
Parsing C:/Workspace/zephyrproject/zephyr/Kconfig
Loaded configuration 'C:/Workspace/zephyrproject/zephyr/boards/xtensa/esp32/esp32_defconfig'
Merged configuration 'C:/Workspace/zephyrproject/zephyr/samples/hello_world/prj.conf'
Configuration saved to 'C:/Workspace/zephyrproject/zephyr/samples/hello_world/build/zephyr/.config'
Kconfig header saved to 'C:/Workspace/zephyrproject/zephyr/samples/hello_world/build/zephyr/include/generated/autoconf.h'
CMake Error at C:/Workspace/zephyrproject/zephyr/cmake/compiler/gcc/target.cmake:17 (message):
  C compiler
  C:/Workspace/zephyr-sdk-0.14.1/xtensa-_zephyr-elf/bin/xtensa-_zephyr-elf-gcc
  not found - Please check your toolchain installation
Call Stack (most recent call first):
  C:/Workspace/zephyrproject/zephyr/cmake/modules/target_toolchain.cmake:63 (include)
  C:/Workspace/zephyrproject/zephyr/cmake/modules/zephyr_default.cmake:121 (include)
  C:/Workspace/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:51 (include)
  C:/Workspace/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:76 (include_boilerplate)
  CMakeLists.txt:5 (find_package)

-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' '-DWEST_PYTHON=C:\Workspace\zephyrproject\.venv\Scripts\python.exe' '-BC:\Workspace\zephyrproject\zephyr\samples\hello_world\build' '-SC:\Workspace\zephyrproject\zephyr\samples\hello_world' -GNinja -DBOARD=esp32

The issue is that the path where west is looking for doesn't exist. C:/Workspace/zephyr-sdk-0.14.1/xtensa-_zephyr-elf/bin/xtensa-_zephyr-elf-gcc doesn't exist actually. However, the folders within the zephyr-sdk-0.14.1 are the following:

Directorio de C:\Workspace\zephyr-sdk-0.14.1

12/05/2022  16:01    <DIR>          .
12/05/2022  12:06    <DIR>          ..
11/04/2022  21:44    <DIR>          aarch64-zephyr-elf
11/04/2022  22:32    <DIR>          arc-zephyr-elf
11/04/2022  21:43    <DIR>          arc64-zephyr-elf
11/04/2022  22:48    <DIR>          arm-zephyr-eabi
05/05/2022  11:31    <DIR>          cmake
11/04/2022  21:50    <DIR>          mips-zephyr-elf
11/04/2022  21:57    <DIR>          nios2-zephyr-elf
11/04/2022  22:06    <DIR>          riscv64-zephyr-elf
12/04/2022  04:51                 7 sdk_version
12/04/2022  04:51             5.581 setup.cmd
11/04/2022  22:08    <DIR>          sparc-zephyr-elf
11/04/2022  21:48    <DIR>          x86_64-zephyr-elf
11/04/2022  21:43    <DIR>          xtensa-espressif_esp32s2_zephyr-elf
11/04/2022  21:45    <DIR>          xtensa-espressif_esp32_zephyr-elf
11/04/2022  21:51    <DIR>          xtensa-intel_apl_adsp_zephyr-elf
11/04/2022  21:47    <DIR>          xtensa-intel_bdw_adsp_zephyr-elf
11/04/2022  21:51    <DIR>          xtensa-intel_byt_adsp_zephyr-elf
11/04/2022  21:51    <DIR>          xtensa-intel_s1000_zephyr-elf
11/04/2022  21:52    <DIR>          xtensa-nxp_imx8m_adsp_zephyr-elf
11/04/2022  21:53    <DIR>          xtensa-nxp_imx_adsp_zephyr-elf
11/04/2022  21:55    <DIR>          xtensa-sample_controller_zephyr-elf
               2 archivos          5.588 bytes
              21 dirs  368.887.701.504 bytes libres

Thus, the compiler is there and the issue is just the path. Do you know how I can fix it to set the correct folder for building?

thank you in advance

jeronimoagullo commented 2 years ago

Hi @sylvioalves It is working now. The issue was that I was working with an all version of Zephyr code. I notice that west update updates all the sub-repositories of zephyr project but doesn't update the main repository. Thus, I needed to do a git pull in the root of zephyr project and a new west update afterwards. Then, the modules were updated (specially the hal_espressif) and everyhting works now fine. I think that we can close the issue. Thank very much!

sylvioalves commented 2 years ago

@jeronimoagullo Have you also tested the application and perform Lora send/received contents or only built the project?

mpiccolino-tealblue commented 2 years ago

@sylvioalves @jeronimoagullo I'm about to test some LoRa receiving (and possibly sending) on Heltec WiFi LoRa 32 (V2), will report

mpiccolino-tealblue commented 2 years ago

@sylvioalves I haven't been able to compile the lora/send sample for the Heltec WiFi LoRa 32 (V2) with a fresh Zephyr install on macOS and Zephyr SDK 0.14.2. Here is the output:

[1/15] Building C object CMakeFiles/app.dir/src/main.c.obj
FAILED: CMakeFiles/app.dir/src/main.c.obj 
ccache /Users/marco_piccolino/zephyr-sdk-0.14.2/xtensa-espressif_esp32_zephyr-elf/bin/xtensa-espressif_esp32_zephyr-elf-gcc -DCONFIG_SPI_FLASH_ROM_DRIVER_PATCH -DCONFIG_SPI_FLASH_USE_LEGACY_IMPL -DKERNEL -D_FORTIFY_SOURCE=2 -D__LINUX_ERRNO_EXTENSIONS__ -D__ZEPHYR__=1 -I/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr -I/Users/marco_piccolino/zephyrproject/zephyr/include -I/Users/marco_piccolino/zephyrproject/zephyr-lora-send/build/zephyr/include/generated -I/Users/marco_piccolino/zephyrproject/zephyr/soc/xtensa/esp32 -I/Users/marco_piccolino/zephyrproject/zephyr/soc/xtensa/esp32/include -I/Users/marco_piccolino/zephyrproject/zephyr/lib/libc/newlib/include -I/Users/marco_piccolino/zephyrproject/modules/hal/atmel/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/include/bt -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/include/crypto -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../esp_shared/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../esp_shared/include/wifi -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/hal/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/hal/esp32/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_hw_support/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_hw_support/port/esp32 -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_hw_support/port/esp32/private_include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_common/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_rom/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_rom/esp32/ld -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp32/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/soc/esp32/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/xtensa/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/xtensa/esp32/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/soc/include/soc -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/soc/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/soc/src/esp32/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/driver/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_wifi/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/efuse/esp32/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/efuse/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_system/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_wifi/esp32/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_timer/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_timer/private_include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_netif/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_event/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/log/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/wpa_supplicant/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/wpa_supplicant/port/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/wpa_supplicant/src -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/wpa_supplicant/include/esp_supplicant -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/wpa_supplicant/src/crypto -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/spi_flash/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/spi_flash/private_include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/bootloader_support/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/bootloader_support/include_bootloader -Os -imacros /Users/marco_piccolino/zephyrproject/zephyr-lora-send/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -imacros /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/Users/marco_piccolino/zephyrproject/zephyr-lora-send=CMAKE_SOURCE_DIR -fmacro-prefix-map=/Users/marco_piccolino/zephyrproject/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/Users/marco_piccolino/zephyrproject=WEST_TOPDIR -ffunction-sections -fdata-sections -mlongcalls -Wno-unused-variable -Wno-maybe-uninitialized -std=c99 -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c /Users/marco_piccolino/zephyrproject/zephyr-lora-send/src/main.c
In file included from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/toolchain.h:50,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/init.h:10,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:29,
                 from /Users/marco_piccolino/zephyrproject/zephyr-lora-send/src/main.c:7:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/toolchain/gcc.h:77:36: error: static assertion failed: "No default LoRa radio specified in DT"
   77 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
      |                                    ^~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr-lora-send/src/main.c:14:1: note: in expansion of macro 'BUILD_ASSERT'
   14 | BUILD_ASSERT(DT_NODE_HAS_STATUS(DEFAULT_RADIO_NODE, okay),
      | ^~~~~~~~~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/toolchain/gcc.h:88,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/toolchain.h:50,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/init.h:10,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:29,
                 from /Users/marco_piccolino/zephyrproject/zephyr-lora-send/src/main.c:7:
/Users/marco_piccolino/zephyrproject/zephyr-lora-send/src/main.c: In function 'main':
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:96:39: error: '__device_dts_ord_DT_N_ALIAS_lora0_ORD' undeclared (first use in this function)
   96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
      |                                       ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
  132 | #define _DO_CONCAT(x, y) x ## y
      |                          ^
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:96:31: note: in expansion of macro '_CONCAT'
   96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
      |                               ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:291:37: note: in expansion of macro 'DEVICE_NAME_GET'
  291 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_NAME(node_id))
      |                                     ^~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:311:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
  311 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
      |                                  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr-lora-send/src/main.c:27:34: note: in expansion of macro 'DEVICE_DT_GET'
   27 |  const struct device *lora_dev = DEVICE_DT_GET(DEFAULT_RADIO_NODE);
      |                                  ^~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:96:39: note: each undeclared identifier is reported only once for each function it appears in
   96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
      |                                       ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
  132 | #define _DO_CONCAT(x, y) x ## y
      |                          ^
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:96:31: note: in expansion of macro '_CONCAT'
   96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
      |                               ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:291:37: note: in expansion of macro 'DEVICE_NAME_GET'
  291 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_NAME(node_id))
      |                                     ^~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:311:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
  311 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
      |                                  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr-lora-send/src/main.c:27:34: note: in expansion of macro 'DEVICE_DT_GET'
   27 |  const struct device *lora_dev = DEVICE_DT_GET(DEFAULT_RADIO_NODE);
      |                                  ^~~~~~~~~~~~~
[2/15] Building C object zephyr/drivers/lora/CMakeFiles/loramac-node.dir/sx127x.c.obj
FAILED: zephyr/drivers/lora/CMakeFiles/loramac-node.dir/sx127x.c.obj 
ccache /Users/marco_piccolino/zephyr-sdk-0.14.2/xtensa-espressif_esp32_zephyr-elf/bin/xtensa-espressif_esp32_zephyr-elf-gcc -DCONFIG_SPI_FLASH_ROM_DRIVER_PATCH -DCONFIG_SPI_FLASH_USE_LEGACY_IMPL -DKERNEL -D_FORTIFY_SOURCE=2 -D__LINUX_ERRNO_EXTENSIONS__ -D__ZEPHYR_SUPERVISOR__ -D__ZEPHYR__=1 -I/Users/marco_piccolino/zephyrproject/modules/lib/loramac-node/src/boards -I/Users/marco_piccolino/zephyrproject/modules/lib/loramac-node/src/system -I/Users/marco_piccolino/zephyrproject/modules/lib/loramac-node/src/radio -I/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr -I/Users/marco_piccolino/zephyrproject/zephyr/include -I/Users/marco_piccolino/zephyrproject/zephyr-lora-send/build/zephyr/include/generated -I/Users/marco_piccolino/zephyrproject/zephyr/soc/xtensa/esp32 -I/Users/marco_piccolino/zephyrproject/zephyr/soc/xtensa/esp32/include -I/Users/marco_piccolino/zephyrproject/zephyr/lib/libc/newlib/include -I/Users/marco_piccolino/zephyrproject/modules/hal/atmel/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/include/bt -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/include/crypto -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../esp_shared/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../esp_shared/include/wifi -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/hal/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/hal/esp32/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_hw_support/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_hw_support/port/esp32 -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_hw_support/port/esp32/private_include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_common/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_rom/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_rom/esp32/ld -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp32/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/soc/esp32/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/xtensa/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/xtensa/esp32/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/soc/include/soc -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/soc/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/soc/src/esp32/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/driver/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_wifi/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/efuse/esp32/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/efuse/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_system/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_wifi/esp32/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_timer/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_timer/private_include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_netif/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/esp_event/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/log/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/wpa_supplicant/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/wpa_supplicant/port/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/wpa_supplicant/src -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/wpa_supplicant/include/esp_supplicant -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/wpa_supplicant/src/crypto -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/spi_flash/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/spi_flash/private_include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/bootloader_support/include -I/Users/marco_piccolino/zephyrproject/modules/hal/espressif/zephyr/esp32/../../components/bootloader_support/include_bootloader -Os -imacros /Users/marco_piccolino/zephyrproject/zephyr-lora-send/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -imacros /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/Users/marco_piccolino/zephyrproject/zephyr-lora-send=CMAKE_SOURCE_DIR -fmacro-prefix-map=/Users/marco_piccolino/zephyrproject/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/Users/marco_piccolino/zephyrproject=WEST_TOPDIR -ffunction-sections -fdata-sections -mlongcalls -Wno-unused-variable -Wno-maybe-uninitialized -std=c99 -MD -MT zephyr/drivers/lora/CMakeFiles/loramac-node.dir/sx127x.c.obj -MF zephyr/drivers/lora/CMakeFiles/loramac-node.dir/sx127x.c.obj.d -o zephyr/drivers/lora/CMakeFiles/loramac-node.dir/sx127x.c.obj -c /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:93:2: error: #error No SX127x instance in device tree.
   93 | #error No SX127x instance in device tree.
      |  ^~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/toolchain.h:50,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/__assert.h:11,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:18,
                 from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:8:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/toolchain/gcc.h:77:36: error: static assertion failed: "None of rfo-enable-gpios, pa-boost-enable-gpios and power-amplifier-output has been specified. Look at semtech,sx127x-base.yaml to fix that."
   77 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
      |                                    ^~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:125:1: note: in expansion of macro 'BUILD_ASSERT'
  125 | BUILD_ASSERT(0, "None of rfo-enable-gpios, pa-boost-enable-gpios and "
      | ^~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:141:8: error: unknown type name 'DioIrqHandler'
  141 | extern DioIrqHandler *DioIrq[];
      |        ^~~~~~~~~~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_macro.h:34,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util.h:17,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/list_gen.h:12,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/slist.h:22,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:19,
                 from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:8:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_macro.h:363:44: warning: implicit declaration of function 'Z_UTIL_LISTIFY_DT_N_INST_0_DT_DRV_COMPAT_P_dio_gpios_LEN' [-Wimplicit-function-declaration]
  363 | #define LISTIFY(LEN, F, sep, ...) UTIL_CAT(Z_UTIL_LISTIFY_, LEN)(F, sep, __VA_ARGS__)
      |                                            ^~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:99:36: note: in definition of macro 'UTIL_PRIMITIVE_CAT'
   99 | #define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__
      |                                    ^
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_macro.h:363:35: note: in expansion of macro 'UTIL_CAT'
  363 | #define LISTIFY(LEN, F, sep, ...) UTIL_CAT(Z_UTIL_LISTIFY_, LEN)(F, sep, __VA_ARGS__)
      |                                   ^~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:151:2: note: in expansion of macro 'LISTIFY'
  151 |  LISTIFY(SX127X_DIO_GPIO_LEN(n), SX127X_DIO_GPIO_ELEM, (,), n)
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:153:52: note: in expansion of macro 'SX127X_DIO_GPIO_INIT'
  153 | static const struct gpio_dt_spec sx127x_dios[] = { SX127X_DIO_GPIO_INIT(0) };
      |                                                    ^~~~~~~~~~~~~~~~~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util.h:17,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/list_gen.h:12,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/slist.h:22,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:19,
                 from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:8:
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:151:34: error: 'SX127X_DIO_GPIO_ELEM' undeclared here (not in a function)
  151 |  LISTIFY(SX127X_DIO_GPIO_LEN(n), SX127X_DIO_GPIO_ELEM, (,), n)
      |                                  ^~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_macro.h:363:66: note: in definition of macro 'LISTIFY'
  363 | #define LISTIFY(LEN, F, sep, ...) UTIL_CAT(Z_UTIL_LISTIFY_, LEN)(F, sep, __VA_ARGS__)
      |                                                                  ^
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:153:52: note: in expansion of macro 'SX127X_DIO_GPIO_INIT'
  153 | static const struct gpio_dt_spec sx127x_dios[] = { SX127X_DIO_GPIO_INIT(0) };
      |                                                    ^~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:151:57: error: expected expression before ',' token
  151 |  LISTIFY(SX127X_DIO_GPIO_LEN(n), SX127X_DIO_GPIO_ELEM, (,), n)
      |                                                         ^
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_macro.h:363:69: note: in definition of macro 'LISTIFY'
  363 | #define LISTIFY(LEN, F, sep, ...) UTIL_CAT(Z_UTIL_LISTIFY_, LEN)(F, sep, __VA_ARGS__)
      |                                                                     ^~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:153:52: note: in expansion of macro 'SX127X_DIO_GPIO_INIT'
  153 | static const struct gpio_dt_spec sx127x_dios[] = { SX127X_DIO_GPIO_INIT(0) };
      |                                                    ^~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:151:57: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  151 |  LISTIFY(SX127X_DIO_GPIO_LEN(n), SX127X_DIO_GPIO_ELEM, (,), n)
      |                                                         ^
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_macro.h:363:69: note: in definition of macro 'LISTIFY'
  363 | #define LISTIFY(LEN, F, sep, ...) UTIL_CAT(Z_UTIL_LISTIFY_, LEN)(F, sep, __VA_ARGS__)
      |                                                                     ^~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:153:52: note: in expansion of macro 'SX127X_DIO_GPIO_INIT'
  153 | static const struct gpio_dt_spec sx127x_dios[] = { SX127X_DIO_GPIO_INIT(0) };
      |                                                    ^~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:178:3: error: 'const struct sx127x_config' has no member named 'bus'
  178 |  .bus = SPI_DT_SPEC_INST_GET(0, SPI_WORD_SET(8) | SPI_TRANSFER_MSB, 0),
      |   ^~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:10:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:401:2: error: extra brace group at end of initializer
  401 |  {            \
      |  ^
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:420:2: note: in expansion of macro 'SPI_DT_SPEC_GET'
  420 |  SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
      |  ^~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:178:9: note: in expansion of macro 'SPI_DT_SPEC_INST_GET'
  178 |  .bus = SPI_DT_SPEC_INST_GET(0, SPI_WORD_SET(8) | SPI_TRANSFER_MSB, 0),
      |         ^~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:401:2: note: (near initialization for 'dev_config')
  401 |  {            \
      |  ^
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:420:2: note: in expansion of macro 'SPI_DT_SPEC_GET'
  420 |  SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
      |  ^~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:178:9: note: in expansion of macro 'SPI_DT_SPEC_INST_GET'
  178 |  .bus = SPI_DT_SPEC_INST_GET(0, SPI_WORD_SET(8) | SPI_TRANSFER_MSB, 0),
      |         ^~~~~~~~~~~~~~~~~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/toolchain/gcc.h:88,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/toolchain.h:50,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/__assert.h:11,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:18,
                 from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:8:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:96:39: error: '__device_dts_ord_DT_N_INST_0_DT_DRV_COMPAT_BUS_ORD' undeclared here (not in a function)
   96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
      |                                       ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
  132 | #define _DO_CONCAT(x, y) x ## y
      |                          ^
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:96:31: note: in expansion of macro '_CONCAT'
   96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
      |                               ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:291:37: note: in expansion of macro 'DEVICE_NAME_GET'
  291 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_NAME(node_id))
      |                                     ^~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:311:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
  311 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
      |                                  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:402:10: note: in expansion of macro 'DEVICE_DT_GET'
  402 |   .bus = DEVICE_DT_GET(DT_BUS(node_id)),       \
      |          ^~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:420:2: note: in expansion of macro 'SPI_DT_SPEC_GET'
  420 |  SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
      |  ^~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:178:9: note: in expansion of macro 'SPI_DT_SPEC_INST_GET'
  178 |  .bus = SPI_DT_SPEC_INST_GET(0, SPI_WORD_SET(8) | SPI_TRANSFER_MSB, 0),
      |         ^~~~~~~~~~~~~~~~~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:10:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:340:2: error: extra brace group at end of initializer
  340 |  {        \
      |  ^
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:403:13: note: in expansion of macro 'SPI_CONFIG_DT'
  403 |   .config = SPI_CONFIG_DT(node_id, operation_, delay_) \
      |             ^~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:420:2: note: in expansion of macro 'SPI_DT_SPEC_GET'
  420 |  SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
      |  ^~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:178:9: note: in expansion of macro 'SPI_DT_SPEC_INST_GET'
  178 |  .bus = SPI_DT_SPEC_INST_GET(0, SPI_WORD_SET(8) | SPI_TRANSFER_MSB, 0),
      |         ^~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:340:2: note: (near initialization for 'dev_config')
  340 |  {        \
      |  ^
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:403:13: note: in expansion of macro 'SPI_CONFIG_DT'
  403 |   .config = SPI_CONFIG_DT(node_id, operation_, delay_) \
      |             ^~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:420:2: note: in expansion of macro 'SPI_DT_SPEC_GET'
  420 |  SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
      |  ^~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:178:9: note: in expansion of macro 'SPI_DT_SPEC_INST_GET'
  178 |  .bus = SPI_DT_SPEC_INST_GET(0, SPI_WORD_SET(8) | SPI_TRANSFER_MSB, 0),
      |         ^~~~~~~~~~~~~~~~~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/arch/xtensa/arch.h:18,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/arch/cpu.h:27,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/kernel_includes.h:33,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/kernel.h:17,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/init.h:11,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:29,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:23,
                 from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:8:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:305:40: error: 'DT_N_INST_0_DT_DRV_COMPAT_P_spi_max_frequency' undeclared here (not in a function)
  305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
      |                                        ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:3043:24: note: in definition of macro 'DT_CAT'
 3043 | #define DT_CAT(a1, a2) a1 ## a2
      |                        ^~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:341:16: note: in expansion of macro 'DT_PROP'
  341 |   .frequency = DT_PROP(node_id, spi_max_frequency), \
      |                ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:403:13: note: in expansion of macro 'SPI_CONFIG_DT'
  403 |   .config = SPI_CONFIG_DT(node_id, operation_, delay_) \
      |             ^~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:420:2: note: in expansion of macro 'SPI_DT_SPEC_GET'
  420 |  SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
      |  ^~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:98:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
   98 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
      |                          ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:305:31: note: in expansion of macro 'UTIL_CAT'
  305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
      |                               ^~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:2400:27: note: in expansion of macro 'DT_INST'
 2400 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
      |                           ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:420:18: note: in expansion of macro 'DT_DRV_INST'
  420 |  SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
      |                  ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:178:9: note: in expansion of macro 'SPI_DT_SPEC_INST_GET'
  178 |  .bus = SPI_DT_SPEC_INST_GET(0, SPI_WORD_SET(8) | SPI_TRANSFER_MSB, 0),
      |         ^~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:305:40: error: 'DT_N_INST_0_DT_DRV_COMPAT_P_duplex' undeclared here (not in a function)
  305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
      |                                        ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:3043:24: note: in definition of macro 'DT_CAT'
 3043 | #define DT_CAT(a1, a2) a1 ## a2
      |                        ^~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:343:4: note: in expansion of macro 'DT_PROP'
  343 |    DT_PROP(node_id, duplex) |   \
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:403:13: note: in expansion of macro 'SPI_CONFIG_DT'
  403 |   .config = SPI_CONFIG_DT(node_id, operation_, delay_) \
      |             ^~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:420:2: note: in expansion of macro 'SPI_DT_SPEC_GET'
  420 |  SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
      |  ^~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:98:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
   98 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
      |                          ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:305:31: note: in expansion of macro 'UTIL_CAT'
  305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
      |                               ^~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:2400:27: note: in expansion of macro 'DT_INST'
 2400 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
      |                           ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:420:18: note: in expansion of macro 'DT_DRV_INST'
  420 |  SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
      |                  ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:178:9: note: in expansion of macro 'SPI_DT_SPEC_INST_GET'
  178 |  .bus = SPI_DT_SPEC_INST_GET(0, SPI_WORD_SET(8) | SPI_TRANSFER_MSB, 0),
      |         ^~~~~~~~~~~~~~~~~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:10:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:342:29: error: invalid operands to binary | (have 'unsigned int' and 'const struct gpio_dt_spec *')
  342 |   .operation = (operation_) |    \
      |                             ^
      |                             |
      |                             const struct gpio_dt_spec *
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:403:13: note: in expansion of macro 'SPI_CONFIG_DT'
  403 |   .config = SPI_CONFIG_DT(node_id, operation_, delay_) \
      |             ^~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:420:2: note: in expansion of macro 'SPI_DT_SPEC_GET'
  420 |  SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
      |  ^~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:178:9: note: in expansion of macro 'SPI_DT_SPEC_INST_GET'
  178 |  .bus = SPI_DT_SPEC_INST_GET(0, SPI_WORD_SET(8) | SPI_TRANSFER_MSB, 0),
      |         ^~~~~~~~~~~~~~~~~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/arch/xtensa/arch.h:18,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/arch/cpu.h:27,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/kernel_includes.h:33,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/kernel.h:17,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/init.h:11,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:29,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:23,
                 from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:8:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:305:40: error: 'DT_N_INST_0_DT_DRV_COMPAT_P_frame_format' undeclared here (not in a function)
  305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
      |                                        ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:3043:24: note: in definition of macro 'DT_CAT'
 3043 | #define DT_CAT(a1, a2) a1 ## a2
      |                        ^~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:344:4: note: in expansion of macro 'DT_PROP'
  344 |    DT_PROP(node_id, frame_format),   \
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:403:13: note: in expansion of macro 'SPI_CONFIG_DT'
  403 |   .config = SPI_CONFIG_DT(node_id, operation_, delay_) \
      |             ^~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:420:2: note: in expansion of macro 'SPI_DT_SPEC_GET'
  420 |  SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
      |  ^~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:98:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
   98 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
      |                          ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:305:31: note: in expansion of macro 'UTIL_CAT'
  305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
      |                               ^~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:2400:27: note: in expansion of macro 'DT_INST'
 2400 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
      |                           ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:420:18: note: in expansion of macro 'DT_DRV_INST'
  420 |  SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
      |                  ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:178:9: note: in expansion of macro 'SPI_DT_SPEC_INST_GET'
  178 |  .bus = SPI_DT_SPEC_INST_GET(0, SPI_WORD_SET(8) | SPI_TRANSFER_MSB, 0),
      |         ^~~~~~~~~~~~~~~~~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:10:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:343:29: error: invalid operands to binary | (have 'const struct gpio_dt_spec *' and 'const struct gpio_dt_spec *')
  342 |   .operation = (operation_) |    \
      |                ~             
      |                |
      |                const struct gpio_dt_spec *
  343 |    DT_PROP(node_id, duplex) |   \
      |                             ^
      |                             |
      |                             const struct gpio_dt_spec *
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:403:13: note: in expansion of macro 'SPI_CONFIG_DT'
  403 |   .config = SPI_CONFIG_DT(node_id, operation_, delay_) \
      |             ^~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:420:2: note: in expansion of macro 'SPI_DT_SPEC_GET'
  420 |  SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
      |  ^~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:178:9: note: in expansion of macro 'SPI_DT_SPEC_INST_GET'
  178 |  .bus = SPI_DT_SPEC_INST_GET(0, SPI_WORD_SET(8) | SPI_TRANSFER_MSB, 0),
      |         ^~~~~~~~~~~~~~~~~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/arch/xtensa/arch.h:18,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/arch/cpu.h:27,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/kernel_includes.h:33,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/kernel.h:17,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/init.h:11,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:29,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:23,
                 from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:8:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:305:40: error: 'DT_N_INST_0_DT_DRV_COMPAT_REG_IDX_0_VAL_ADDRESS' undeclared here (not in a function); did you mean 'DT_N_S_cpus_S_cpu_0_REG_IDX_0_VAL_ADDRESS'?
  305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
      |                                        ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:3043:24: note: in definition of macro 'DT_CAT'
 3043 | #define DT_CAT(a1, a2) a1 ## a2
      |                        ^~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:1683:30: note: in expansion of macro 'DT_REG_ADDR_BY_IDX'
 1683 | #define DT_REG_ADDR(node_id) DT_REG_ADDR_BY_IDX(node_id, 0)
      |                              ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:345:12: note: in expansion of macro 'DT_REG_ADDR'
  345 |   .slave = DT_REG_ADDR(node_id),    \
      |            ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:403:13: note: in expansion of macro 'SPI_CONFIG_DT'
  403 |   .config = SPI_CONFIG_DT(node_id, operation_, delay_) \
      |             ^~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:420:2: note: in expansion of macro 'SPI_DT_SPEC_GET'
  420 |  SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
      |  ^~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:98:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
   98 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
      |                          ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:305:31: note: in expansion of macro 'UTIL_CAT'
  305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
      |                               ^~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:2400:27: note: in expansion of macro 'DT_INST'
 2400 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
      |                           ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:420:18: note: in expansion of macro 'DT_DRV_INST'
  420 |  SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
      |                  ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:178:9: note: in expansion of macro 'SPI_DT_SPEC_INST_GET'
  178 |  .bus = SPI_DT_SPEC_INST_GET(0, SPI_WORD_SET(8) | SPI_TRANSFER_MSB, 0),
      |         ^~~~~~~~~~~~~~~~~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:10:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:401:2: warning: excess elements in struct initializer
  401 |  {            \
      |  ^
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:420:2: note: in expansion of macro 'SPI_DT_SPEC_GET'
  420 |  SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
      |  ^~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:178:9: note: in expansion of macro 'SPI_DT_SPEC_INST_GET'
  178 |  .bus = SPI_DT_SPEC_INST_GET(0, SPI_WORD_SET(8) | SPI_TRANSFER_MSB, 0),
      |         ^~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:401:2: note: (near initialization for 'dev_config')
  401 |  {            \
      |  ^
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:420:2: note: in expansion of macro 'SPI_DT_SPEC_GET'
  420 |  SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
      |  ^~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:178:9: note: in expansion of macro 'SPI_DT_SPEC_INST_GET'
  178 |  .bus = SPI_DT_SPEC_INST_GET(0, SPI_WORD_SET(8) | SPI_TRANSFER_MSB, 0),
      |         ^~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:179:3: error: 'const struct sx127x_config' has no member named 'reset'
  179 |  .reset = GPIO_DT_SPEC_INST_GET(0, reset_gpios),
      |   ^~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:8:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:337:2: error: extra brace group at end of initializer
  337 |  {               \
      |  ^
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:400:2: note: in expansion of macro 'GPIO_DT_SPEC_GET_BY_IDX'
  400 |  GPIO_DT_SPEC_GET_BY_IDX(DT_DRV_INST(inst), prop, idx)
      |  ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:425:2: note: in expansion of macro 'GPIO_DT_SPEC_INST_GET_BY_IDX'
  425 |  GPIO_DT_SPEC_INST_GET_BY_IDX(inst, prop, 0)
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:179:11: note: in expansion of macro 'GPIO_DT_SPEC_INST_GET'
  179 |  .reset = GPIO_DT_SPEC_INST_GET(0, reset_gpios),
      |           ^~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:337:2: note: (near initialization for 'dev_config')
  337 |  {               \
      |  ^
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:400:2: note: in expansion of macro 'GPIO_DT_SPEC_GET_BY_IDX'
  400 |  GPIO_DT_SPEC_GET_BY_IDX(DT_DRV_INST(inst), prop, idx)
      |  ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:425:2: note: in expansion of macro 'GPIO_DT_SPEC_INST_GET_BY_IDX'
  425 |  GPIO_DT_SPEC_INST_GET_BY_IDX(inst, prop, 0)
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:179:11: note: in expansion of macro 'GPIO_DT_SPEC_INST_GET'
  179 |  .reset = GPIO_DT_SPEC_INST_GET(0, reset_gpios),
      |           ^~~~~~~~~~~~~~~~~~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/toolchain/gcc.h:88,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/toolchain.h:50,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/__assert.h:11,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:18,
                 from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:8:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:96:39: error: '__device_dts_ord_DT_N_INST_0_DT_DRV_COMPAT_P_reset_gpios_IDX_0_PH_ORD' undeclared here (not in a function)
   96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
      |                                       ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
  132 | #define _DO_CONCAT(x, y) x ## y
      |                          ^
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:96:31: note: in expansion of macro '_CONCAT'
   96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
      |                               ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:291:37: note: in expansion of macro 'DEVICE_NAME_GET'
  291 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_NAME(node_id))
      |                                     ^~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:311:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
  311 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
      |                                  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:338:11: note: in expansion of macro 'DEVICE_DT_GET'
  338 |   .port = DEVICE_DT_GET(DT_GPIO_CTLR_BY_IDX(node_id, prop, idx)),\
      |           ^~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:400:2: note: in expansion of macro 'GPIO_DT_SPEC_GET_BY_IDX'
  400 |  GPIO_DT_SPEC_GET_BY_IDX(DT_DRV_INST(inst), prop, idx)
      |  ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:425:2: note: in expansion of macro 'GPIO_DT_SPEC_INST_GET_BY_IDX'
  425 |  GPIO_DT_SPEC_INST_GET_BY_IDX(inst, prop, 0)
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:179:11: note: in expansion of macro 'GPIO_DT_SPEC_INST_GET'
  179 |  .reset = GPIO_DT_SPEC_INST_GET(0, reset_gpios),
      |           ^~~~~~~~~~~~~~~~~~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/arch/xtensa/arch.h:18,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/arch/cpu.h:27,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/kernel_includes.h:33,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/kernel.h:17,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/init.h:11,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:29,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:23,
                 from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:8:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:305:40: error: 'DT_N_INST_0_DT_DRV_COMPAT_P_reset_gpios_IDX_0_VAL_pin' undeclared here (not in a function)
  305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
      |                                        ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:3043:24: note: in definition of macro 'DT_CAT'
 3043 | #define DT_CAT(a1, a2) a1 ## a2
      |                        ^~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:1049:2: note: in expansion of macro 'DT_PROP'
 1049 |  DT_PROP(node_id, pha##_IDX_##idx##_VAL_##cell)
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree/gpio.h:158:2: note: in expansion of macro 'DT_PHA_BY_IDX'
  158 |  DT_PHA_BY_IDX(node_id, gpio_pha, idx, pin)
      |  ^~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:339:10: note: in expansion of macro 'DT_GPIO_PIN_BY_IDX'
  339 |   .pin = DT_GPIO_PIN_BY_IDX(node_id, prop, idx),         \
      |          ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:400:2: note: in expansion of macro 'GPIO_DT_SPEC_GET_BY_IDX'
  400 |  GPIO_DT_SPEC_GET_BY_IDX(DT_DRV_INST(inst), prop, idx)
      |  ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:98:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
   98 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
      |                          ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:305:31: note: in expansion of macro 'UTIL_CAT'
  305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
      |                               ^~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:2400:27: note: in expansion of macro 'DT_INST'
 2400 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
      |                           ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:400:26: note: in expansion of macro 'DT_DRV_INST'
  400 |  GPIO_DT_SPEC_GET_BY_IDX(DT_DRV_INST(inst), prop, idx)
      |                          ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:425:2: note: in expansion of macro 'GPIO_DT_SPEC_INST_GET_BY_IDX'
  425 |  GPIO_DT_SPEC_INST_GET_BY_IDX(inst, prop, 0)
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:179:11: note: in expansion of macro 'GPIO_DT_SPEC_INST_GET'
  179 |  .reset = GPIO_DT_SPEC_INST_GET(0, reset_gpios),
      |           ^~~~~~~~~~~~~~~~~~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:8:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:337:2: warning: excess elements in struct initializer
  337 |  {               \
      |  ^
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:400:2: note: in expansion of macro 'GPIO_DT_SPEC_GET_BY_IDX'
  400 |  GPIO_DT_SPEC_GET_BY_IDX(DT_DRV_INST(inst), prop, idx)
      |  ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:425:2: note: in expansion of macro 'GPIO_DT_SPEC_INST_GET_BY_IDX'
  425 |  GPIO_DT_SPEC_INST_GET_BY_IDX(inst, prop, 0)
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:179:11: note: in expansion of macro 'GPIO_DT_SPEC_INST_GET'
  179 |  .reset = GPIO_DT_SPEC_INST_GET(0, reset_gpios),
      |           ^~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:337:2: note: (near initialization for 'dev_config')
  337 |  {               \
      |  ^
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:400:2: note: in expansion of macro 'GPIO_DT_SPEC_GET_BY_IDX'
  400 |  GPIO_DT_SPEC_GET_BY_IDX(DT_DRV_INST(inst), prop, idx)
      |  ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:425:2: note: in expansion of macro 'GPIO_DT_SPEC_INST_GET_BY_IDX'
  425 |  GPIO_DT_SPEC_INST_GET_BY_IDX(inst, prop, 0)
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:179:11: note: in expansion of macro 'GPIO_DT_SPEC_INST_GET'
  179 |  .reset = GPIO_DT_SPEC_INST_GET(0, reset_gpios),
      |           ^~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c: In function 'SX127xSetAntSw':
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:300:7: error: 'RFLR_OPMODE_TRANSMITTER' undeclared (first use in this function)
  300 |  case RFLR_OPMODE_TRANSMITTER:
      |       ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:300:7: note: each undeclared identifier is reported only once for each function it appears in
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:303:7: warning: implicit declaration of function 'SX127X_PA_OUTPUT'; did you mean 'SX127X_PA_BOOST'? [-Wimplicit-function-declaration]
  303 |   if (SX127X_PA_OUTPUT(dev_data.tx_power) == SX127X_PA_BOOST) {
      |       ^~~~~~~~~~~~~~~~
      |       SX127X_PA_BOOST
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:303:32: error: 'struct sx127x_data' has no member named 'tx_power'
  303 |   if (SX127X_PA_OUTPUT(dev_data.tx_power) == SX127X_PA_BOOST) {
      |                                ^
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c: In function 'SX127xReset':
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:323:29: error: 'const struct sx127x_config' has no member named 'reset'
  323 |  gpio_pin_set_dt(&dev_config.reset, 1);
      |                             ^
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:323:18: warning: passing argument 1 of 'gpio_pin_set_dt' from incompatible pointer type [-Wincompatible-pointer-types]
  323 |  gpio_pin_set_dt(&dev_config.reset, 1);
      |                  ^~~~~~~~~~~~~~~~~
      |                  |
      |                  const struct gpio_dt_spec (*)[1]
In file included from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:8:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:1191:62: note: expected 'const struct gpio_dt_spec *' but argument is of type 'const struct gpio_dt_spec (*)[1]'
 1191 | static inline int gpio_pin_set_dt(const struct gpio_dt_spec *spec, int value)
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:327:29: error: 'const struct sx127x_config' has no member named 'reset'
  327 |  gpio_pin_set_dt(&dev_config.reset, 0);
      |                             ^
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:327:18: warning: passing argument 1 of 'gpio_pin_set_dt' from incompatible pointer type [-Wincompatible-pointer-types]
  327 |  gpio_pin_set_dt(&dev_config.reset, 0);
      |                  ^~~~~~~~~~~~~~~~~
      |                  |
      |                  const struct gpio_dt_spec (*)[1]
In file included from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:8:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:1191:62: note: expected 'const struct gpio_dt_spec *' but argument is of type 'const struct gpio_dt_spec (*)[1]'
 1191 | static inline int gpio_pin_set_dt(const struct gpio_dt_spec *spec, int value)
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c: In function 'sx127x_dio_work_handle':
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:336:3: error: called object is not a function or function pointer
  336 |  (*DioIrq[dio])(NULL);
      |  ~^~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:336:2: warning: statement with no effect [-Wunused-value]
  336 |  (*DioIrq[dio])(NULL);
      |  ^
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c: At top level:
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:354:22: error: unknown type name 'DioIrqHandler'
  354 | void SX127xIoIrqInit(DioIrqHandler **irqHandlers)
      |                      ^~~~~~~~~~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg.h:12,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:9,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:11,
                 from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:15:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:396:2: error: expected end of line before 'push'
  396 |  _Pragma("GCC diagnostic push") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:366:4: note: in expansion of macro 'LOG_ERR'
  366 |    LOG_ERR("GPIO port %s not ready",
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:397:2: error: expected end of line before 'ignored'
  397 |  _Pragma("GCC diagnostic ignored \"-Wpointer-arith\"") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:366:4: note: in expansion of macro 'LOG_ERR'
  366 |    LOG_ERR("GPIO port %s not ready",
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:399:2: error: expected end of line before 'pop'
  399 |  _Pragma("GCC diagnostic pop") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:366:4: note: in expansion of macro 'LOG_ERR'
  366 |    LOG_ERR("GPIO port %s not ready",
      |    ^~~~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf.h:34,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:11,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg.h:12,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:9,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:11,
                 from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:15:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:142:2: error: expected end of line before 'push'
  142 |  _Pragma("GCC diagnostic push") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf.h:214:2: note: in expansion of macro 'Z_CBPRINTF_MUST_RUNTIME_PACKAGE'
  214 |  Z_CBPRINTF_MUST_RUNTIME_PACKAGE(flags, __VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:357:20: note: in expansion of macro 'CBPRINTF_MUST_RUNTIME_PACKAGE'
  357 |  bool has_rw_str = CBPRINTF_MUST_RUNTIME_PACKAGE( \
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:400:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE3'
  400 |  Z_LOG_MSG2_CREATE3(_try_0cpy, _mode,  _cstr_cnt, _domain_id, _source,\
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:366:4: note: in expansion of macro 'LOG_ERR'
  366 |    LOG_ERR("GPIO port %s not ready",
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:143:2: error: expected end of line before 'ignored'
  143 |  _Pragma("GCC diagnostic ignored \"-Wpointer-arith\"") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf.h:214:2: note: in expansion of macro 'Z_CBPRINTF_MUST_RUNTIME_PACKAGE'
  214 |  Z_CBPRINTF_MUST_RUNTIME_PACKAGE(flags, __VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:357:20: note: in expansion of macro 'CBPRINTF_MUST_RUNTIME_PACKAGE'
  357 |  bool has_rw_str = CBPRINTF_MUST_RUNTIME_PACKAGE( \
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:400:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE3'
  400 |  Z_LOG_MSG2_CREATE3(_try_0cpy, _mode,  _cstr_cnt, _domain_id, _source,\
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:366:4: note: in expansion of macro 'LOG_ERR'
  366 |    LOG_ERR("GPIO port %s not ready",
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:150:2: error: expected end of line before 'pop'
  150 |  _Pragma("GCC diagnostic pop")\
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf.h:214:2: note: in expansion of macro 'Z_CBPRINTF_MUST_RUNTIME_PACKAGE'
  214 |  Z_CBPRINTF_MUST_RUNTIME_PACKAGE(flags, __VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:357:20: note: in expansion of macro 'CBPRINTF_MUST_RUNTIME_PACKAGE'
  357 |  bool has_rw_str = CBPRINTF_MUST_RUNTIME_PACKAGE( \
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:400:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE3'
  400 |  Z_LOG_MSG2_CREATE3(_try_0cpy, _mode,  _cstr_cnt, _domain_id, _source,\
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:366:4: note: in expansion of macro 'LOG_ERR'
  366 |    LOG_ERR("GPIO port %s not ready",
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:406:2: error: expected end of line before 'push'
  406 |  _Pragma("GCC diagnostic push") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:490:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE_GENERIC'
  490 |  Z_CBPRINTF_STATIC_PACKAGE_GENERIC(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf.h:247:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE'
  247 |  Z_CBPRINTF_STATIC_PACKAGE(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:211:3: note: in expansion of macro 'CBPRINTF_STATIC_PACKAGE'
  211 |   CBPRINTF_STATIC_PACKAGE(NULL, 0, _plen, Z_LOG_MSG2_ALIGN_OFFSET, flags, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:367:3: note: in expansion of macro 'Z_LOG_MSG2_STACK_CREATE'
  367 |   Z_LOG_MSG2_STACK_CREATE(_cstr_cnt, _domain_id, _source, _level, _data, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:400:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE3'
  400 |  Z_LOG_MSG2_CREATE3(_try_0cpy, _mode,  _cstr_cnt, _domain_id, _source,\
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:366:4: note: in expansion of macro 'LOG_ERR'
  366 |    LOG_ERR("GPIO port %s not ready",
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:407:2: error: expected end of line before 'ignored'
  407 |  _Pragma("GCC diagnostic ignored \"-Wpointer-arith\"") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:490:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE_GENERIC'
  490 |  Z_CBPRINTF_STATIC_PACKAGE_GENERIC(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf.h:247:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE'
  247 |  Z_CBPRINTF_STATIC_PACKAGE(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:211:3: note: in expansion of macro 'CBPRINTF_STATIC_PACKAGE'
  211 |   CBPRINTF_STATIC_PACKAGE(NULL, 0, _plen, Z_LOG_MSG2_ALIGN_OFFSET, flags, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:367:3: note: in expansion of macro 'Z_LOG_MSG2_STACK_CREATE'
  367 |   Z_LOG_MSG2_STACK_CREATE(_cstr_cnt, _domain_id, _source, _level, _data, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:400:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE3'
  400 |  Z_LOG_MSG2_CREATE3(_try_0cpy, _mode,  _cstr_cnt, _domain_id, _source,\
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:366:4: note: in expansion of macro 'LOG_ERR'
  366 |    LOG_ERR("GPIO port %s not ready",
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:484:2: error: expected end of line before 'pop'
  484 |  _Pragma("GCC diagnostic pop") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:490:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE_GENERIC'
  490 |  Z_CBPRINTF_STATIC_PACKAGE_GENERIC(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf.h:247:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE'
  247 |  Z_CBPRINTF_STATIC_PACKAGE(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:211:3: note: in expansion of macro 'CBPRINTF_STATIC_PACKAGE'
  211 |   CBPRINTF_STATIC_PACKAGE(NULL, 0, _plen, Z_LOG_MSG2_ALIGN_OFFSET, flags, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:367:3: note: in expansion of macro 'Z_LOG_MSG2_STACK_CREATE'
  367 |   Z_LOG_MSG2_STACK_CREATE(_cstr_cnt, _domain_id, _source, _level, _data, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:400:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE3'
  400 |  Z_LOG_MSG2_CREATE3(_try_0cpy, _mode,  _cstr_cnt, _domain_id, _source,\
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:366:4: note: in expansion of macro 'LOG_ERR'
  366 |    LOG_ERR("GPIO port %s not ready",
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:406:2: error: expected end of line before 'push'
  406 |  _Pragma("GCC diagnostic push") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:490:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE_GENERIC'
  490 |  Z_CBPRINTF_STATIC_PACKAGE_GENERIC(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf.h:247:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE'
  247 |  Z_CBPRINTF_STATIC_PACKAGE(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:217:3: note: in expansion of macro 'CBPRINTF_STATIC_PACKAGE'
  217 |   CBPRINTF_STATIC_PACKAGE(_msg->data, _plen, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:367:3: note: in expansion of macro 'Z_LOG_MSG2_STACK_CREATE'
  367 |   Z_LOG_MSG2_STACK_CREATE(_cstr_cnt, _domain_id, _source, _level, _data, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:400:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE3'
  400 |  Z_LOG_MSG2_CREATE3(_try_0cpy, _mode,  _cstr_cnt, _domain_id, _source,\
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:366:4: note: in expansion of macro 'LOG_ERR'
  366 |    LOG_ERR("GPIO port %s not ready",
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:407:2: error: expected end of line before 'ignored'
  407 |  _Pragma("GCC diagnostic ignored \"-Wpointer-arith\"") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:490:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE_GENERIC'
  490 |  Z_CBPRINTF_STATIC_PACKAGE_GENERIC(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf.h:247:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE'
  247 |  Z_CBPRINTF_STATIC_PACKAGE(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:217:3: note: in expansion of macro 'CBPRINTF_STATIC_PACKAGE'
  217 |   CBPRINTF_STATIC_PACKAGE(_msg->data, _plen, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:367:3: note: in expansion of macro 'Z_LOG_MSG2_STACK_CREATE'
  367 |   Z_LOG_MSG2_STACK_CREATE(_cstr_cnt, _domain_id, _source, _level, _data, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:400:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE3'
  400 |  Z_LOG_MSG2_CREATE3(_try_0cpy, _mode,  _cstr_cnt, _domain_id, _source,\
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:366:4: note: in expansion of macro 'LOG_ERR'
  366 |    LOG_ERR("GPIO port %s not ready",
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:484:2: error: expected end of line before 'pop'
  484 |  _Pragma("GCC diagnostic pop") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:490:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE_GENERIC'
  490 |  Z_CBPRINTF_STATIC_PACKAGE_GENERIC(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf.h:247:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE'
  247 |  Z_CBPRINTF_STATIC_PACKAGE(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:217:3: note: in expansion of macro 'CBPRINTF_STATIC_PACKAGE'
  217 |   CBPRINTF_STATIC_PACKAGE(_msg->data, _plen, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:367:3: note: in expansion of macro 'Z_LOG_MSG2_STACK_CREATE'
  367 |   Z_LOG_MSG2_STACK_CREATE(_cstr_cnt, _domain_id, _source, _level, _data, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:400:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE3'
  400 |  Z_LOG_MSG2_CREATE3(_try_0cpy, _mode,  _cstr_cnt, _domain_id, _source,\
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:366:4: note: in expansion of macro 'LOG_ERR'
  366 |    LOG_ERR("GPIO port %s not ready",
      |    ^~~~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg.h:12,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:9,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:11,
                 from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:15:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:396:2: error: expected end of line before 'push'
  396 |  _Pragma("GCC diagnostic push") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:380:4: note: in expansion of macro 'LOG_ERR'
  380 |    LOG_ERR("Could not set gpio callback.");
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:397:2: error: expected end of line before 'ignored'
  397 |  _Pragma("GCC diagnostic ignored \"-Wpointer-arith\"") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:380:4: note: in expansion of macro 'LOG_ERR'
  380 |    LOG_ERR("Could not set gpio callback.");
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:399:2: error: expected end of line before 'pop'
  399 |  _Pragma("GCC diagnostic pop") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:380:4: note: in expansion of macro 'LOG_ERR'
  380 |    LOG_ERR("Could not set gpio callback.");
      |    ^~~~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf.h:34,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:11,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg.h:12,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:9,
                 from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:11,
                 from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:15:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:142:2: error: expected end of line before 'push'
  142 |  _Pragma("GCC diagnostic push") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf.h:214:2: note: in expansion of macro 'Z_CBPRINTF_MUST_RUNTIME_PACKAGE'
  214 |  Z_CBPRINTF_MUST_RUNTIME_PACKAGE(flags, __VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:357:20: note: in expansion of macro 'CBPRINTF_MUST_RUNTIME_PACKAGE'
  357 |  bool has_rw_str = CBPRINTF_MUST_RUNTIME_PACKAGE( \
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:400:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE3'
  400 |  Z_LOG_MSG2_CREATE3(_try_0cpy, _mode,  _cstr_cnt, _domain_id, _source,\
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:380:4: note: in expansion of macro 'LOG_ERR'
  380 |    LOG_ERR("Could not set gpio callback.");
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:143:2: error: expected end of line before 'ignored'
  143 |  _Pragma("GCC diagnostic ignored \"-Wpointer-arith\"") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf.h:214:2: note: in expansion of macro 'Z_CBPRINTF_MUST_RUNTIME_PACKAGE'
  214 |  Z_CBPRINTF_MUST_RUNTIME_PACKAGE(flags, __VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:357:20: note: in expansion of macro 'CBPRINTF_MUST_RUNTIME_PACKAGE'
  357 |  bool has_rw_str = CBPRINTF_MUST_RUNTIME_PACKAGE( \
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:400:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE3'
  400 |  Z_LOG_MSG2_CREATE3(_try_0cpy, _mode,  _cstr_cnt, _domain_id, _source,\
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:380:4: note: in expansion of macro 'LOG_ERR'
  380 |    LOG_ERR("Could not set gpio callback.");
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:150:2: error: expected end of line before 'pop'
  150 |  _Pragma("GCC diagnostic pop")\
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf.h:214:2: note: in expansion of macro 'Z_CBPRINTF_MUST_RUNTIME_PACKAGE'
  214 |  Z_CBPRINTF_MUST_RUNTIME_PACKAGE(flags, __VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:357:20: note: in expansion of macro 'CBPRINTF_MUST_RUNTIME_PACKAGE'
  357 |  bool has_rw_str = CBPRINTF_MUST_RUNTIME_PACKAGE( \
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:400:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE3'
  400 |  Z_LOG_MSG2_CREATE3(_try_0cpy, _mode,  _cstr_cnt, _domain_id, _source,\
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:380:4: note: in expansion of macro 'LOG_ERR'
  380 |    LOG_ERR("Could not set gpio callback.");
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:406:2: error: expected end of line before 'push'
  406 |  _Pragma("GCC diagnostic push") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:490:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE_GENERIC'
  490 |  Z_CBPRINTF_STATIC_PACKAGE_GENERIC(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf.h:247:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE'
  247 |  Z_CBPRINTF_STATIC_PACKAGE(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:211:3: note: in expansion of macro 'CBPRINTF_STATIC_PACKAGE'
  211 |   CBPRINTF_STATIC_PACKAGE(NULL, 0, _plen, Z_LOG_MSG2_ALIGN_OFFSET, flags, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:367:3: note: in expansion of macro 'Z_LOG_MSG2_STACK_CREATE'
  367 |   Z_LOG_MSG2_STACK_CREATE(_cstr_cnt, _domain_id, _source, _level, _data, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:400:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE3'
  400 |  Z_LOG_MSG2_CREATE3(_try_0cpy, _mode,  _cstr_cnt, _domain_id, _source,\
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:380:4: note: in expansion of macro 'LOG_ERR'
  380 |    LOG_ERR("Could not set gpio callback.");
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:407:2: error: expected end of line before 'ignored'
  407 |  _Pragma("GCC diagnostic ignored \"-Wpointer-arith\"") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:490:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE_GENERIC'
  490 |  Z_CBPRINTF_STATIC_PACKAGE_GENERIC(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf.h:247:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE'
  247 |  Z_CBPRINTF_STATIC_PACKAGE(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:211:3: note: in expansion of macro 'CBPRINTF_STATIC_PACKAGE'
  211 |   CBPRINTF_STATIC_PACKAGE(NULL, 0, _plen, Z_LOG_MSG2_ALIGN_OFFSET, flags, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:367:3: note: in expansion of macro 'Z_LOG_MSG2_STACK_CREATE'
  367 |   Z_LOG_MSG2_STACK_CREATE(_cstr_cnt, _domain_id, _source, _level, _data, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:400:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE3'
  400 |  Z_LOG_MSG2_CREATE3(_try_0cpy, _mode,  _cstr_cnt, _domain_id, _source,\
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:380:4: note: in expansion of macro 'LOG_ERR'
  380 |    LOG_ERR("Could not set gpio callback.");
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:484:2: error: expected end of line before 'pop'
  484 |  _Pragma("GCC diagnostic pop") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:490:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE_GENERIC'
  490 |  Z_CBPRINTF_STATIC_PACKAGE_GENERIC(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf.h:247:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE'
  247 |  Z_CBPRINTF_STATIC_PACKAGE(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:211:3: note: in expansion of macro 'CBPRINTF_STATIC_PACKAGE'
  211 |   CBPRINTF_STATIC_PACKAGE(NULL, 0, _plen, Z_LOG_MSG2_ALIGN_OFFSET, flags, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:367:3: note: in expansion of macro 'Z_LOG_MSG2_STACK_CREATE'
  367 |   Z_LOG_MSG2_STACK_CREATE(_cstr_cnt, _domain_id, _source, _level, _data, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:400:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE3'
  400 |  Z_LOG_MSG2_CREATE3(_try_0cpy, _mode,  _cstr_cnt, _domain_id, _source,\
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:380:4: note: in expansion of macro 'LOG_ERR'
  380 |    LOG_ERR("Could not set gpio callback.");
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:406:2: error: expected end of line before 'push'
  406 |  _Pragma("GCC diagnostic push") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:490:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE_GENERIC'
  490 |  Z_CBPRINTF_STATIC_PACKAGE_GENERIC(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf.h:247:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE'
  247 |  Z_CBPRINTF_STATIC_PACKAGE(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:217:3: note: in expansion of macro 'CBPRINTF_STATIC_PACKAGE'
  217 |   CBPRINTF_STATIC_PACKAGE(_msg->data, _plen, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:367:3: note: in expansion of macro 'Z_LOG_MSG2_STACK_CREATE'
  367 |   Z_LOG_MSG2_STACK_CREATE(_cstr_cnt, _domain_id, _source, _level, _data, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:400:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE3'
  400 |  Z_LOG_MSG2_CREATE3(_try_0cpy, _mode,  _cstr_cnt, _domain_id, _source,\
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:380:4: note: in expansion of macro 'LOG_ERR'
  380 |    LOG_ERR("Could not set gpio callback.");
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:407:2: error: expected end of line before 'ignored'
  407 |  _Pragma("GCC diagnostic ignored \"-Wpointer-arith\"") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:490:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE_GENERIC'
  490 |  Z_CBPRINTF_STATIC_PACKAGE_GENERIC(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf.h:247:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE'
  247 |  Z_CBPRINTF_STATIC_PACKAGE(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:217:3: note: in expansion of macro 'CBPRINTF_STATIC_PACKAGE'
  217 |   CBPRINTF_STATIC_PACKAGE(_msg->data, _plen, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:367:3: note: in expansion of macro 'Z_LOG_MSG2_STACK_CREATE'
  367 |   Z_LOG_MSG2_STACK_CREATE(_cstr_cnt, _domain_id, _source, _level, _data, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:400:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE3'
  400 |  Z_LOG_MSG2_CREATE3(_try_0cpy, _mode,  _cstr_cnt, _domain_id, _source,\
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:380:4: note: in expansion of macro 'LOG_ERR'
  380 |    LOG_ERR("Could not set gpio callback.");
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:484:2: error: expected end of line before 'pop'
  484 |  _Pragma("GCC diagnostic pop") \
      |  ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf_internal.h:490:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE_GENERIC'
  490 |  Z_CBPRINTF_STATIC_PACKAGE_GENERIC(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/cbprintf.h:247:2: note: in expansion of macro 'Z_CBPRINTF_STATIC_PACKAGE'
  247 |  Z_CBPRINTF_STATIC_PACKAGE(packaged, inlen, outlen, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:217:3: note: in expansion of macro 'CBPRINTF_STATIC_PACKAGE'
  217 |   CBPRINTF_STATIC_PACKAGE(_msg->data, _plen, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:367:3: note: in expansion of macro 'Z_LOG_MSG2_STACK_CREATE'
  367 |   Z_LOG_MSG2_STACK_CREATE(_cstr_cnt, _domain_id, _source, _level, _data, \
      |   ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:400:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE3'
  400 |  Z_LOG_MSG2_CREATE3(_try_0cpy, _mode,  _cstr_cnt, _domain_id, _source,\
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_msg2.h:411:2: note: in expansion of macro 'Z_LOG_MSG2_CREATE2'
  411 |  Z_LOG_MSG2_CREATE2(_try_0cpy, _mode, UTIL_CAT(Z_LOG_FUNC_PREFIX_, _level), \
      |  ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:347:3: note: in expansion of macro 'Z_LOG_MSG2_CREATE'
  347 |   Z_LOG_MSG2_CREATE(UTIL_NOT(IS_ENABLED(CONFIG_USERSPACE)), _mode, \
      |   ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log_core.h:363:2: note: in expansion of macro 'Z_LOG2'
  363 |  Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/logging/log.h:40:25: note: in expansion of macro 'Z_LOG'
   40 | #define LOG_ERR(...)    Z_LOG(LOG_LEVEL_ERR, __VA_ARGS__)
      |                         ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:380:4: note: in expansion of macro 'LOG_ERR'
  380 |    LOG_ERR("Could not set gpio callback.");
      |    ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c: In function 'sx127x_transceive':
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:413:39: error: 'const struct sx127x_config' has no member named 'bus'
  413 |   return spi_transceive_dt(&dev_config.bus, &tx, &rx);
      |                                       ^
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:413:28: warning: passing argument 1 of 'spi_transceive_dt' from incompatible pointer type [-Wincompatible-pointer-types]
  413 |   return spi_transceive_dt(&dev_config.bus, &tx, &rx);
      |                            ^~~~~~~~~~~~~~~
      |                            |
      |                            const struct gpio_dt_spec (*)[1]
In file included from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:10:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:560:63: note: expected 'const struct spi_dt_spec *' but argument is of type 'const struct gpio_dt_spec (*)[1]'
  560 | static inline int spi_transceive_dt(const struct spi_dt_spec *spec,
      |                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:416:33: error: 'const struct sx127x_config' has no member named 'bus'
  416 |  return spi_write_dt(&dev_config.bus, &tx);
      |                                 ^
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:416:22: warning: passing argument 1 of 'spi_write_dt' from incompatible pointer type [-Wincompatible-pointer-types]
  416 |  return spi_write_dt(&dev_config.bus, &tx);
      |                      ^~~~~~~~~~~~~~~
      |                      |
      |                      const struct gpio_dt_spec (*)[1]
In file included from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:10:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:643:58: note: expected 'const struct spi_dt_spec *' but argument is of type 'const struct gpio_dt_spec (*)[1]'
  643 | static inline int spi_write_dt(const struct spi_dt_spec *spec,
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c: In function 'SX127xSetRfTxPower':
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:455:20: error: 'REG_PADAC' undeclared (first use in this function)
  455 |  ret = sx127x_read(REG_PADAC, &pa_dac, 1);
      |                    ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:455:20: warning: passing argument 1 of 'sx127x_read' makes integer from pointer without a cast [-Wint-conversion]
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:419:25: note: expected 'uint8_t' {aka 'unsigned char'} but argument is of type 'const struct gpio_dt_spec *'
  419 | int sx127x_read(uint8_t reg_addr, uint8_t *data, uint8_t len)
      |                 ~~~~~~~~^~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:132:35: error: 'RF_PADAC_20DBM_MASK' undeclared (first use in this function); did you mean 'SX127X_PADAC_20DBM_MASK'?
  132 | #define SX127X_PADAC_20DBM_MASK (~RF_PADAC_20DBM_MASK)
      |                                   ^~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:461:13: note: in expansion of macro 'SX127X_PADAC_20DBM_MASK'
  461 |  pa_dac &= ~SX127X_PADAC_20DBM_MASK;
      |             ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:132:34: error: wrong type argument to bit-complement
  132 | #define SX127X_PADAC_20DBM_MASK (~RF_PADAC_20DBM_MASK)
      |                                  ^
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:461:13: note: in expansion of macro 'SX127X_PADAC_20DBM_MASK'
  461 |  pa_dac &= ~SX127X_PADAC_20DBM_MASK;
      |             ^~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:461:12: error: wrong type argument to bit-complement
  461 |  pa_dac &= ~SX127X_PADAC_20DBM_MASK;
      |            ^
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:461:9: error: invalid operands to binary & (have 'int' and 'const struct gpio_dt_spec *')
  461 |  pa_dac &= ~SX127X_PADAC_20DBM_MASK;
      |         ^~ ~
      |            |
      |            const struct gpio_dt_spec *
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:461:2: warning: statement with no effect [-Wunused-value]
  461 |  pa_dac &= ~SX127X_PADAC_20DBM_MASK;
      |  ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:134:43: error: 'RF_PACONFIG_PASELECT_PABOOST' undeclared (first use in this function); did you mean 'SX127X_PACONFIG_PASELECT_PABOOST'?
  134 | #define SX127X_PACONFIG_PASELECT_PABOOST (RF_PACONFIG_PASELECT_PABOOST)
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:466:16: note: in expansion of macro 'SX127X_PACONFIG_PASELECT_PABOOST'
  466 |   pa_config |= SX127X_PACONFIG_PASELECT_PABOOST;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:466:13: error: invalid operands to binary | (have 'int' and 'const struct gpio_dt_spec *')
  466 |   pa_config |= SX127X_PACONFIG_PASELECT_PABOOST;
      |             ^~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:466:3: warning: statement with no effect [-Wunused-value]
  466 |   pa_config |= SX127X_PACONFIG_PASELECT_PABOOST;
      |   ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:130:32: error: 'RF_PADAC_20DBM_ON' undeclared (first use in this function); did you mean 'SX127X_PADAC_20DBM_ON'?
  130 | #define SX127X_PADAC_20DBM_ON (RF_PADAC_20DBM_ON)
      |                                ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:468:14: note: in expansion of macro 'SX127X_PADAC_20DBM_ON'
  468 |    pa_dac |= SX127X_PADAC_20DBM_ON;
      |              ^~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:468:11: error: invalid operands to binary | (have 'int' and 'const struct gpio_dt_spec *')
  468 |    pa_dac |= SX127X_PADAC_20DBM_ON;
      |           ^~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:468:4: warning: statement with no effect [-Wunused-value]
  468 |    pa_dac |= SX127X_PADAC_20DBM_ON;
      |    ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:135:44: error: 'RF_PACONFIG_OUTPUTPOWER_MASK' undeclared (first use in this function); did you mean 'SX127X_PACONFIG_OUTPUTPOWER_MASK'?
  135 | #define SX127X_PACONFIG_OUTPUTPOWER_MASK (~RF_PACONFIG_OUTPUTPOWER_MASK)
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:469:31: note: in expansion of macro 'SX127X_PACONFIG_OUTPUTPOWER_MASK'
  469 |    pa_config |= (power - 5) & SX127X_PACONFIG_OUTPUTPOWER_MASK;
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:135:43: error: wrong type argument to bit-complement
  135 | #define SX127X_PACONFIG_OUTPUTPOWER_MASK (~RF_PACONFIG_OUTPUTPOWER_MASK)
      |                                           ^
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:469:31: note: in expansion of macro 'SX127X_PACONFIG_OUTPUTPOWER_MASK'
  469 |    pa_config |= (power - 5) & SX127X_PACONFIG_OUTPUTPOWER_MASK;
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:469:29: error: invalid operands to binary & (have 'int' and 'const struct gpio_dt_spec *')
  469 |    pa_config |= (power - 5) & SX127X_PACONFIG_OUTPUTPOWER_MASK;
      |                 ~~~~~~~~~~~ ^
      |                        |    |
      |                        int  const struct gpio_dt_spec *
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:469:14: error: invalid operands to binary | (have 'int' and 'const struct gpio_dt_spec *')
  469 |    pa_config |= (power - 5) & SX127X_PACONFIG_OUTPUTPOWER_MASK;
      |              ^~ ~
      |                 |
      |                 const struct gpio_dt_spec *
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:469:4: warning: statement with no effect [-Wunused-value]
  469 |    pa_config |= (power - 5) & SX127X_PACONFIG_OUTPUTPOWER_MASK;
      |    ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:131:33: error: 'RF_PADAC_20DBM_OFF' undeclared (first use in this function); did you mean 'SX127X_PADAC_20DBM_OFF'?
  131 | #define SX127X_PADAC_20DBM_OFF (RF_PADAC_20DBM_OFF)
      |                                 ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:471:14: note: in expansion of macro 'SX127X_PADAC_20DBM_OFF'
  471 |    pa_dac |= SX127X_PADAC_20DBM_OFF;
      |              ^~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:471:11: error: invalid operands to binary | (have 'int' and 'const struct gpio_dt_spec *')
  471 |    pa_dac |= SX127X_PADAC_20DBM_OFF;
      |           ^~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:471:4: warning: statement with no effect [-Wunused-value]
  471 |    pa_dac |= SX127X_PADAC_20DBM_OFF;
      |    ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:135:43: error: wrong type argument to bit-complement
  135 | #define SX127X_PACONFIG_OUTPUTPOWER_MASK (~RF_PACONFIG_OUTPUTPOWER_MASK)
      |                                           ^
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:472:31: note: in expansion of macro 'SX127X_PACONFIG_OUTPUTPOWER_MASK'
  472 |    pa_config |= (power - 2) & SX127X_PACONFIG_OUTPUTPOWER_MASK;
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:472:29: error: invalid operands to binary & (have 'int' and 'const struct gpio_dt_spec *')
  472 |    pa_config |= (power - 2) & SX127X_PACONFIG_OUTPUTPOWER_MASK;
      |                 ~~~~~~~~~~~ ^
      |                        |    |
      |                        int  const struct gpio_dt_spec *
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:472:14: error: invalid operands to binary | (have 'int' and 'const struct gpio_dt_spec *')
  472 |    pa_config |= (power - 2) & SX127X_PACONFIG_OUTPUTPOWER_MASK;
      |              ^~ ~
      |                 |
      |                 const struct gpio_dt_spec *
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:472:4: warning: statement with no effect [-Wunused-value]
  472 |    pa_config |= (power - 2) & SX127X_PACONFIG_OUTPUTPOWER_MASK;
      |    ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:490:10: error: invalid operands to binary | (have 'int' and 'const struct gpio_dt_spec *')
  490 |   pa_dac |= SX127X_PADAC_20DBM_OFF;
      |          ^~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:490:3: warning: statement with no effect [-Wunused-value]
  490 |   pa_dac |= SX127X_PADAC_20DBM_OFF;
      |   ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:135:43: error: wrong type argument to bit-complement
  135 | #define SX127X_PACONFIG_OUTPUTPOWER_MASK (~RF_PACONFIG_OUTPUTPOWER_MASK)
      |                                           ^
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:491:30: note: in expansion of macro 'SX127X_PACONFIG_OUTPUTPOWER_MASK'
  491 |   pa_config |= (power + 1) & SX127X_PACONFIG_OUTPUTPOWER_MASK;
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:491:28: error: invalid operands to binary & (have 'int' and 'const struct gpio_dt_spec *')
  491 |   pa_config |= (power + 1) & SX127X_PACONFIG_OUTPUTPOWER_MASK;
      |                ~~~~~~~~~~~ ^
      |                       |    |
      |                       int  const struct gpio_dt_spec *
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:491:13: error: invalid operands to binary | (have 'int' and 'const struct gpio_dt_spec *')
  491 |   pa_config |= (power + 1) & SX127X_PACONFIG_OUTPUTPOWER_MASK;
      |             ^~ ~
      |                |
      |                const struct gpio_dt_spec *
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:491:3: warning: statement with no effect [-Wunused-value]
  491 |   pa_config |= (power + 1) & SX127X_PACONFIG_OUTPUTPOWER_MASK;
      |   ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:500:21: error: 'REG_PACONFIG' undeclared (first use in this function)
  500 |  ret = sx127x_write(REG_PACONFIG, &pa_config, 1);
      |                     ^~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:500:21: warning: passing argument 1 of 'sx127x_write' makes integer from pointer without a cast [-Wint-conversion]
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:424:26: note: expected 'uint8_t' {aka 'unsigned char'} but argument is of type 'const struct gpio_dt_spec *'
  424 | int sx127x_write(uint8_t reg_addr, uint8_t *data, uint8_t len)
      |                  ~~~~~~~~^~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:506:21: warning: passing argument 1 of 'sx127x_write' makes integer from pointer without a cast [-Wint-conversion]
  506 |  ret = sx127x_write(REG_PADAC, &pa_dac, 1);
      |                     ^~~~~~~~~
      |                     |
      |                     const struct gpio_dt_spec *
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:424:26: note: expected 'uint8_t' {aka 'unsigned char'} but argument is of type 'const struct gpio_dt_spec *'
  424 | int sx127x_write(uint8_t reg_addr, uint8_t *data, uint8_t len)
      |                  ~~~~~~~~^~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c: At top level:
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:525:14: error: variable 'Radio' has initializer but incomplete type
  525 | const struct Radio_s Radio = {
      |              ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:526:3: error: 'const struct Radio_s' has no member named 'Init'
  526 |  .Init = SX127xInit,
      |   ^~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:526:10: error: 'SX127xInit' undeclared here (not in a function)
  526 |  .Init = SX127xInit,
      |          ^~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:526:10: warning: excess elements in struct initializer
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:526:10: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:527:3: error: 'const struct Radio_s' has no member named 'GetStatus'
  527 |  .GetStatus = SX127xGetStatus,
      |   ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:527:15: error: 'SX127xGetStatus' undeclared here (not in a function)
  527 |  .GetStatus = SX127xGetStatus,
      |               ^~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:527:15: warning: excess elements in struct initializer
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:527:15: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:528:3: error: 'const struct Radio_s' has no member named 'SetModem'
  528 |  .SetModem = SX127xSetModem,
      |   ^~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:528:14: error: 'SX127xSetModem' undeclared here (not in a function)
  528 |  .SetModem = SX127xSetModem,
      |              ^~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:528:14: warning: excess elements in struct initializer
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:528:14: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:529:3: error: 'const struct Radio_s' has no member named 'SetChannel'
  529 |  .SetChannel = SX127xSetChannel,
      |   ^~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:529:16: error: 'SX127xSetChannel' undeclared here (not in a function); did you mean 'SX127xSetAntSw'?
  529 |  .SetChannel = SX127xSetChannel,
      |                ^~~~~~~~~~~~~~~~
      |                SX127xSetAntSw
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:529:16: warning: excess elements in struct initializer
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:529:16: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:530:3: error: 'const struct Radio_s' has no member named 'IsChannelFree'
  530 |  .IsChannelFree = SX127xIsChannelFree,
      |   ^~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:530:19: error: 'SX127xIsChannelFree' undeclared here (not in a function)
  530 |  .IsChannelFree = SX127xIsChannelFree,
      |                   ^~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:530:19: warning: excess elements in struct initializer
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:530:19: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:531:3: error: 'const struct Radio_s' has no member named 'Random'
  531 |  .Random = SX127xRandom,
      |   ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:531:12: error: 'SX127xRandom' undeclared here (not in a function)
  531 |  .Random = SX127xRandom,
      |            ^~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:531:12: warning: excess elements in struct initializer
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:531:12: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:532:3: error: 'const struct Radio_s' has no member named 'SetRxConfig'
  532 |  .SetRxConfig = SX127xSetRxConfig,
      |   ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:532:17: error: 'SX127xSetRxConfig' undeclared here (not in a function)
  532 |  .SetRxConfig = SX127xSetRxConfig,
      |                 ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:532:17: warning: excess elements in struct initializer
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:532:17: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:533:3: error: 'const struct Radio_s' has no member named 'SetTxConfig'
  533 |  .SetTxConfig = SX127xSetTxConfig,
      |   ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:533:17: error: 'SX127xSetTxConfig' undeclared here (not in a function)
  533 |  .SetTxConfig = SX127xSetTxConfig,
      |                 ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:533:17: warning: excess elements in struct initializer
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:533:17: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:534:3: error: 'const struct Radio_s' has no member named 'CheckRfFrequency'
  534 |  .CheckRfFrequency = SX127xCheckRfFrequency,
      |   ^~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:534:22: warning: excess elements in struct initializer
  534 |  .CheckRfFrequency = SX127xCheckRfFrequency,
      |                      ^~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:534:22: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:535:3: error: 'const struct Radio_s' has no member named 'TimeOnAir'
  535 |  .TimeOnAir = SX127xGetTimeOnAir,
      |   ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:535:15: error: 'SX127xGetTimeOnAir' undeclared here (not in a function)
  535 |  .TimeOnAir = SX127xGetTimeOnAir,
      |               ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:535:15: warning: excess elements in struct initializer
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:535:15: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:536:3: error: 'const struct Radio_s' has no member named 'Send'
  536 |  .Send = SX127xSend,
      |   ^~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:536:10: error: 'SX127xSend' undeclared here (not in a function)
  536 |  .Send = SX127xSend,
      |          ^~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:536:10: warning: excess elements in struct initializer
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:536:10: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:537:3: error: 'const struct Radio_s' has no member named 'Sleep'
  537 |  .Sleep = SX127xSetSleep,
      |   ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:537:11: error: 'SX127xSetSleep' undeclared here (not in a function)
  537 |  .Sleep = SX127xSetSleep,
      |           ^~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:537:11: warning: excess elements in struct initializer
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:537:11: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:538:3: error: 'const struct Radio_s' has no member named 'Standby'
  538 |  .Standby = SX127xSetStby,
      |   ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:538:13: error: 'SX127xSetStby' undeclared here (not in a function); did you mean 'SX127xSetAntSw'?
  538 |  .Standby = SX127xSetStby,
      |             ^~~~~~~~~~~~~
      |             SX127xSetAntSw
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:538:13: warning: excess elements in struct initializer
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:538:13: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:539:3: error: 'const struct Radio_s' has no member named 'Rx'
  539 |  .Rx = SX127xSetRx,
      |   ^~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:539:8: error: 'SX127xSetRx' undeclared here (not in a function)
  539 |  .Rx = SX127xSetRx,
      |        ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:539:8: warning: excess elements in struct initializer
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:539:8: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:540:3: error: 'const struct Radio_s' has no member named 'Write'
  540 |  .Write = SX127xWrite,
      |   ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:540:11: error: 'SX127xWrite' undeclared here (not in a function); did you mean 'sx127x_write'?
  540 |  .Write = SX127xWrite,
      |           ^~~~~~~~~~~
      |           sx127x_write
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:540:11: warning: excess elements in struct initializer
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:540:11: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:541:3: error: 'const struct Radio_s' has no member named 'Read'
  541 |  .Read = SX127xRead,
      |   ^~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:541:10: error: 'SX127xRead' undeclared here (not in a function); did you mean 'SX127xReset'?
  541 |  .Read = SX127xRead,
      |          ^~~~~~~~~~
      |          SX127xReset
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:541:10: warning: excess elements in struct initializer
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:541:10: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:542:3: error: 'const struct Radio_s' has no member named 'WriteBuffer'
  542 |  .WriteBuffer = SX127xWriteBuffer,
      |   ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:542:17: warning: excess elements in struct initializer
  542 |  .WriteBuffer = SX127xWriteBuffer,
      |                 ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:542:17: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:543:3: error: 'const struct Radio_s' has no member named 'ReadBuffer'
  543 |  .ReadBuffer = SX127xReadBuffer,
      |   ^~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:543:16: warning: excess elements in struct initializer
  543 |  .ReadBuffer = SX127xReadBuffer,
      |                ^~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:543:16: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:544:3: error: 'const struct Radio_s' has no member named 'SetMaxPayloadLength'
  544 |  .SetMaxPayloadLength = SX127xSetMaxPayloadLength,
      |   ^~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:544:25: error: 'SX127xSetMaxPayloadLength' undeclared here (not in a function)
  544 |  .SetMaxPayloadLength = SX127xSetMaxPayloadLength,
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:544:25: warning: excess elements in struct initializer
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:544:25: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:545:3: error: 'const struct Radio_s' has no member named 'SetPublicNetwork'
  545 |  .SetPublicNetwork = SX127xSetPublicNetwork,
      |   ^~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:545:22: error: 'SX127xSetPublicNetwork' undeclared here (not in a function)
  545 |  .SetPublicNetwork = SX127xSetPublicNetwork,
      |                      ^~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:545:22: warning: excess elements in struct initializer
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:545:22: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:546:3: error: 'const struct Radio_s' has no member named 'GetWakeupTime'
  546 |  .GetWakeupTime = SX127xGetWakeupTime,
      |   ^~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:546:19: error: 'SX127xGetWakeupTime' undeclared here (not in a function); did you mean 'SX127xGetBoardTcxoWakeupTime'?
  546 |  .GetWakeupTime = SX127xGetWakeupTime,
      |                   ^~~~~~~~~~~~~~~~~~~
      |                   SX127xGetBoardTcxoWakeupTime
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:546:19: warning: excess elements in struct initializer
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:546:19: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:547:3: error: 'const struct Radio_s' has no member named 'IrqProcess'
  547 |  .IrqProcess = NULL,
      |   ^~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:547:16: warning: excess elements in struct initializer
  547 |  .IrqProcess = NULL,
      |                ^~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:547:16: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:548:3: error: 'const struct Radio_s' has no member named 'RxBoosted'
  548 |  .RxBoosted = NULL,
      |   ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:548:15: warning: excess elements in struct initializer
  548 |  .RxBoosted = NULL,
      |               ^~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:548:15: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:549:3: error: 'const struct Radio_s' has no member named 'SetRxDutyCycle'
  549 |  .SetRxDutyCycle = NULL,
      |   ^~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:549:20: warning: excess elements in struct initializer
  549 |  .SetRxDutyCycle = NULL,
      |                    ^~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:549:20: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:550:3: error: 'const struct Radio_s' has no member named 'SetTxContinuousWave'
  550 |  .SetTxContinuousWave = SX127xSetTxContinuousWave,
      |   ^~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:550:25: error: 'SX127xSetTxContinuousWave' undeclared here (not in a function)
  550 |  .SetTxContinuousWave = SX127xSetTxContinuousWave,
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:550:25: warning: excess elements in struct initializer
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:550:25: note: (near initialization for 'Radio')
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c: In function 'sx127x_lora_init':
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:585:31: error: 'const struct sx127x_config' has no member named 'bus'
  585 |  if (!spi_is_ready(&dev_config.bus)) {
      |                               ^
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:585:20: warning: passing argument 1 of 'spi_is_ready' from incompatible pointer type [-Wincompatible-pointer-types]
  585 |  if (!spi_is_ready(&dev_config.bus)) {
      |                    ^~~~~~~~~~~~~~~
      |                    |
      |                    const struct gpio_dt_spec (*)[1]
In file included from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:10:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/spi.h:497:59: note: expected 'const struct spi_dt_spec *' but argument is of type 'const struct gpio_dt_spec (*)[1]'
  497 | static inline bool spi_is_ready(const struct spi_dt_spec *spec)
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:602:29: error: 'const struct sx127x_config' has no member named 'reset'
  602 |  gpio_pin_set_dt(&dev_config.reset, 0);
      |                             ^
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:602:18: warning: passing argument 1 of 'gpio_pin_set_dt' from incompatible pointer type [-Wincompatible-pointer-types]
  602 |  gpio_pin_set_dt(&dev_config.reset, 0);
      |                  ^~~~~~~~~~~~~~~~~
      |                  |
      |                  const struct gpio_dt_spec (*)[1]
In file included from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:8:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:1191:62: note: expected 'const struct gpio_dt_spec *' but argument is of type 'const struct gpio_dt_spec (*)[1]'
 1191 | static inline int gpio_pin_set_dt(const struct gpio_dt_spec *spec, int value)
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:605:20: error: 'REG_VERSION' undeclared (first use in this function); did you mean 'GCC_VERSION'?
  605 |  ret = sx127x_read(REG_VERSION, &regval, 1);
      |                    ^~~~~~~~~~~
      |                    GCC_VERSION
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:605:20: warning: passing argument 1 of 'sx127x_read' makes integer from pointer without a cast [-Wint-conversion]
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:419:25: note: expected 'uint8_t' {aka 'unsigned char'} but argument is of type 'const struct gpio_dt_spec *'
  419 | int sx127x_read(uint8_t reg_addr, uint8_t *data, uint8_t len)
      |                 ~~~~~~~~^~~~~~~~
In file included from /Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/drivers/gpio.h:23,
                 from /Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:8:
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c: At top level:
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:305:40: error: 'DT_N_INST_0_DT_DRV_COMPAT_FULL_NAME' undeclared here (not in a function)
  305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
      |                                        ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:920:11: note: in definition of macro 'Z_DEVICE_DEFINE'
  920 |   .name = drv_name,     \
      |           ^~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:64:53: note: in expansion of macro '__DEBRACKET'
   64 | #define __GET_ARG2_DEBRACKET(ignore_this, val, ...) __DEBRACKET val
      |                                                     ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:59:2: note: in expansion of macro '__GET_ARG2_DEBRACKET'
   59 |  __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
      |  ^~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:54:2: note: in expansion of macro '__COND_CODE'
   54 |  __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
      |  ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_macro.h:157:2: note: in expansion of macro 'Z_COND_CODE_1'
  157 |  Z_COND_CODE_1(_flag, _if_1_code, _else_code)
      |  ^~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:704:2: note: in expansion of macro 'COND_CODE_1'
  704 |  COND_CODE_1(DT_NODE_HAS_PROP(node_id, prop), \
      |  ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:203:2: note: in expansion of macro 'DT_PROP_OR'
  203 |  DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id))
      |  ^~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:475:36: note: in expansion of macro 'DT_CAT'
  475 | #define DT_NODE_FULL_NAME(node_id) DT_CAT(node_id, _FULL_NAME)
      |                                    ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:203:29: note: in expansion of macro 'DT_NODE_FULL_NAME'
  203 |  DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id))
      |                             ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:253:4: note: in expansion of macro 'DEVICE_DT_NAME'
  253 |    DEVICE_DT_NAME(node_id), init_fn,  \
      |    ^~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:272:2: note: in expansion of macro 'DEVICE_DT_DEFINE'
  272 |  DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:98:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
   98 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
      |                          ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:305:31: note: in expansion of macro 'UTIL_CAT'
  305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
      |                               ^~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:2400:27: note: in expansion of macro 'DT_INST'
 2400 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
      |                           ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:272:19: note: in expansion of macro 'DT_DRV_INST'
  272 |  DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__)
      |                   ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:637:1: note: in expansion of macro 'DEVICE_DT_INST_DEFINE'
  637 | DEVICE_DT_INST_DEFINE(0, &sx127x_lora_init, NULL, NULL,
      | ^~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:305:40: warning: initialization of 'const char *' from incompatible pointer type 'const struct gpio_dt_spec *' [-Wincompatible-pointer-types]
  305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
      |                                        ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:920:11: note: in definition of macro 'Z_DEVICE_DEFINE'
  920 |   .name = drv_name,     \
      |           ^~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:64:53: note: in expansion of macro '__DEBRACKET'
   64 | #define __GET_ARG2_DEBRACKET(ignore_this, val, ...) __DEBRACKET val
      |                                                     ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:59:2: note: in expansion of macro '__GET_ARG2_DEBRACKET'
   59 |  __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
      |  ^~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:54:2: note: in expansion of macro '__COND_CODE'
   54 |  __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
      |  ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_macro.h:157:2: note: in expansion of macro 'Z_COND_CODE_1'
  157 |  Z_COND_CODE_1(_flag, _if_1_code, _else_code)
      |  ^~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:704:2: note: in expansion of macro 'COND_CODE_1'
  704 |  COND_CODE_1(DT_NODE_HAS_PROP(node_id, prop), \
      |  ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:203:2: note: in expansion of macro 'DT_PROP_OR'
  203 |  DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id))
      |  ^~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:475:36: note: in expansion of macro 'DT_CAT'
  475 | #define DT_NODE_FULL_NAME(node_id) DT_CAT(node_id, _FULL_NAME)
      |                                    ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:203:29: note: in expansion of macro 'DT_NODE_FULL_NAME'
  203 |  DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id))
      |                             ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:253:4: note: in expansion of macro 'DEVICE_DT_NAME'
  253 |    DEVICE_DT_NAME(node_id), init_fn,  \
      |    ^~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:272:2: note: in expansion of macro 'DEVICE_DT_DEFINE'
  272 |  DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:98:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
   98 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
      |                          ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:305:31: note: in expansion of macro 'UTIL_CAT'
  305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
      |                               ^~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:2400:27: note: in expansion of macro 'DT_INST'
 2400 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
      |                           ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:272:19: note: in expansion of macro 'DT_DRV_INST'
  272 |  DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__)
      |                   ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:637:1: note: in expansion of macro 'DEVICE_DT_INST_DEFINE'
  637 | DEVICE_DT_INST_DEFINE(0, &sx127x_lora_init, NULL, NULL,
      | ^~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:305:40: note: (near initialization for '__device_dts_ord_DT_N_INST_0_DT_DRV_COMPAT_ORD.name')
  305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
      |                                        ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:920:11: note: in definition of macro 'Z_DEVICE_DEFINE'
  920 |   .name = drv_name,     \
      |           ^~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:64:53: note: in expansion of macro '__DEBRACKET'
   64 | #define __GET_ARG2_DEBRACKET(ignore_this, val, ...) __DEBRACKET val
      |                                                     ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:59:2: note: in expansion of macro '__GET_ARG2_DEBRACKET'
   59 |  __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
      |  ^~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:54:2: note: in expansion of macro '__COND_CODE'
   54 |  __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
      |  ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_macro.h:157:2: note: in expansion of macro 'Z_COND_CODE_1'
  157 |  Z_COND_CODE_1(_flag, _if_1_code, _else_code)
      |  ^~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:704:2: note: in expansion of macro 'COND_CODE_1'
  704 |  COND_CODE_1(DT_NODE_HAS_PROP(node_id, prop), \
      |  ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:203:2: note: in expansion of macro 'DT_PROP_OR'
  203 |  DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id))
      |  ^~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:475:36: note: in expansion of macro 'DT_CAT'
  475 | #define DT_NODE_FULL_NAME(node_id) DT_CAT(node_id, _FULL_NAME)
      |                                    ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:203:29: note: in expansion of macro 'DT_NODE_FULL_NAME'
  203 |  DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id))
      |                             ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:253:4: note: in expansion of macro 'DEVICE_DT_NAME'
  253 |    DEVICE_DT_NAME(node_id), init_fn,  \
      |    ^~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:272:2: note: in expansion of macro 'DEVICE_DT_DEFINE'
  272 |  DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:98:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
   98 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
      |                          ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:305:31: note: in expansion of macro 'UTIL_CAT'
  305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
      |                               ^~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:2400:27: note: in expansion of macro 'DT_INST'
 2400 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
      |                           ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:272:19: note: in expansion of macro 'DT_DRV_INST'
  272 |  DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__)
      |                   ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:637:1: note: in expansion of macro 'DEVICE_DT_INST_DEFINE'
  637 | DEVICE_DT_INST_DEFINE(0, &sx127x_lora_init, NULL, NULL,
      | ^~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:305:40: error: initializer element is not constant
  305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
      |                                        ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:920:11: note: in definition of macro 'Z_DEVICE_DEFINE'
  920 |   .name = drv_name,     \
      |           ^~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:64:53: note: in expansion of macro '__DEBRACKET'
   64 | #define __GET_ARG2_DEBRACKET(ignore_this, val, ...) __DEBRACKET val
      |                                                     ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:59:2: note: in expansion of macro '__GET_ARG2_DEBRACKET'
   59 |  __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
      |  ^~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:54:2: note: in expansion of macro '__COND_CODE'
   54 |  __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
      |  ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_macro.h:157:2: note: in expansion of macro 'Z_COND_CODE_1'
  157 |  Z_COND_CODE_1(_flag, _if_1_code, _else_code)
      |  ^~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:704:2: note: in expansion of macro 'COND_CODE_1'
  704 |  COND_CODE_1(DT_NODE_HAS_PROP(node_id, prop), \
      |  ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:203:2: note: in expansion of macro 'DT_PROP_OR'
  203 |  DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id))
      |  ^~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:475:36: note: in expansion of macro 'DT_CAT'
  475 | #define DT_NODE_FULL_NAME(node_id) DT_CAT(node_id, _FULL_NAME)
      |                                    ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:203:29: note: in expansion of macro 'DT_NODE_FULL_NAME'
  203 |  DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id))
      |                             ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:253:4: note: in expansion of macro 'DEVICE_DT_NAME'
  253 |    DEVICE_DT_NAME(node_id), init_fn,  \
      |    ^~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:272:2: note: in expansion of macro 'DEVICE_DT_DEFINE'
  272 |  DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:98:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
   98 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
      |                          ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:305:31: note: in expansion of macro 'UTIL_CAT'
  305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
      |                               ^~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:2400:27: note: in expansion of macro 'DT_INST'
 2400 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
      |                           ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:272:19: note: in expansion of macro 'DT_DRV_INST'
  272 |  DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__)
      |                   ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:637:1: note: in expansion of macro 'DEVICE_DT_INST_DEFINE'
  637 | DEVICE_DT_INST_DEFINE(0, &sx127x_lora_init, NULL, NULL,
      | ^~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:305:40: note: (near initialization for '__device_dts_ord_DT_N_INST_0_DT_DRV_COMPAT_ORD.name')
  305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
      |                                        ^~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:920:11: note: in definition of macro 'Z_DEVICE_DEFINE'
  920 |   .name = drv_name,     \
      |           ^~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:64:53: note: in expansion of macro '__DEBRACKET'
   64 | #define __GET_ARG2_DEBRACKET(ignore_this, val, ...) __DEBRACKET val
      |                                                     ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:59:2: note: in expansion of macro '__GET_ARG2_DEBRACKET'
   59 |  __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
      |  ^~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:54:2: note: in expansion of macro '__COND_CODE'
   54 |  __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
      |  ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_macro.h:157:2: note: in expansion of macro 'Z_COND_CODE_1'
  157 |  Z_COND_CODE_1(_flag, _if_1_code, _else_code)
      |  ^~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:704:2: note: in expansion of macro 'COND_CODE_1'
  704 |  COND_CODE_1(DT_NODE_HAS_PROP(node_id, prop), \
      |  ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:203:2: note: in expansion of macro 'DT_PROP_OR'
  203 |  DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id))
      |  ^~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:475:36: note: in expansion of macro 'DT_CAT'
  475 | #define DT_NODE_FULL_NAME(node_id) DT_CAT(node_id, _FULL_NAME)
      |                                    ^~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:203:29: note: in expansion of macro 'DT_NODE_FULL_NAME'
  203 |  DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id))
      |                             ^~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:253:4: note: in expansion of macro 'DEVICE_DT_NAME'
  253 |    DEVICE_DT_NAME(node_id), init_fn,  \
      |    ^~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:272:2: note: in expansion of macro 'DEVICE_DT_DEFINE'
  272 |  DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:98:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
   98 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
      |                          ^~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:305:31: note: in expansion of macro 'UTIL_CAT'
  305 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
      |                               ^~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/devicetree.h:2400:27: note: in expansion of macro 'DT_INST'
 2400 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
      |                           ^~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/include/zephyr/device.h:272:19: note: in expansion of macro 'DT_DRV_INST'
  272 |  DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__)
      |                   ^~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:637:1: note: in expansion of macro 'DEVICE_DT_INST_DEFINE'
  637 | DEVICE_DT_INST_DEFINE(0, &sx127x_lora_init, NULL, NULL,
      | ^~~~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:525:22: error: storage size of 'Radio' isn't known
  525 | const struct Radio_s Radio = {
      |                      ^~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:339:13: warning: 'sx127x_irq_callback' defined but not used [-Wunused-function]
  339 | static void sx127x_irq_callback(const struct device *dev,
      |             ^~~~~~~~~~~~~~~~~~~
/Users/marco_piccolino/zephyrproject/zephyr/drivers/lora/sx127x.c:332:13: warning: 'sx127x_dio_work_handle' defined but not used [-Wunused-function]
  332 | static void sx127x_dio_work_handle(struct k_work *work)
      |             ^~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
jeronimoagullo commented 2 years ago

Hi @sylvioalves and @mpiccolino-tealblue

I have just tried to build the lora send example for esp32 and I got the same output that @mpiccolino-tealblue posted.

sylvioalves commented 2 years ago

@mpiccolino-tealblue @jeronimoagullo, can you share the overlay file?
I haven't tested but I think it needs to be something like

&spi3 {
    status = "okay";
    #address-cells = <1>;
    #size-cells = <0>;
    pinctrl-0 = <&spim3_miso_gpio19 &spim3_mosi_gpio27
                     &spim3_sclk_gpio5 &spim3_csel_gpio18>;
    pinctrl-names = "default";

    cs-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
    lora: sx1276@0 {
        compatible = "semtech,sx1276";
        reg = <0>;
        label = "sx1276";
        reset-gpios = <&gpio0 14 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
        dio-gpios = <&gpio0 26 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,
            <&gpio1 34 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,
            <&gpio1 5 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
        spi-max-frequency = <1000000>;
        power-amplifier-output = "pa-boost";
    };
};
mpiccolino-tealblue commented 2 years ago

Thanks for your feedback. The output I shared refers to a missing overlay file (I am new to Zephyr and didn't notice that the heltec dtc doesnt contain info about lora). I tried with the overlay posted earlier in this thread but I get a cmake error. I have written to Heltec support to see if they can provide one. @sylvioalves I'll check yours later when I get back to the pc. I seem to remember there was a bit-related issue with the reg value.

mpiccolino-tealblue commented 2 years ago

@sylvioalves hello, adding the overlay seems indeed to solve the errors above. However, compilation still has errors, there must be something related to spi pins, as can be appreciated from this log:

-- Found devicetree overlay: /Users/marco_piccolino/zephyrproject/zephyr-lora-send/app.overlay
devicetree error: /soc/spi@3ff65000: undefined node label 'spim3_miso_gpio19'

I tried importing the following files in app.overlay (same as for the Heltec DTS), but that didn't help:

#include <zephyr/dt-bindings/pinctrl/esp-pinctrl-common.h>
#include <dt-bindings/pinctrl/esp32-pinctrl.h>
#include <zephyr/dt-bindings/pinctrl/esp32-gpio-sigmap.h>

Didn't get any reply from Heltec support. I'm very new to Zephyr and quite new to MCUs, so I definitely need a bit of guidance on how to fix this. Many thanks, Marco

mpiccolino-tealblue commented 2 years ago

@sylvioalves hello! Will you have any time in the near future to have a look at the LoRa support for the Heltec v2, either as overlay or direcly in the device tree? many thanks

gportay commented 1 year ago

Hello all,

I am currently working on enabling the SX1276 LoRa chip on the Heltec WiFi LoRa32 V2.

I have made the following changes in the device tree:

The sample samples/subsys/shell/shell_module/ compiles fine after the enabling the config CONFIG_SPI, CONFIG_LORA, and CONFIG_LORA_SX127X (the lora shell is compiled automagically) :tada:!

But it does not work yet :cry:!

  1. The lora driver requires to setup the frequency before doing any LoRa transfers (send or recv). Therefore, the command lora config freq 868000000 as to be run (for 868MHz).
  2. The command lora recv loop forever without receiving any lora frames from another device.
  3. The command lora send "Hello, World!" can be run, but it ends withEAGAIN`:
    uart:~$ lora send "Hello, World!"
    LoRa send failed: -11
    [00:03:04.184,000] <err> sx12xx_common: Packet transmission failed!

The log on the uart shows the lora driver retrieved the 0x00 as the chip version; I am expected a value such as 0x12 (not sure).

I suspect SPI communication issues, and I need some help to figure out what is going on here.

Also, I have analyzed the signals:

image image

I am not an SPI expert at all, so I cannot see yet what is wrong with the signals.

Note: The changes are available here.

gportay commented 1 year ago

Maybe, can someone double check the device tree from the pinout or schematics documents?

PIN GPIO
CS# GPIO18
CLK GPIO5
MOSI GPIO27
MISO GPIO19
RST# GPIO14
DIO0 GPIO26
DIO1 GPIO35
DIO2 GPIO34
    spim3_default: spim3_default {
        group1 {
            pinmux = <SPIM3_MISO_GPIO19>,
                 <SPIM3_SCLK_GPIO5>,
                 <SPIM3_CSEL_GPIO18>;
        };
        group3 {
            pinmux = <SPIM3_MOSI_GPIO27>;
            output-low;
        };
    };
&spi3 {
    #address-cells = <1>;
    #size-cells = <0>;
    status = "okay";
    pinctrl-0 = <&spim3_default>;
    pinctrl-names = "default";
    cs-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
    lora0: lora@0 {
        compatible = "semtech,sx1276";
        reg = <0>;
        reset-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
        dio-gpios =
            /* SX1276 D0 */
            <&gpio0 26 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,
            /* SX1276 D1 */
            <&gpio0 35 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>,
            /* SX1276 D2 */
            <&gpio0 34 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
        spi-max-frequency = <1000000>;
        power-amplifier-output = "pa-boost";
    };
};
cdrx commented 1 year ago

I struggled with this recently. Chip version 0x00 is exactly what I was getting, before I had the SPI correctly setup.

I don't know if its the cause of your issue, but I think your pin assignment for DIO D1 & D2 needs to change. On the ESP32, pins above GPIO31 are on port &gpio1 not &gpio0. See here for more details.

cdrx commented 1 year ago

Try putting all your SPI pins into a single group (not group1 and group3).

This config works for me on an ESP32 based board (not a Heltec board, so the GPIO PIN numbers will need to be changed for you):

/* this is app.overlay */
#include <dt-bindings/spi/spi.h>
#include <dt-bindings/pinctrl/esp32-pinctrl.h>

&spi2 {
    status = "okay";
    pinctrl-0 = <&spim2_default>;
    pinctrl-names = "default";
    cs-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;

    rfm95: sx1276@0 {
        compatible = "semtech,sx1276";
        reg = < 0 >;
        label = "sx1276";
        reset-gpios = < &gpio0 27 GPIO_ACTIVE_LOW >;
        dio-gpios = < &gpio0 26 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH) >,
                    < &gpio0 25 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH) >,
                    < &gpio1 1 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH) >;
        spi-max-frequency = <1000000>;
        power-amplifier-output = "pa-boost";
    };
};

&pinctrl {
    spim2_default: spim2_default {
        group1 {
            pinmux = < SPIM2_MISO_GPIO34 >,
                     < SPIM2_MOSI_GPIO23 >,
                     < SPIM2_SCLK_GPIO18 >;
       };
    };
};

/ {
    aliases {
        lora0 = &rfm95;
    };
};
gportay commented 1 year ago

Oh, thank you so much!

It works since I switched to spi2, and I fixed the gpio1 bank for GPIO35 and GPIO34, and I used a single group only!

All in all, all you told me to change.

&pinctrl {
    spim2_default: spim2_default {
        group1 {
            pinmux = < SPIM2_MISO_GPIO19 >,
                     < SPIM2_MOSI_GPIO27 >,
                     < SPIM2_SCLK_GPIO5 >;
       };
    };
};
/ {
    aliases {
        lora0 = &rfm95;
    };
};

&spi2 {
    #address-cells = <1>;
    #size-cells = <0>;
    status = "okay";
    pinctrl-0 = <&spim2_default>;
    pinctrl-names = "default";
    cs-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;

    rfm95: sx1276@0 {
        compatible = "semtech,sx1276";
        reg = < 0 >;
        reset-gpios = < &gpio0 14 GPIO_ACTIVE_LOW >;
        dio-gpios = < &gpio0 26 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH) >,
                    < &gpio1 3 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH) >,
                    < &gpio1 2 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH) >;
        spi-max-frequency = <1000000>;
        power-amplifier-output = "pa-boost";
    };
};
mpiccolino-tealblue commented 1 year ago

@cdrx @gportay thanks for you work on this. It compiles fine on my side. Will try receiving a few messages. @gportay what are you using for issuing lora commands?

gportay commented 1 year ago

@cdrx @gportay thanks for you work on this. It compiles fine on my side. Will try receiving a few messages. @gportay what are you using for issuing lora commands?

@mpiccolino-tealblue I used the Lora shell from the Zephyr tree (see #51404).

gportay commented 1 year ago

Also, I would be happy if someone can answer this https://github.com/zephyrproject-rtos/zephyr/pull/51404#discussion_r998527942 😁

mpiccolino-tealblue commented 1 year ago

@gportay many thanks. I assume it is CONFIG_LORA_SX12XX, not image right?

EDIT: never mind, I found the SX127X config too

gportay commented 1 year ago

Indeed, I use the config chunk:

CONFIG_SPI=y
CONFIG_LORA=y
CONFIG_LORA_SX12XX=y