Skip to content

Commit b22966d

Browse files
authored
Support arduino+espidf framework too (#2)
1 parent 396e862 commit b22966d

File tree

4 files changed

+26
-13
lines changed

4 files changed

+26
-13
lines changed

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
.pio
22
.vscode/.browse.c_cpp.db*
33
.vscode/c_cpp_properties.json
4-
.vscode/launch.json
54
.vscode/ipch
6-
managed_components/
5+
.vscode/launch.json
6+
/.build_cache
7+
/sdkconfig.arduino
78
dependencies.lock
8-
sdkconfig.espidf
9+
managed_components/
910
sdkconfig
10-
/.build_cache
11+
sdkconfig.espidf

platformio.ini

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
; Please visit documentation for the other options and examples
99
; https://docs.platformio.org/page/projectconf.html
1010

11+
[platformio]
12+
; Set a path to a cache folder
13+
build_cache_dir = .build_cache
14+
1115
[env]
1216
platform = espressif32
1317
board = esp32-c3-devkitc-02
@@ -23,12 +27,6 @@ board_build.esp-idf.extra_lf_files =
2327
; add coredump flash partition
2428
board_build.partitions = partitions_example.csv
2529

26-
[env:espidf]
27-
framework = espidf
28-
platform_packages =
29-
; get specific ESP-IDF version (5.1.2)
30-
framework-espidf@^3.50102.240122
31-
3230
; wrapper to run the memfault build id script on the output binary
3331
extra_scripts =
3432
post:add_build_id.py
@@ -43,7 +41,16 @@ build_flags =
4341
-Icomponents/memfault-firmware-sdk/components/include
4442
-include components/memfault-firmware-sdk/ports/include/memfault/ports/freertos_trace.h
4543

44+
[env:espidf]
45+
framework = espidf
46+
platform_packages =
47+
; get specific ESP-IDF version (5.1.2)
48+
framework-espidf@^3.50102.240122
4649

47-
[platformio]
48-
; Set a path to a cache folder
49-
build_cache_dir = .build_cache
50+
[env:arduino]
51+
framework = arduino, espidf
52+
platform_packages =
53+
platformio/framework-arduinoespressif32@~3.20014.0
54+
board_build.cmake_extra_args =
55+
-DPLATFORMIO_ENABLED=TRUE
56+
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.arduino"

sdkconfig.defaults

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,6 @@ CONFIG_MBEDTLS_DYNAMIC_FREE_CA_CERT=y
4444

4545
# Trigger an assert if any malloc fails
4646
CONFIG_MEMFAULT_ASSERT_ON_ALLOC_FAILURE=y
47+
48+
# Required for arduino
49+
# CONFIG_FREERTOS_HZ=1000

sdkconfig.defaults.arduino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Required for arduino
2+
CONFIG_FREERTOS_HZ=1000

0 commit comments

Comments
 (0)