Skip to content

Commit 80aad7a

Browse files
authored
Fix esp32c3 build (#6)
- Update the readme - Update the Memfault SDK version (no notable changes, just bumping to latest) - Add a step to build for this board in GH actions (I'll switch to twister in a follow up PR)
1 parent 57b6e0b commit 80aad7a

File tree

4 files changed

+22
-16
lines changed

4 files changed

+22
-16
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ jobs:
4747
run: |
4848
cd zephyr-workspace
4949
ccache -z
50+
west build --sysbuild \
51+
--pristine=always \
52+
--board=esp32s3_devkitm zephyr-esp32-example \
53+
-- \
54+
-DCONFIG_MEMFAULT_PROJECT_KEY=\"1234\"
5055
west build --sysbuild \
5156
--pristine=always \
5257
--board=esp32s3_devkitm zephyr-esp32-example \

README.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
> [!IMPORTANT]
2-
>
3-
> 🚧 This example repo is using an experimental version of the [Memfault
4-
> Firmware SDK](https://github.com/memfault/memfault-firmware-sdk). Feel free to
5-
> test it out and send us any feedback at <support@memfault.com>, but expect
6-
> this example to have some missing functionality or other undocumented
7-
> limitations! 🚧
8-
9-
# Memfault Zephyr + ESP32C3 Example
1+
# Memfault Zephyr + ESP32 Example
102

113
This sample app is based on the Zephyr `samples/net/wifi` example. It
124
demonstrates a Zephyr + ESP32 integration with the Memfault SDK. It has been
@@ -28,16 +20,16 @@ To try out this example app:
2820
2. Create a zephyr workspace and set it up with this project:
2921

3022
```bash
31-
$ mkdir zephyr-workspace
32-
$ cd zephyr-workspace
33-
$ west init -m https://github.com/memfault/zephyr-esp32-example
34-
$ west update
23+
mkdir zephyr-workspace
24+
cd zephyr-workspace
25+
west init -m https://github.com/memfault/zephyr-esp32-example
26+
west update
3527
```
3628

3729
3. Build the example app:
3830

3931
```bash
40-
$ west build zephyr-esp32-example --sysbuild
32+
west build zephyr-esp32-example --sysbuild
4133
```
4234

4335
`--sysbuild` will build the MCUboot image as well, which will also get
@@ -47,7 +39,7 @@ To try out this example app:
4739
4. Flash the example app:
4840

4941
```bash
50-
$ west flash
42+
west flash
5143
```
5244

5345
5. Open a serial console and interact with the sample app shell. For example
@@ -79,6 +71,9 @@ The payload to upload to Memfault is:
7971
build/zephyr-esp32-example/zephyr/zephyr.signed.confirmed.bin
8072
```
8173

74+
This file is set as "confirmed", so it won't revert after 1 boot cycle (not safe
75+
against bootloops!). See the [Zephyr documentation](https://docs.zephyrproject.org/apidoc/3.6.0/group__mcuboot__api.html#ga95ccc9e1c7460fec16b9ce9ac8ad7a72) for details.
76+
8277
Follow the normal Memfault OTA workflow:
8378

8479
1. build and flash an image with a version like `0.0.1` (see the

boards/esp32c3_devkitm.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
CONFIG_WIFI=y
2-
CONFIG_HEAP_MEM_POOL_SIZE=98304
2+
3+
# For now, capture smaller coredumps to fit available RAM
4+
CONFIG_MEMFAULT_RAM_BACKED_COREDUMP_SIZE=1024
35

46
CONFIG_NETWORKING=y
57
CONFIG_NET_L2_ETHERNET=y

boards/esp32c3_devkitm.overlay

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@
77
&wifi {
88
status = "okay";
99
};
10+
11+
&coretemp {
12+
status = "okay";
13+
};

0 commit comments

Comments
 (0)