Config of ESP8266 WiFi Module

Hi,

I have previously used the ESP8266 WiFi module and it has worked great. Since I have updated to the latest SDK, I am now seeing problems. I'm guessing something has changed in the config settings?

I build my code using the following

Fullscreen
1
cmake -GNinja -DBOARD=nrf52840dongle_nrf52840 -DCONF_FILE="prj.conf" .. -DSHIELD=esp_8266
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

My proj file looks like this

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CONFIG_BOARD_HAS_NRF5_BOOTLOADER=n
CONFIG_STDOUT_CONSOLE=y
CONFIG_PRINTK=y
CONFIG_UART_CONSOLE=y
CONFIG_GPIO=y
CONFIG_WIFI=y
CONFIG_EARLY_CONSOLE=y
CONFIG_NETWORKING=y
CONFIG_NET_TX_STACK_SIZE=2048
CONFIG_NET_RX_STACK_SIZE=2048
CONFIG_NET_PKT_RX_COUNT=10
CONFIG_NET_PKT_TX_COUNT=10
CONFIG_NET_BUF_RX_COUNT=20
CONFIG_NET_BUF_TX_COUNT=20
CONFIG_NET_MAX_CONTEXTS=10
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

and my overlay file is this

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
&uart0 {
compatible = "nordic,nrf-uart";
status = "okay";
current-speed = <115200>;
tx-pin = <24>;
rx-pin = <22>;
};
&uart1 {
compatible = "nordic,nrf-uarte";
status = "okay";
current-speed = <115200>;
tx-pin = <45>;
rx-pin = <47>;
esp8266{
compatible = "espressif,esp-at";
label = "esp8266";
status = "okay";
};
};
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

However, I now get the following errors

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[5/276] Generating include/generated/driver-validation.h
/Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/zephyr/scripts/gen_kobject_list.py:66: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if LooseVersion(elftools.__version__) < LooseVersion('0.24'):
[6/276] Generating include/generated/k...r.h, include/generated/otype-to-size.h
/Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/zephyr/scripts/gen_kobject_list.py:66: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if LooseVersion(elftools.__version__) < LooseVersion('0.24'):
[266/276] Building C object zephyr/CMa.../zephyr.dir/drivers/wifi/esp/esp.c.obj
FAILED: zephyr/CMakeFiles/zephyr.dir/drivers/wifi/esp/esp.c.obj
ccache /opt/nordic/ncs/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DBUILD_VERSION=zephyr-v2.5.0-2316-g36d96d2cd9b9 -DKERNEL -DNRF52840_XXAA -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I/Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/zephyr/kernel/include -I/Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/zephyr/arch/arm/include -I/Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/zephyr/drivers/modem -I/Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/zephyr/include -Izephyr/include/generated -I/Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/zephyr/soc/arm/nordic_nrf/nrf52 -I/Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/zephyr/lib/util/fnmatch/. -I/Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/modules/hal/cmsis/CMSIS/Core/Include -I/Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/modules/hal/nordic/nrfx -I/Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/modules/hal/nordic/nrfx/drivers/include -I/Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/modules/hal/nordic/nrfx/mdk -I/Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/zephyr/modules/hal_nordic/nrfx/. -isystem /Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/zephyr/lib/libc/minimal/include -isystem /opt/nordic/ncs/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include -isystem /opt/nordic/ncs/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include-fixed -Os -imacros /Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/New_Code/ESP8266/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mcpu=cortex-m4 -mthumb -mabi=aapcs -imacros /Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/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-address-of-packed-member -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=/Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/New_Code/ESP8266=CMAKE_SOURCE_DIR -fmacro-prefix-map=/Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT zephyr/CMakeFiles/zephyr.dir/drivers/wifi/esp/esp.c.obj -MF zephyr/CMakeFiles/zephyr.dir/drivers/wifi/esp/esp.c.obj.d -o zephyr/CMakeFiles/zephyr.dir/drivers/wifi/esp/esp.c.obj -c /Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/zephyr/drivers/wifi/esp/esp.c
In file included from /Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/zephyr/include/arch/arm/aarch32/arch.h:20,
from /Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/zephyr/include/arch/cpu.h:19,
from /Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/zephyr/include/kernel_includes.h:33,
from /Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/zephyr/include/kernel.h:17,
from /Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/zephyr/drivers/wifi/esp/esp.c:13:
/Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/zephyr/drivers/wifi/esp/esp.c: In function 'esp_init':
/Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/zephyr/include/devicetree.h:300:40: error: 'DT_N_INST_0_espressif_esp_BUS_P_hw_flow_control' undeclared (first use in this function)
300 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
| ^~~~~~~~~
/Users/Watt/Documents/ZEPHYR_Code/nRF52840_Dongle/zephyr/include/devicetree.h:2251:24: note: in definition of macro 'DT_CAT'
2251 | #define DT_CAT(a1, a2) a1 ## a2
| ^~
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Look forward to your comments, 

Thanks,

Rod