Skip to content

Commit

Permalink
First build with IDF, tested with esp32dev-ble only.
Browse files Browse the repository at this point in the history
  • Loading branch information
h2zero committed Oct 15, 2023
1 parent cbec429 commit 8cc415a
Show file tree
Hide file tree
Showing 6 changed files with 168 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@
**/.DS_Store
node_modules
*.ps1
main/certs/private*
main/certs/private*
CMakeLists.txt
dependencies.lock
sdkconfig.*
!sdkconfig.defaults
2 changes: 1 addition & 1 deletion environments.ini
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ custom_description = Infrared (Emitting and receiving) using IRremoteESP8266
[env:esp32dev-ble]
platform = ${com.esp32_platform}
board = esp32dev
board_build.partitions = min_spiffs.csv
board_build.partitions = partitions/min_spiffs.csv
lib_deps =
${com-esp32.lib_deps}
${libraries.ble}
Expand Down
1 change: 0 additions & 1 deletion main/ZgatewayBT.ino
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ QueueHandle_t BLEQueue;
# include <decoder.h>
# include <driver/adc.h>
# include <esp_bt.h>
# include <esp_bt_main.h>
# include <esp_wifi.h>

# include <atomic>
Expand Down
7 changes: 7 additions & 0 deletions partitions/min_spiffs.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x1E0000,
app1, app, ota_1, 0x1F0000,0x1E0000,
spiffs, data, spiffs, 0x3D0000,0x20000,
coredump, data, coredump,0x3F0000,0x10000,
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ lm75 = jeremycole/I2C Temperature Sensors derived from the LM75@^1.0.3
rn8209 = https://github.com/theengs/RN8209C-SDK.git#arduino

[env]
framework = arduino
framework = arduino, espidf
lib_deps =
${libraries.pubsubclient}
${libraries.arduinojson}
Expand Down
154 changes: 154 additions & 0 deletions sdkconfig.defaults
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
CONFIG_FREERTOS_HZ=1000
CONFIG_COAP_MBEDTLS_PSK=y

#
# Bluetooth
#
CONFIG_BT_ENABLED=y

#
# Bluetooth controller
#
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
# CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY is not set
# CONFIG_BTDM_CTRL_MODE_BTDM is not set
CONFIG_BTDM_CTRL_BLE_MAX_CONN=3
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
CONFIG_BTDM_CTRL_BLE_MAX_CONN_EFF=3
CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN_EFF=0
CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF=0
CONFIG_BTDM_CTRL_PINNED_TO_CORE_0=y
# CONFIG_BTDM_CTRL_PINNED_TO_CORE_1 is not set
CONFIG_BTDM_CTRL_PINNED_TO_CORE=0
CONFIG_BTDM_CTRL_HCI_MODE_VHCI=y
# CONFIG_BTDM_CTRL_HCI_MODE_UART_H4 is not set

#
# MODEM SLEEP Options
#
CONFIG_BTDM_CTRL_MODEM_SLEEP=y
CONFIG_BTDM_CTRL_MODEM_SLEEP_MODE_ORIG=y
# CONFIG_BTDM_CTRL_MODEM_SLEEP_MODE_EVED is not set
CONFIG_BTDM_CTRL_LPCLK_SEL_MAIN_XTAL=y
# end of MODEM SLEEP Options

CONFIG_BTDM_BLE_DEFAULT_SCA_250PPM=y
CONFIG_BTDM_BLE_SLEEP_CLOCK_ACCURACY_INDEX_EFF=1
CONFIG_BTDM_BLE_SCAN_DUPL=y
CONFIG_BTDM_SCAN_DUPL_TYPE_DEVICE=y
# CONFIG_BTDM_SCAN_DUPL_TYPE_DATA is not set
# CONFIG_BTDM_SCAN_DUPL_TYPE_DATA_DEVICE is not set
CONFIG_BTDM_SCAN_DUPL_TYPE=0
CONFIG_BTDM_SCAN_DUPL_CACHE_SIZE=100
# CONFIG_BTDM_BLE_MESH_SCAN_DUPL_EN is not set
CONFIG_BTDM_CTRL_FULL_SCAN_SUPPORTED=y
CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y
CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_CTRL_HLI=y
# end of Bluetooth controller

# CONFIG_BT_BLUEDROID_ENABLED is not set
# CONFIG_BT_NIMBLE_ENABLED is not set
CONFIG_BT_CONTROLLER_ONLY=y
# end of Bluetooth

#
# TLS Key Exchange Methods
#
CONFIG_MBEDTLS_PSK_MODES=y
CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK=y
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK=y
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y
# end of TLS Key Exchange Methods

#
# Arduino Configuration
#
CONFIG_ARDUINO_VARIANT="esp32"
CONFIG_ENABLE_ARDUINO_DEPENDS=y
CONFIG_AUTOSTART_ARDUINO=y
# CONFIG_ARDUINO_RUN_CORE0 is not set
CONFIG_ARDUINO_RUN_CORE1=y
# CONFIG_ARDUINO_RUN_NO_AFFINITY is not set
CONFIG_ARDUINO_RUNNING_CORE=1
CONFIG_ARDUINO_LOOP_STACK_SIZE=8192
# CONFIG_ARDUINO_EVENT_RUN_CORE0 is not set
CONFIG_ARDUINO_EVENT_RUN_CORE1=y
# CONFIG_ARDUINO_EVENT_RUN_NO_AFFINITY is not set
CONFIG_ARDUINO_EVENT_RUNNING_CORE=1
# CONFIG_ARDUINO_SERIAL_EVENT_RUN_CORE0 is not set
# CONFIG_ARDUINO_SERIAL_EVENT_RUN_CORE1 is not set
CONFIG_ARDUINO_SERIAL_EVENT_RUN_NO_AFFINITY=y
CONFIG_ARDUINO_SERIAL_EVENT_TASK_RUNNING_CORE=-1
CONFIG_ARDUINO_SERIAL_EVENT_TASK_STACK_SIZE=2048
CONFIG_ARDUINO_SERIAL_EVENT_TASK_PRIORITY=24
CONFIG_ARDUINO_UDP_RUN_CORE0=y
# CONFIG_ARDUINO_UDP_RUN_CORE1 is not set
# CONFIG_ARDUINO_UDP_RUN_NO_AFFINITY is not set
CONFIG_ARDUINO_UDP_RUNNING_CORE=0
CONFIG_ARDUINO_UDP_TASK_PRIORITY=3
# CONFIG_ARDUINO_ISR_IRAM is not set
# CONFIG_DISABLE_HAL_LOCKS is not set

#
# Debug Log Configuration
#
# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_NONE is not set
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_ERROR=y
# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_WARN is not set
# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_INFO is not set
# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_DEBUG is not set
# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_VERBOSE is not set
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL=1
# CONFIG_ARDUHAL_LOG_COLORS is not set
# CONFIG_ARDUHAL_ESP_LOG is not set
# end of Debug Log Configuration

# CONFIG_ARDUHAL_PARTITION_SCHEME_DEFAULT is not set
# CONFIG_ARDUHAL_PARTITION_SCHEME_MINIMAL is not set
# CONFIG_ARDUHAL_PARTITION_SCHEME_NO_OTA is not set
# CONFIG_ARDUHAL_PARTITION_SCHEME_HUGE_APP is not set
CONFIG_ARDUHAL_PARTITION_SCHEME_MIN_SPIFFS=y
CONFIG_ARDUHAL_PARTITION_SCHEME="min_spiffs"
# CONFIG_AUTOCONNECT_WIFI is not set
CONFIG_ARDUINO_SELECTIVE_COMPILATION=y
CONFIG_ARDUINO_SELECTIVE_ArduinoOTA=y
CONFIG_ARDUINO_SELECTIVE_AsyncUDP=y
# CONFIG_ARDUINO_SELECTIVE_AzureIoT is not set
# CONFIG_ARDUINO_SELECTIVE_BLE is not set
# CONFIG_ARDUINO_SELECTIVE_BluetoothSerial is not set
CONFIG_ARDUINO_SELECTIVE_DNSServer=y
CONFIG_ARDUINO_SELECTIVE_EEPROM=y
CONFIG_ARDUINO_SELECTIVE_ESP32=y
CONFIG_ARDUINO_SELECTIVE_ESPmDNS=y
CONFIG_ARDUINO_SELECTIVE_FFat=y
CONFIG_ARDUINO_SELECTIVE_FS=y
CONFIG_ARDUINO_SELECTIVE_HTTPClient=y
CONFIG_ARDUINO_SELECTIVE_LITTLEFS=y
CONFIG_ARDUINO_SELECTIVE_NetBIOS=y
CONFIG_ARDUINO_SELECTIVE_Preferences=y
CONFIG_ARDUINO_SELECTIVE_SD=y
CONFIG_ARDUINO_SELECTIVE_SD_MMC=y
# CONFIG_ARDUINO_SELECTIVE_SimpleBLE is not set
CONFIG_ARDUINO_SELECTIVE_SPI=y
CONFIG_ARDUINO_SELECTIVE_SPIFFS=y
CONFIG_ARDUINO_SELECTIVE_Ticker=y
CONFIG_ARDUINO_SELECTIVE_Update=y
CONFIG_ARDUINO_SELECTIVE_WebServer=y
CONFIG_ARDUINO_SELECTIVE_WiFi=y
CONFIG_ARDUINO_SELECTIVE_WiFiClientSecure=y
CONFIG_ARDUINO_SELECTIVE_WiFiProv=y
CONFIG_ARDUINO_SELECTIVE_Wire=y
# end of Arduino Configuration

0 comments on commit 8cc415a

Please sign in to comment.