This is a sample project for integrating Memfault with a PlatformIO project using the ESP-IDF framework.
-
Install PlatformIO CLI using the instructions here.
-
Initialize Memfault submodule:
git submodule update --init
- Activate the PlatformIO virtual env
source ~/.platformio/penv/bin/activate
- Install Memfault's dependencies
pip install -r src/memfault/memfault-firmware-sdk/requirements.txt
pip install memfault-cli
- Build with the platformio CLI:
pio run
- Upload the symbol file to Memfault:
memfault \
--org-token $MEMFAULT_AUTH_TOKEN \
--org $MEMFAULT_ORG_SLUG \
--project $MEMFAULT_PROJECT_SLUG \
upload-mcu-symbols .pio/build/espidf/firmware.elf
- Flash the device and start the serial monitor
pio run --target upload --target monitor
- Join a wifi network
esp32> join <ssid> <password>
- Save wifi settings to NVM so it connects automatically on boot
esp32> settings_set "wifi_ssid" "your network name"
esp32> settings_set "wifi_password" "your-wifi-password"