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..bc6adac 100644 --- a/platformio.ini +++ b/platformio.ini @@ -303,6 +303,32 @@ build_flags = ; Currently the NimBLE library is incompatible with ESP32 C6 ;-D USE_BLE=1 +[env:esp32_c6_ble] +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} +lib_ignore = + ${esp32_defaults.lib_ignore} + BLE + BluetoothSerial + SimpleBLE + WiFiProv +board_build.embed_txtfiles = + managed_components/espressif__esp_insights/server_certs/https_server.crt + managed_components/espressif__esp_rainmaker/server_certs/rmaker_mqtt_server.crt + managed_components/espressif__esp_rainmaker/server_certs/rmaker_claim_service_server.crt + managed_components/espressif__esp_rainmaker/server_certs/rmaker_ota_server.crt +extra_scripts = ${esp32_defaults.extra_scripts} +build_unflags = + -mtext-section-literals +build_type = ${esp32_defaults.build_type} +build_flags = + ${esp32_defaults.build_flags} + -D USE_BLE=1 + [env:otthing] platform = ${esp32_defaults.platform} platform_packages = ${esp32_defaults.platform_packages} diff --git a/sdkconfig.defaults b/sdkconfig.defaults new file mode 100644 index 0000000..f39c590 --- /dev/null +++ b/sdkconfig.defaults @@ -0,0 +1,24 @@ +# 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_ARDUINO_SELECTIVE_COMPILATION=y +CONFIG_AUTOSTART_ARDUINO=y \ 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