diff --git a/.gitignore b/.gitignore index d0ad1081..94be47d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,12 @@ .vscode build/* data/* +managed_components/* +node_modules/* secrets.ini -node_modules package-lock.json +*.lock +sdkconfig.* +CMakeLists.txt +!sdkconfig.defaults !.gitkeep \ No newline at end of file diff --git a/platformio.ini b/platformio.ini index 2a82211..5394ac3 100644 --- a/platformio.ini +++ b/platformio.ini @@ -287,21 +287,26 @@ build_flags = [env:esp32_c6] platform = ${esp32_defaults.platform} +framework = arduino, espidf platform_packages = ${esp32_defaults.platform_packages} board = esp32-c6-devkitm-1 board_build.partitions = ${esp32_defaults.board_build.partitions} -lib_deps = - ${esp32_defaults.lib_deps} - ;${esp32_defaults.nimble_lib} -lib_ignore = ${esp32_defaults.lib_ignore} +lib_deps = ${esp32_defaults.lib_deps} +lib_ignore = + ${esp32_defaults.lib_ignore} extra_scripts = ${esp32_defaults.extra_scripts} build_unflags = -mtext-section-literals build_type = ${esp32_defaults.build_type} build_flags = ${esp32_defaults.build_flags} - ; Currently the NimBLE library is incompatible with ESP32 C6 - ;-D USE_BLE=1 + -D USE_BLE=1 + -D DEFAULT_OT_IN_GPIO=15 + -D DEFAULT_OT_OUT_GPIO=23 + -D DEFAULT_SENSOR_OUTDOOR_GPIO=0 + -D DEFAULT_SENSOR_INDOOR_GPIO=0 + -D DEFAULT_STATUS_LED_GPIO=11 + -D DEFAULT_OT_RX_LED_GPIO=10 [env:otthing] platform = ${esp32_defaults.platform} diff --git a/sdkconfig.defaults b/sdkconfig.defaults new file mode 100644 index 0000000..cd05530 --- /dev/null +++ b/sdkconfig.defaults @@ -0,0 +1,33 @@ +# Source: +# https://github.com/pioarduino/platform-espressif32/tree/main/examples/espidf-arduino-h2zero-BLE_scan + +CONFIG_FREERTOS_HZ=1000 +CONFIG_MBEDTLS_PSK_MODES=y +CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y +CONFIG_COMPILER_OPTIMIZATION_SIZE=y +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y +CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE=y + +# +# BT config +CONFIG_BT_ENABLED=y +CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y +CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n +CONFIG_BTDM_CTRL_MODE_BTDM=n +CONFIG_BT_BLUEDROID_ENABLED=n +CONFIG_BT_NIMBLE_ENABLED=y + +# +# Arduino Configuration +CONFIG_AUTOSTART_ARDUINO=y +CONFIG_ARDUINO_SELECTIVE_COMPILATION=y +CONFIG_ARDUINO_SELECTIVE_Zigbee=n +CONFIG_ARDUINO_SELECTIVE_Matter=n +CONFIG_ARDUINO_SELECTIVE_WiFiProv=n +CONFIG_ARDUINO_SELECTIVE_BLE=n +CONFIG_ARDUINO_SELECTIVE_BluetoothSerial=n +CONFIG_ARDUINO_SELECTIVE_SimpleBLE=n +CONFIG_ARDUINO_SELECTIVE_RainMaker=n +CONFIG_ARDUINO_SELECTIVE_OpenThread=n +CONFIG_ARDUINO_SELECTIVE_Insights=n \ No newline at end of file diff --git a/src/idf_component.yml b/src/idf_component.yml new file mode 100644 index 0000000..8f66bbe --- /dev/null +++ b/src/idf_component.yml @@ -0,0 +1,3 @@ +dependencies: + idf: ">=5.3.2" + h2zero/esp-nimble-cpp: ">=2.2.1" \ No newline at end of file