Skip to content

Commit 904387e

Browse files
authored
chore: fix platformio build (#6)
### Summary The build has been broken for sometime now due to an issue including components needed for the build. Locally, the error shows up as: ``` CMake Error: Error processing file: /Users/gminnehan/projects/platformio-esp32-espidf/.pio/build/espidf/esp-idf/esp_system/ld/linker_script_generator.cmake Retrieved `.pio/build/espidf/app_trace/app_trace_util.c.o' from cache *** [.pio/build/espidf/esp-idf/esp_system/ld/sections.ld.in] Error 1 src/led.c:19:12: fatal error: led_strip.h: No such file or directory 19 | #include "led_strip.h" | ^~~~~~~~~~~~~ compilation terminated. *** [.pio/build/espidf/src/led.c.o] Error 1 ``` This PR fixes the build by upgrading the PlatformIO core and its dependencies. A few other notes: - I was getting some strange errors when building with the `espressif/toolchain-riscv32-esp` but `platformio/toolchain-riscv32-esp` worked just fine, so I switched over 🤷‍♀️ - Unfortunately there isn't a version of `tool-ninja` package that has support for both Linux and MacOS, so specifying the wrong version of this package breaks the build 🫠 : ``` Tool Manager: Installing platformio/tool-ninja @ 1.7.1 UnknownPackageError: Could not find the package with 'platformio/tool-ninja @ 1.7.1' requirements for your system 'darwin_arm64' ``` I couldn't find an easy way to conditionally include packages in the `platformio.ini` so I've removed that version pin and added a comment. The original CI logs were [pretty unhelpful](https://github.com/memfault/platformio-esp32-espidf/actions/runs/10960960920/job/30436791360#step:5:182) so I've also added the `--verbose` flag to the build command. ### Test Plan CI --- Resolves: MCU-677
1 parent a4cb0c9 commit 904387e

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323

2424
- name: Install PlatformIO
2525
run: |
26-
pip install platformio==6.1.13
26+
pip install platformio==6.1.15
2727

2828
- name: Build
2929
run: |
30-
pio run
30+
pio run --verbose

platformio.ini

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,21 @@ board = esp32-c3-devkitc-02
1818

1919
; Strictly specify the versions used to build this project
2020
platform_packages =
21-
22-
23-
24-
21+
platformio/[email protected] ; (5.3.0)
22+
platformio/[email protected]
23+
platformio/[email protected] ; (4.5.1)
2524
espressif/[email protected]+20221002
2625
espressif/[email protected]+20221002
27-
platformio/[email protected] ; (2.35.0)
28-
espressif/[email protected]+20230208
26+
platformio/[email protected] ; (2.38.0)
27+
platformio/[email protected]+20240530
28+
29+
; The tools-ninja package does not have a version compatible with
30+
; both Linux and MacOS so skip adding it to the platform_packages,
31+
; but note the versions below should be picked up by each.
32+
; See https://registry.platformio.org/tools/platformio/tool-ninja
33+
; for versions and compatibility.
34+
; platformio/[email protected] ; compatible with Linux
35+
; platformio/[email protected] ; compatible with MacOS
2936

3037
; needed to tell Memfault that we are using a platformIO project
3138
board_build.cmake_extra_args =

0 commit comments

Comments
 (0)