@@ -26,55 +26,64 @@ Step-by-step instructions can be found in the
26
26
27
27
1 . Clone the repo
28
28
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
+ ```
32
32
33
33
2 . Create a virtual environment
34
34
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
+ ```
40
40
41
41
3 . Initialize a new build environment:
42
42
43
- ``` bash
44
- $ west init -l zephyr/
45
- $ west update
46
- ```
43
+ ``` bash
44
+ $ west init -l zephyr/
45
+ $ west update
46
+ ```
47
47
48
48
4 . When using the STM32L4 discovery board, the following patch is also needed
49
49
due to bugs in the stack:
50
50
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
+ ```
78
87
79
88
### Memfault Project Key
80
89
@@ -87,7 +96,7 @@ https://app.memfault.com/, navigate to the project you want to use and select
87
96
88
97
### Building
89
98
90
- ```
99
+ ``` bash
91
100
$ cd $MEMFAULT_SDK /examples/zephyr/
92
101
$ west build -b disco_l475_iot1 apps/memfault_demo_app
93
102
[...]
@@ -119,7 +128,7 @@ arm-none-eabi-gdb-py --eval-command="target remote localhost:2331" --ex="mon re
119
128
120
129
At this point, the application should be running and you can open a console:
121
130
122
- ```
131
+ ``` bash
123
132
$ miniterm.py /dev/cu.usbmodem* 115200 --raw
124
133
*** Booting Zephyr OS build zephyr-v2.5.0-56-gec0aa8331a65 ***
125
134
< inf> < mflt> : GNU Build ID: c20cef04e29e3ae7784002c3650d48f3a0b7b07d
0 commit comments