@@ -26,55 +26,64 @@ Step-by-step instructions can be found in the
2626
27271 . Clone the repo
2828
29- ``` bash
30- $ git clone
[email protected] :zephyrproject-rtos/zephyr.git --branch v2.5-branch zephyr
31- ```
29+ ``` bash
30+ $ git clone
[email protected] :zephyrproject-rtos/zephyr.git --branch v2.5-branch zephyr
31+ ```
3232
33332 . Create a virtual environment
3434
35- ``` bash
36- python3 -m venv .venv
37- source .venv/bin/activate
38- pip install -r zephyr/scripts/requirements.txt
39- ```
35+ ``` bash
36+ python3 -m venv .venv
37+ source .venv/bin/activate
38+ pip install -r zephyr/scripts/requirements.txt
39+ ```
4040
41413 . Initialize a new build environment:
4242
43- ``` bash
44- $ west init -l zephyr/
45- $ west update
46- ```
43+ ``` bash
44+ $ west init -l zephyr/
45+ $ west update
46+ ```
4747
48484 . When using the STM32L4 discovery board, the following patch is also needed
4949 due to bugs in the stack:
5050
51- ``` diff
52- diff --git a/drivers/wifi/eswifi/Kconfig.eswifi b/drivers/wifi/eswifi/Kconfig.eswifi
53- index 6468b98113..5f80c918cd 100644
54- --- a/drivers/wifi/eswifi/Kconfig.eswifi
55- +++ b/drivers/wifi/eswifi/Kconfig.eswifi
56- @@ -9,7 +9,7 @@ menuconfig WIFI_ESWIFI
57- select WIFI_OFFLOAD
58- select NET_OFFLOAD
59- select NET_SOCKETS
60- - select NET_SOCKETS_OFFLOAD
61- + imply NET_SOCKETS_OFFLOAD
62- select GPIO
63-
64- if WIFI_ESWIFI
65- diff --git a/drivers/wifi/eswifi/eswifi_socket.c b/drivers/wifi/eswifi/eswifi_socket.c
66- index e31ca0eecd..119f55778d 100644
67- --- a/drivers/wifi/eswifi/eswifi_socket.c
68- +++ b/drivers/wifi/eswifi/eswifi_socket.c
69- @@ -301,6 +301,6 @@ int __eswifi_socket_new(struct eswifi_dev *eswifi, int family, int type,
70- k_delayed_work_init(&socket->read_work, eswifi_off_read_work);
71- socket->usage = 1;
72- LOG_DBG("Socket index %d", socket->index);
73- -
74- + net_context_set_state(socket->context, NET_CONTEXT_CONNECTED);
75- return socket->index;
76- }
77- ```
51+ ``` diff
52+ diff --git a/drivers/wifi/eswifi/Kconfig.eswifi b/drivers/wifi/eswifi/Kconfig.eswifi
53+ index 6468b98113..5f80c918cd 100644
54+ --- a/drivers/wifi/eswifi/Kconfig.eswifi
55+ +++ b/drivers/wifi/eswifi/Kconfig.eswifi
56+ @@ -9,7 +9,7 @@ menuconfig WIFI_ESWIFI
57+ select WIFI_OFFLOAD
58+ select NET_OFFLOAD
59+ select NET_SOCKETS
60+ - select NET_SOCKETS_OFFLOAD
61+ + imply NET_SOCKETS_OFFLOAD
62+ select GPIO
63+
64+ if WIFI_ESWIFI
65+ diff --git a/drivers/wifi/eswifi/eswifi_socket.c b/drivers/wifi/eswifi/eswifi_socket.c
66+ index e31ca0eecd..119f55778d 100644
67+ --- a/drivers/wifi/eswifi/eswifi_socket.c
68+ +++ b/drivers/wifi/eswifi/eswifi_socket.c
69+ @@ -301,6 +301,6 @@ int __eswifi_socket_new(struct eswifi_dev *eswifi, int family, int type,
70+ k_delayed_work_init(&socket->read_work, eswifi_off_read_work);
71+ socket->usage = 1;
72+ LOG_DBG("Socket index %d", socket->index);
73+ -
74+ + net_context_set_state(socket->context, NET_CONTEXT_CONNECTED);
75+ return socket->index;
76+ }
77+ ```
78+
79+ You can find this patch at
80+ [ ` stm32l4_disco_zephyr2.5_wifi.patch ` ] ( ./stm32l4_disco_zephyr2.5_wifi.patch ) ,
81+ which can be applied by this command (assuming the ` zephyr ` repo is in the
82+ current working directory):
83+
84+ ``` bash
85+ git -C zephyr apply < stm32l4_disco_zephyr2.5_wifi.patch
86+ ```
7887
7988### Memfault Project Key
8089
@@ -87,7 +96,7 @@ https://app.memfault.com/, navigate to the project you want to use and select
8796
8897### Building
8998
90- ```
99+ ``` bash
91100$ cd $MEMFAULT_SDK /examples/zephyr/
92101$ west build -b disco_l475_iot1 apps/memfault_demo_app
93102[...]
@@ -119,7 +128,7 @@ arm-none-eabi-gdb-py --eval-command="target remote localhost:2331" --ex="mon re
119128
120129At this point, the application should be running and you can open a console:
121130
122- ```
131+ ``` bash
123132$ miniterm.py /dev/cu.usbmodem* 115200 --raw
124133*** Booting Zephyr OS build zephyr-v2.5.0-56-gec0aa8331a65 ***
125134< inf> < mflt> : GNU Build ID: c20cef04e29e3ae7784002c3650d48f3a0b7b07d
0 commit comments