Git Product home page Git Product logo

Comments (35)

elliottkember avatar elliottkember commented on May 19, 2024 1

@h2zero I finally got around to setting this up - and it works great! Thank you so much!

from nimble-arduino.

h2zero avatar h2zero commented on May 19, 2024

Yep, using this directly in esp-idf could be troublesome. I would need to create a makefile for the port and since nimble is available in idf I haven't done that.

You could use my other repo here. Just need to put that in your project components folder.

But then you have some work to do as I haven't gotten around to making it easy yet.

You'll need to get nimble folder from idf v3.3 in the components folder and copy it over to your 3.2 esp-idf/components. At that point you might encounter a compile issue, or maybe not, it's been a while since I did that operation. If you have an issue compiling this way let me know, I've seen them all 😄.

from nimble-arduino.

elliottkember avatar elliottkember commented on May 19, 2024

Thank you! I made a component.mk and it was encouraging that it compiled, but I was confused by the linking part.

What I should probably do is upgrade to ESP v3.3, I believe esp32-arduino works with that version now in a branch. I was hitting the issue described in espressif/esp32-arduino-lib-builder#10

from nimble-arduino.

h2zero avatar h2zero commented on May 19, 2024

Yeah I had that issue too with 3.3, had to use the esp32-arduino v3.3 latest branch

This reminds me, I need to work on the idf side of this project, been neglecting that lately.

from nimble-arduino.

elliottkember avatar elliottkember commented on May 19, 2024

Ah, now I get this:

components/nimble-esp32/src/FreeRTOS.h:65:31: error: 'RingbufferType_t' has not been declared

Looks like that got renamed from ringbuf_type_t between v3.3 and v4.0

from nimble-arduino.

h2zero avatar h2zero commented on May 19, 2024

Are you using an older commit of this library? That issue was fixed (or so I thought) a while ago.

from nimble-arduino.

h2zero avatar h2zero commented on May 19, 2024

I had a second to try this again in 3.2 I forgot there's a few things that need to be done to make it work. I think I will make a branch on the esp-nimble-cpp repo for that backport so it can just be added to the project/components folder. Easy enough to do.

from nimble-arduino.

elliottkember avatar elliottkember commented on May 19, 2024

That'd be great! I'd love to get my project upgraded to v3.3, but so far it's been tricky - it also seems like v4.0 support could drop any day now so I'm looking forward to that. v3.2 is working well, just trying to free up a bit more memory for HTTPS and OTA things. Bluedroid uses so much.

I'm trying again with v3.3 and getting the same error with components/nimble-arduino/src/FreeRTOS.h:65:31: error: 'RingbufferType_t' has not been declared - is it the #ifdef ESP_IDF_VERSION define flag that's not detecting it correctly?

I'm also still getting the above error undefined reference to NimBLEServer::getAdvertising()` when linking. I guess this is where the library isn't getting compiled during the compilation step.

The closest I've got is esp-idf/components/esp32/esp_adapter.c:587:20: error: 'os_get_random' undeclared here (not in a function)

from nimble-arduino.

h2zero avatar h2zero commented on May 19, 2024

Sorry you're having these issues, I just realized I had updated idf to v3.3.2, that is where the ESP_IDF_VERSION was first defined but that came after the change to RingbufferType_t I believe. So there was a gap between those in 3.3, not 100% sure of that but I'll check.

The undefined references are odd, not sure about those. Are you using the NimBLE-Arduino(not working in IDF yet) library or the esp-nimble-cpp library?

I did make the proper IDF 3.2 backport last night, compiles and runs but was getting strange errors on test, I think it was something in my sdkconfig, but it was late and didn't have the energy to fix it. I'll try to put it up tonight.

from nimble-arduino.

h2zero avatar h2zero commented on May 19, 2024

As promised here is a quick idf 3.2 NimBLE backport. You just need to add it to your project/components folder. Then add esp-nimble-cpp as another component in project/components along side the arduino component, if you wish, and include NimBLEDevice.h in main.cpp.

One thing I should mention is while testing I was getting the occasional assert from rwble.c which is part of the BLE controller binary, nothing I can do about it here sadly, hopefully for your use it doesn't happen. If you do have this issue, the only solution is to update IDF, I'll keep working on the 3.3 and 4.0 issues in the meantime.

Edit: Same setup with IDF v3.3 @367c3c09c seems to be working fine (no rwble.c errors yet), even though NimBLE is included in that version, this one is more up to date. I think I should combine them into a single component since it can be used in multiple IDF versions this way.

from nimble-arduino.

elliottkember avatar elliottkember commented on May 19, 2024

Thank you! I’ll try this out this evening when I get some time. I was using the Arduino version which would explain it.

from nimble-arduino.

h2zero avatar h2zero commented on May 19, 2024

@elliottkember No problem, you may have to mess with menuconfig a little (probably not, but that depends). Worked for me with defaults mostly. Let me know how it works out for you.

from nimble-arduino.

elliottkember avatar elliottkember commented on May 19, 2024

Looks like I saved 32kb of heap, and heap fragmentation went down a ton after switching from Bluedroid. For reference, I'm using Bluetooth LE and WiFi simultaneously for an LED project, plus a homekit stack that needs a lot of allocation heap space to pair. Now an ESP32-Pico with no external SPI ram can run all these things perfectly!

from nimble-arduino.

h2zero avatar h2zero commented on May 19, 2024

Glad to hear it 😄

from nimble-arduino.

h2zero avatar h2zero commented on May 19, 2024

@elliottkember What BLE roles are you using in your project (client, server, scan, advertise)?

from nimble-arduino.

elliottkember avatar elliottkember commented on May 19, 2024

@elliottkember What BLE roles are you using in your project (client, server, scan, advertise)?

Server / advertise. Controlling an ESP32 from a mobile app

from nimble-arduino.

ntwallace avatar ntwallace commented on May 19, 2024

@h2zero I may be doing something wrong here, but after migrating from arduino-esp32 to IDF v3.3 with Arduino as a component I'm getting the same linking error after compiling. I added this as a component and configured in menuconfig. Is there another step I'm missing?

I am able to get it to link if I remove esp-nimble-component, enable the default nimBLE in IDF 3.3, and gut the Arduino Bluedroid libs out. However, calling NimBLEDevice::init(DEVICE_NAME); results in a panic boot loop due to an assertion failing in timers.c internally:

D (790) boot: configure drom and irom and start
D (794) boot: start: 0x400812c4
/Users/nick/esp-idf/components/freertos/timers.c:922 (prvCheckForValidListAndQueue)- assert failed!
abort() was called at PC 0x4009337b on core 0
0x400900db: invoke_abort at /Users/nick/esp-idf/components/esp32/panic.c line 156
0x400903b1: abort at /Users/nick/esp-idf/components/esp32/panic.c line 171
0x4009337b: prvCheckForValidListAndQueue at /Users/nick/esp-idf/components/freertos/timers.c line 922
0x4009338b: xTimerCreateTimerTask at /Users/nick/esp-idf/components/freertos/timers.c line 270
0x400921ac: vTaskStartScheduler at /Users/nick/esp-idf/components/freertos/tasks.c line 2057
0x40081227: start_cpu0_default at /Users/nick/esp-idf/components/esp32/cpu_start.c line 445
0x400813fd: call_start_cpu0 at /Users/nick/esp-idf/components/esp32/cpu_start.c line 256```

from nimble-arduino.

h2zero avatar h2zero commented on May 19, 2024

Hi @ntwallace are you trying to use the NimBLE-Arduino library? When using IDF you will need to use the component library you linked as well as esp-nimble-cpp instead of this one. After that you shouldn't need to disable any libs etc in menuconfig.

from nimble-arduino.

ntwallace avatar ntwallace commented on May 19, 2024

Hi @ntwallace are you trying to use the NimBLE-Arduino library? When using IDF you will need to use the component library you linked as well as esp-nimble-cpp instead of this one. After that you shouldn't need to disable any libs etc in menuconfig.

@h2zero 🤦‍♂️ thanks.

It looks like esp-nimble-cpp will only compile for v4.0+ because of the changes to CMAKE for idf_component_register() vs the older register_component(). I attempted to modify the cmakelists file to use the older format, but am getting build errors telling me it can't find header files, e.g.:

../components/esp-nimble-cpp/src/NimBLEUUID.h:20:27: fatal error: host/ble_uuid.h: No such file or directory
../components/esp-nimble-cpp/src/NimBLELog.h:13:27: fatal error: syscfg/syscfg.h: No such file or directory

My modified CMakeLists.txt file looks like this, do you see any obvious errors?

set(SUPPORTED_TARGETS esp32)

#idf_component_register(SRCS "src/FreeRTOS.cpp"
#                            "src/NimBLE2904.cpp"
#                            "src/NimBLEAddress.cpp"
#                            "src/NimBLEAdvertisedDevice.cpp"
#                            "src/NimBLEAdvertising.cpp"
#                            "src/NimBLEBeacon.cpp"
#                             "src/NimBLECharacteristic.cpp"
#                             "src/NimBLEClient.cpp"
#                             "src/NimBLEDescriptor.cpp"
#                             "src/NimBLEDevice.cpp"
#                             "src/NimBLEEddystoneTLM.cpp"
#                             "src/NimBLEEddystoneURL.cpp"
#                            "src/NimBLERemoteCharacteristic.cpp"
#                             "src/NimBLERemoteDescriptor.cpp"
#                             "src/NimBLERemoteService.cpp"
#                             "src/NimBLEScan.cpp"
#                             "src/NimBLESecurity.cpp"
#                             "src/NimBLEServer.cpp"
#                             "src/NimBLEService.cpp"
#                             "src/NimBLEUtils.cpp"
#                             "src/NimBLEUUID.cpp"
#                   INCLUDE_DIRS "src"
#                   REQUIRES bt)

# idf_component_register(SRCS "${MAIN_SRCS}" INCLUDE_DIRS ".")

set(COMPONENT_ADD_INCLUDEDIRS
            src
            .
)

set(COMPONENT_SRCS
    "src/FreeRTOS.cpp"
    "src/NimBLE2904.cpp"
    "src/NimBLEAddress.cpp"
    "src/NimBLEAdvertisedDevice.cpp"
    "src/NimBLEAdvertising.cpp"
    "src/NimBLEBeacon.cpp"
    "src/NimBLECharacteristic.cpp"
    "src/NimBLEClient.cpp"
    "src/NimBLEDescriptor.cpp"
    "src/NimBLEDevice.cpp"
    "src/NimBLEEddystoneTLM.cpp"
    "src/NimBLEEddystoneURL.cpp"
    "src/NimBLERemoteCharacteristic.cpp"
    "src/NimBLERemoteDescriptor.cpp"
    "src/NimBLERemoteService.cpp"
    "src/NimBLEScan.cpp"
    "src/NimBLESecurity.cpp"
    "src/NimBLEServer.cpp"
    "src/NimBLEService.cpp"
    "src/NimBLEUtils.cpp"
)

set(COMPONENT_PRIV_REQUIRES bt)

register_component()

from nimble-arduino.

h2zero avatar h2zero commented on May 19, 2024

I'm not sure what errors you're seeing when compiling with IDF 3.2/3.3, I have no issues with those versions with esp-nimble-cpp as is. Should be no need to alter make files. I'll have a closer look when I get a chance though.

from nimble-arduino.

ntwallace avatar ntwallace commented on May 19, 2024

Thanks. Idf_component_register() is only supported on IDF 4.0 and up, so compiling under 3.3 as is fails with

[0/1] Re-running CMake...
-- Building for target esp32
CMake Error at /Users/nick/Documents/ESPLED/firmware/components/esp-nimble-cpp/CMakeLists.txt:7 (idf_component_register):
  Unknown CMake command "idf_component_register".
Call Stack (most recent call first):
  /Users/nick/esp-idf/tools/cmake/scripts/expand_requirements.cmake:107 (include)

FWIW it seems that under 3.3 the compiler is unable to find the underlying header files included in the esp-nimble-cpp files that are located in the esp-nimble-component source. For example, NimBLEAddress.h has an include on line 20 for "nimble/ble.h", but the compiler isn't correctly getting to esp-nimble-component/nimble/nimble/include/ble.h

from nimble-arduino.

h2zero avatar h2zero commented on May 19, 2024

Sorry I didn't notice earlier (hard to read on phone sometimes), you are using cmake. I didn't test against cmake for IDF 3.2/3.3 as that was a v4.0 change.

My apologies, it should work fine with make. I'm not sure what would need to be done to get cmake to compile it in 3.3, I'll have to play with this.

from nimble-arduino.

ntwallace avatar ntwallace commented on May 19, 2024

No worries at all, appreciate your responsiveness. I'll keep working on it tomorrow as well.

from nimble-arduino.

ntwallace avatar ntwallace commented on May 19, 2024

@h2zero fixed the compile issue by explicitly calling esp-nimble-component in the requires list for esp-nimble-cpp in cmakelists. For future reference, this is the working file for compiling with cmake on 3.3:

# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.15.4)

set(SUPPORTED_TARGETS esp32)

set(COMPONENT_SRCS
    "src/FreeRTOS.cpp"
    "src/NimBLE2904.cpp"
    "src/NimBLEAddress.cpp"
    "src/NimBLEAdvertisedDevice.cpp"
    "src/NimBLEAdvertising.cpp"
    "src/NimBLEBeacon.cpp"
    "src/NimBLECharacteristic.cpp"
    "src/NimBLEClient.cpp"
    "src/NimBLEDescriptor.cpp"
    "src/NimBLEDevice.cpp"
    "src/NimBLEEddystoneTLM.cpp"
    "src/NimBLEEddystoneURL.cpp"
    "src/NimBLERemoteCharacteristic.cpp"
    "src/NimBLERemoteDescriptor.cpp"
    "src/NimBLERemoteService.cpp"
    "src/NimBLEScan.cpp"
    "src/NimBLESecurity.cpp"
    "src/NimBLEServer.cpp"
    "src/NimBLEService.cpp"
    "src/NimBLEUtils.cpp"
)

set(COMPONENT_ADD_INCLUDEDIRS
    src
)

set(COMPONENT_PRIV_REQUIRES 
    esp-nimble-component
    nvs_flash
    bt
)

register_component()

Unfortunately, I still get the same boot loop after flashing that I was before with NimBLE-Arduino in IDF. I'm wondering if there's a menuconfig setting that's causing this:

D (800) boot: start: 0x400812c4
abort() was called at PC 0x4009337b on core 0
0x4008f39f: invoke_abort at /Users/nick/esp-idf/components/esp32/panic.c line 156
0x4008f675: abort at /Users/nick/esp-idf/components/esp32/panic.c line 171
0x400811c2: start_cpu0_default at /Users/nick/esp-idf/components/esp32/cpu_start.c line 446
0x40081395: call_start_cpu0 at /Users/nick/esp-idf/components/esp32/cpu_start.c line 256

from nimble-arduino.

h2zero avatar h2zero commented on May 19, 2024

Glad you got it compiled. How did you setup sdkconfig? Normally when using Arduino as a component I copy the sdkconfig from the arduino core repo to main folder then use menuconfig to adjust settings. Give that a try if you haven't already.

from nimble-arduino.

ntwallace avatar ntwallace commented on May 19, 2024

Ok thanks. My sdkconfig was originally based on the default Arduino sdkconfig, but I have made some changes. I'll go back and check and try to match.

One other note, when I enable NimBLE debugging (CONFIG_BT_NIMBLE_DEBUG=y), I can no longer compile. Does that work for you? I get issues where it's trying to use sizeof() on a bit in C.

In file included from /Users/nick/esp-idf/components/newlib/platform_include/assert.h:23:0,
                 from ../components/esp-nimble-component/nimble/porting/nimble/include/os/os.h:23,
                 from ../components/esp-nimble-component/nimble/nimble/include/nimble/ble.h:26,
                 from ../components/esp-nimble-component/nimble/nimble/host/src/ble_gatts.c:23:
../components/esp-nimble-component/nimble/nimble/host/src/ble_gatts.c: In function 'ble_gatts_bonding_established':
/Users/nick/esp-idf/components/newlib/include/assert.h:14:36: error: 'sizeof' applied to a bit-field
 # define assert(__e) ((void) sizeof(__e))
                                    ^
../components/esp-nimble-component/nimble/nimble/host/src/ble_hs_priv.h:171:34: note: in expansion of macro 'assert'
     #define BLE_HS_DBG_ASSERT(x) assert(x)
                                  ^
../components/esp-nimble-component/nimble/nimble/host/src/ble_gatts.c:1692:5: note: in expansion of macro 'BLE_HS_DBG_ASSERT'
     BLE_HS_DBG_ASSERT(conn->bhc_sec_state.bonded);
     ^
../components/esp-nimble-component/nimble/nimble/host/src/ble_gatts.c: In function 'ble_gatts_bonding_restored':
/Users/nick/esp-idf/components/newlib/include/assert.h:14:36: error: 'sizeof' applied to a bit-field
 # define assert(__e) ((void) sizeof(__e))
                                    ^
../components/esp-nimble-component/nimble/nimble/host/src/ble_hs_priv.h:171:34: note: in expansion of macro 'assert'
     #define BLE_HS_DBG_ASSERT(x) assert(x)
                                  ^
../components/esp-nimble-component/nimble/nimble/host/src/ble_gatts.c:1743:5: note: in expansion of macro 'BLE_HS_DBG_ASSERT'
     BLE_HS_DBG_ASSERT(conn->bhc_sec_state.bonded);

from nimble-arduino.

h2zero avatar h2zero commented on May 19, 2024

That's an interesting one, I have never seen this error before, must be something to do with using cmake.

Do you get any errors when using make?

from nimble-arduino.

ntwallace avatar ntwallace commented on May 19, 2024

Same exact error using make

In file included from /Users/nick/esp-idf/components/newlib/platform_include/assert.h:23:0,
                 from /Users/nick/Documents/ESPLED/firmware/components/esp-nimble-component/nimble/porting/nimble/include/os/os.h:23,
                 from /Users/nick/Documents/ESPLED/firmware/components/esp-nimble-component/nimble/nimble/include/nimble/ble.h:26,
                 from /Users/nick/Documents/ESPLED/firmware/components/esp-nimble-component/nimble/nimble/host/src/ble_gatts.c:23:
/Users/nick/Documents/ESPLED/firmware/components/esp-nimble-component/nimble/nimble/host/src/ble_gatts.c: In function 'ble_gatts_bonding_established':
/Users/nick/esp-idf/components/newlib/include/assert.h:14:36: error: 'sizeof' applied to a bit-field
 # define assert(__e) ((void) sizeof(__e))
                                    ^
/Users/nick/Documents/ESPLED/firmware/components/esp-nimble-component/nimble/nimble/host/src/ble_hs_priv.h:171:34: note: in expansion of macro 'assert'
     #define BLE_HS_DBG_ASSERT(x) assert(x)
                                  ^
/Users/nick/Documents/ESPLED/firmware/components/esp-nimble-component/nimble/nimble/host/src/ble_gatts.c:1692:5: note: in expansion of macro 'BLE_HS_DBG_ASSERT'
     BLE_HS_DBG_ASSERT(conn->bhc_sec_state.bonded);
     ^
/Users/nick/Documents/ESPLED/firmware/components/esp-nimble-component/nimble/nimble/host/src/ble_gatts.c: In function 'ble_gatts_bonding_restored':
/Users/nick/esp-idf/components/newlib/include/assert.h:14:36: error: 'sizeof' applied to a bit-field
 # define assert(__e) ((void) sizeof(__e))
                                    ^
/Users/nick/Documents/ESPLED/firmware/components/esp-nimble-component/nimble/nimble/host/src/ble_hs_priv.h:171:34: note: in expansion of macro 'assert'
     #define BLE_HS_DBG_ASSERT(x) assert(x)
                                  ^
/Users/nick/Documents/ESPLED/firmware/components/esp-nimble-component/nimble/nimble/host/src/ble_gatts.c:1743:5: note: in expansion of macro 'BLE_HS_DBG_ASSERT'
     BLE_HS_DBG_ASSERT(conn->bhc_sec_state.bonded);

What's especially crazy about the assert boot loop I'm getting is that it's so low level that nothing is running in app_main() before it happens. I called NimBLEDevice::init(DEVICE_NAME); at the end of app_main(), after about 150 lines of code (including logs), and nothing happens at all when the device starts up. It starts/tries to start the CPU and then crashes. Everything runs as expected without the BLE init call.

from nimble-arduino.

h2zero avatar h2zero commented on May 19, 2024

I just had a chance to test this issue using cmake. After correcting the cmake files it builds and runs as expected (without arduino component). I will try with Arduino next, Can you post your sdkconfig?

from nimble-arduino.

ntwallace avatar ntwallace commented on May 19, 2024

Interesting ok. Sure, here it is. FYI this is setup for a WROVER board with 16MB flash and a partition offset at 0x10000:

#
# Automatically generated file; DO NOT EDIT.
# Espressif IoT Development Framework Configuration
#
CONFIG_IDF_TARGET="esp32"
CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000

#
# SDK tool configuration
#
CONFIG_TOOLPREFIX="xtensa-esp32-elf-"
CONFIG_PYTHON="python"
CONFIG_MAKE_WARN_UNDEFINED_VARIABLES=y

#
# Application manager
#
CONFIG_APP_COMPILE_TIME_DATE=y
CONFIG_APP_EXCLUDE_PROJECT_VER_VAR=
CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR=
CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16

#
# Arduino Configuration
#
CONFIG_ENABLE_ARDUINO_DEPENDS=y
CONFIG_AUTOSTART_ARDUINO=
CONFIG_ARDUINO_RUN_CORE0=
CONFIG_ARDUINO_RUN_CORE1=y
CONFIG_ARDUINO_RUN_NO_AFFINITY=
CONFIG_ARDUINO_RUNNING_CORE=1
CONFIG_ARDUINO_EVENT_RUN_CORE0=
CONFIG_ARDUINO_EVENT_RUN_CORE1=y
CONFIG_ARDUINO_EVENT_RUN_NO_AFFINITY=
CONFIG_ARDUINO_EVENT_RUNNING_CORE=1
CONFIG_ARDUINO_UDP_RUN_CORE0=
CONFIG_ARDUINO_UDP_RUN_CORE1=y
CONFIG_ARDUINO_UDP_RUN_NO_AFFINITY=
CONFIG_ARDUINO_UDP_RUNNING_CORE=1
CONFIG_DISABLE_HAL_LOCKS=

#
# Debug Log Configuration
#
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_NONE=
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_ERROR=y
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_WARN=
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_INFO=
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_DEBUG=
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_VERBOSE=
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL=1
CONFIG_ARDUHAL_LOG_COLORS=
CONFIG_ARDUHAL_ESP_LOG=y
CONFIG_ARDUHAL_PARTITION_SCHEME_DEFAULT=y
CONFIG_ARDUHAL_PARTITION_SCHEME_MINIMAL=
CONFIG_ARDUHAL_PARTITION_SCHEME_NO_OTA=
CONFIG_ARDUHAL_PARTITION_SCHEME_HUGE_APP=
CONFIG_ARDUHAL_PARTITION_SCHEME_MIN_SPIFFS=
CONFIG_ARDUHAL_PARTITION_SCHEME="default"
CONFIG_ARDUINO_SELECTIVE_COMPILATION=y
CONFIG_ARDUINO_SELECTIVE_ArduinoOTA=y
CONFIG_ARDUINO_SELECTIVE_AsyncUDP=y
CONFIG_ARDUINO_SELECTIVE_AzureIoT=
CONFIG_ARDUINO_SELECTIVE_BLE=
CONFIG_ARDUINO_SELECTIVE_BluetoothSerial=
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=
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=
CONFIG_ARDUINO_SELECTIVE_SPI=y
CONFIG_ARDUINO_SELECTIVE_SPIFFS=
CONFIG_ARDUINO_SELECTIVE_Ticker=y
CONFIG_ARDUINO_SELECTIVE_Update=y
CONFIG_ARDUINO_SELECTIVE_WebServer=
CONFIG_ARDUINO_SELECTIVE_WiFi=y
CONFIG_ARDUINO_SELECTIVE_WiFiClientSecure=
CONFIG_ARDUINO_SELECTIVE_Wire=y

#
# Bootloader config
#
CONFIG_LOG_BOOTLOADER_LEVEL_NONE=
CONFIG_LOG_BOOTLOADER_LEVEL_ERROR=
CONFIG_LOG_BOOTLOADER_LEVEL_WARN=
CONFIG_LOG_BOOTLOADER_LEVEL_INFO=
CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG=
CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE=y
CONFIG_LOG_BOOTLOADER_LEVEL=5
CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V=y
CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=
CONFIG_BOOTLOADER_FACTORY_RESET=
CONFIG_BOOTLOADER_APP_TEST=
CONFIG_BOOTLOADER_WDT_ENABLE=
CONFIG_APP_ROLLBACK_ENABLE=

#
# Security features
#
CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT=
CONFIG_SECURE_BOOT_ENABLED=
CONFIG_FLASH_ENCRYPTION_ENABLED=

#
# NimBLE Options
#
CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL=
CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_DEFAULT=y
CONFIG_BT_NIMBLE_MAX_CONNECTIONS=3
CONFIG_BT_NIMBLE_MAX_BONDS=3
CONFIG_BT_NIMBLE_MAX_CCCDS=8
CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM=0
CONFIG_BT_NIMBLE_PINNED_TO_CORE_0=y
CONFIG_BT_NIMBLE_PINNED_TO_CORE_1=
CONFIG_BT_NIMBLE_PINNED_TO_CORE=0
CONFIG_BT_NIMBLE_TASK_STACK_SIZE=4096
CONFIG_BT_NIMBLE_ROLE_CENTRAL=
CONFIG_BT_NIMBLE_ROLE_PERIPHERAL=y
CONFIG_BT_NIMBLE_ROLE_BROADCASTER=y
CONFIG_BT_NIMBLE_ROLE_OBSERVER=
CONFIG_BT_NIMBLE_NVS_PERSIST=y
CONFIG_BT_NIMBLE_SM_LEGACY=y
CONFIG_BT_NIMBLE_SM_SC=y
CONFIG_BT_NIMBLE_DEBUG=
CONFIG_BT_NIMBLE_SM_SC_DEBUG_KEYS=
CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME="nimble"
CONFIG_BT_NIMBLE_GAP_DEVICE_NAME_MAX_LEN=31
CONFIG_BT_NIMBLE_ATT_PREFERRED_MTU=256
CONFIG_BT_NIMBLE_SVC_GAP_APPEARANCE=0
CONFIG_BT_NIMBLE_ACL_BUF_COUNT=12
CONFIG_BT_NIMBLE_ACL_BUF_SIZE=255
CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70
CONFIG_BT_NIMBLE_HCI_EVT_HI_BUF_COUNT=30
CONFIG_BT_NIMBLE_HCI_EVT_LO_BUF_COUNT=8
CONFIG_BT_NIMBLE_MSYS1_BLOCK_COUNT=12
CONFIG_BT_NIMBLE_HS_FLOW_CTRL=y
CONFIG_BT_NIMBLE_HS_FLOW_CTRL_ITVL=1000
CONFIG_BT_NIMBLE_HS_FLOW_CTRL_THRESH=2
CONFIG_BT_NIMBLE_HS_FLOW_CTRL_TX_ON_DISCONNECT=y
CONFIG_BT_NIMBLE_RPA_TIMEOUT=900
CONFIG_BT_NIMBLE_MESH=

#
# ESP-NimBLE-CPP configuration
#
CONFIG_NIMBLE_CPP_ENABLE_RETURN_CODE_TEXT=y
CONFIG_NIMBLE_CPP_ENABLE_GAP_EVENT_CODE_TEXT=y
CONFIG_NIMBLE_CPP_ENABLE_ADVERTISMENT_TYPE_TEXT=

#
# Serial flasher config
#
CONFIG_ESPTOOLPY_PORT="/dev/tty.SLAB_USBtoUART"
CONFIG_ESPTOOLPY_BAUD_115200B=
CONFIG_ESPTOOLPY_BAUD_230400B=
CONFIG_ESPTOOLPY_BAUD_921600B=
CONFIG_ESPTOOLPY_BAUD_2MB=
CONFIG_ESPTOOLPY_BAUD_OTHER=y
CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=460800
CONFIG_ESPTOOLPY_BAUD=460800
CONFIG_ESPTOOLPY_COMPRESSED=y
CONFIG_FLASHMODE_QIO=
CONFIG_FLASHMODE_QOUT=
CONFIG_FLASHMODE_DIO=y
CONFIG_FLASHMODE_DOUT=
CONFIG_ESPTOOLPY_FLASHMODE="dio"
CONFIG_ESPTOOLPY_FLASHFREQ_80M=
CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
CONFIG_ESPTOOLPY_FLASHFREQ_26M=
CONFIG_ESPTOOLPY_FLASHFREQ_20M=
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
CONFIG_ESPTOOLPY_FLASHSIZE_1MB=
CONFIG_ESPTOOLPY_FLASHSIZE_2MB=
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="16MB"
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
CONFIG_ESPTOOLPY_BEFORE_RESET=y
CONFIG_ESPTOOLPY_BEFORE_NORESET=
CONFIG_ESPTOOLPY_BEFORE="default_reset"
CONFIG_ESPTOOLPY_AFTER_RESET=y
CONFIG_ESPTOOLPY_AFTER_NORESET=
CONFIG_ESPTOOLPY_AFTER="hard_reset"
CONFIG_MONITOR_BAUD_9600B=
CONFIG_MONITOR_BAUD_57600B=
CONFIG_MONITOR_BAUD_115200B=y
CONFIG_MONITOR_BAUD_230400B=
CONFIG_MONITOR_BAUD_921600B=
CONFIG_MONITOR_BAUD_2MB=
CONFIG_MONITOR_BAUD_OTHER=
CONFIG_MONITOR_BAUD_OTHER_VAL=115200
CONFIG_MONITOR_BAUD=115200

#
# Partition Table
#
CONFIG_PARTITION_TABLE_SINGLE_APP=
CONFIG_PARTITION_TABLE_TWO_OTA=
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x10000
CONFIG_PARTITION_TABLE_MD5=y

#
# Compiler options
#
CONFIG_OPTIMIZATION_LEVEL_DEBUG=
CONFIG_OPTIMIZATION_LEVEL_RELEASE=y
CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=
CONFIG_OPTIMIZATION_ASSERTIONS_SILENT=
CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED=y
CONFIG_CXX_EXCEPTIONS=
CONFIG_STACK_CHECK_NONE=y
CONFIG_STACK_CHECK_NORM=
CONFIG_STACK_CHECK_STRONG=
CONFIG_STACK_CHECK_ALL=
CONFIG_STACK_CHECK=
CONFIG_WARN_WRITE_STRINGS=y
CONFIG_DISABLE_GCC8_WARNINGS=

#
# Component config
#

#
# Application Level Tracing
#
CONFIG_ESP32_APPTRACE_DEST_TRAX=
CONFIG_ESP32_APPTRACE_DEST_NONE=y
CONFIG_ESP32_APPTRACE_ENABLE=
CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y
CONFIG_AWS_IOT_SDK=

#
# Bluetooth
#
CONFIG_BT_ENABLED=y

#
# Bluetooth controller
#
CONFIG_BTDM_CONTROLLER_MODE_BLE_ONLY=y
CONFIG_BTDM_CONTROLLER_MODE_BR_EDR_ONLY=
CONFIG_BTDM_CONTROLLER_MODE_BTDM=
CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN=3
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
CONFIG_BTDM_CTRL_AUTO_LATENCY_EFF=
CONFIG_BTDM_CTRL_LEGACY_AUTH_VENDOR_EVT_EFF=
CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=3
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=0
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0
CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE_0=y
CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE_1=
CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0
CONFIG_BTDM_CONTROLLER_HCI_MODE_VHCI=y
CONFIG_BTDM_CONTROLLER_HCI_MODE_UART_H4=

#
# MODEM SLEEP Options
#
CONFIG_BTDM_CONTROLLER_MODEM_SLEEP=y
CONFIG_BTDM_MODEM_SLEEP_MODE_ORIG=y
CONFIG_BTDM_MODEM_SLEEP_MODE_EVED=
CONFIG_BTDM_LPCLK_SEL_MAIN_XTAL=y
CONFIG_BLE_SCAN_DUPLICATE=y
CONFIG_SCAN_DUPLICATE_BY_DEVICE_ADDR=y
CONFIG_SCAN_DUPLICATE_BY_ADV_DATA=
CONFIG_SCAN_DUPLICATE_BY_ADV_DATA_AND_DEVICE_ADDR=
CONFIG_SCAN_DUPLICATE_TYPE=0
CONFIG_DUPLICATE_SCAN_CACHE_SIZE=200
CONFIG_BLE_MESH_SCAN_DUPLICATE_EN=
CONFIG_BTDM_CONTROLLER_FULL_SCAN_SUPPORTED=y
CONFIG_BLE_ADV_REPORT_FLOW_CONTROL_SUPPORTED=y
CONFIG_BLE_ADV_REPORT_FLOW_CONTROL_NUM=100
CONFIG_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
CONFIG_BTDM_COEX_BT_OPTIONS=y
CONFIG_BTDM_COEX_BLE_ADV_HIGH_PRIORITY=y
CONFIG_BLUEDROID_ENABLED=
CONFIG_BT_RESERVE_DRAM=0xdb5c
CONFIG_NIMBLE_ENABLED=
CONFIG_BLE_MESH=

#
# Driver configurations
#

#
# ADC configuration
#
CONFIG_ADC_FORCE_XPD_FSM=
CONFIG_ADC2_DISABLE_DAC=y

#
# SPI configuration
#
CONFIG_SPI_MASTER_IN_IRAM=
CONFIG_SPI_MASTER_ISR_IN_IRAM=y
CONFIG_SPI_SLAVE_IN_IRAM=
CONFIG_SPI_SLAVE_ISR_IN_IRAM=y

#
# eFuse Bit Manager
#
CONFIG_EFUSE_CUSTOM_TABLE=
CONFIG_EFUSE_VIRTUAL=
CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE=
CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y
CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT=
CONFIG_EFUSE_MAX_BLK_LEN=192

#
# ESP-NimBLE-CPP configuration
#

#
# ESP32-specific
#
CONFIG_IDF_TARGET_ESP32=y
CONFIG_ESP32_REV_MIN_0=y
CONFIG_ESP32_REV_MIN_1=
CONFIG_ESP32_REV_MIN_2=
CONFIG_ESP32_REV_MIN_3=
CONFIG_ESP32_REV_MIN=0
CONFIG_ESP32_DPORT_WORKAROUND=y
CONFIG_ESP32_DEFAULT_CPU_FREQ_80=
CONFIG_ESP32_DEFAULT_CPU_FREQ_160=
CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240
CONFIG_SPIRAM_SUPPORT=y

#
# SPI RAM config
#
CONFIG_SPIRAM_BOOT_INIT=
CONFIG_SPIRAM_USE_MEMMAP=
CONFIG_SPIRAM_USE_CAPS_ALLOC=y
CONFIG_SPIRAM_USE_MALLOC=
CONFIG_SPIRAM_TYPE_AUTO=y
CONFIG_SPIRAM_TYPE_ESPPSRAM32=
CONFIG_SPIRAM_TYPE_ESPPSRAM64=
CONFIG_SPIRAM_SIZE=-1
CONFIG_SPIRAM_SPEED_40M=y
CONFIG_SPIRAM_CACHE_WORKAROUND=y
CONFIG_SPIRAM_BANKSWITCH_ENABLE=y
CONFIG_SPIRAM_BANKSWITCH_RESERVE=8
CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST=
CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=

#
# PSRAM clock and cs IO for ESP32-DOWD
#
CONFIG_D0WD_PSRAM_CLK_IO=17
CONFIG_D0WD_PSRAM_CS_IO=16

#
# PSRAM clock and cs IO for ESP32-D2WD
#
CONFIG_D2WD_PSRAM_CLK_IO=9
CONFIG_D2WD_PSRAM_CS_IO=10

#
# PSRAM clock and cs IO for ESP32-PICO
#
CONFIG_PICO_PSRAM_CS_IO=10
CONFIG_SPIRAM_SPIWP_SD3_PIN=7
CONFIG_SPIRAM_2T_MODE=
CONFIG_MEMMAP_TRACEMEM=
CONFIG_MEMMAP_TRACEMEM_TWOBANKS=
CONFIG_ESP32_TRAX=
CONFIG_TRACEMEM_RESERVE_DRAM=0x0
CONFIG_TWO_UNIVERSAL_MAC_ADDRESS=
CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y
CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4
CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32
CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2048
CONFIG_MAIN_TASK_STACK_SIZE=4096
CONFIG_IPC_TASK_STACK_SIZE=1024
CONFIG_TIMER_TASK_STACK_SIZE=4096
CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y
CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF=
CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR=
CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF=
CONFIG_NEWLIB_STDIN_LINE_ENDING_LF=
CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y
CONFIG_NEWLIB_NANO_FORMAT=
CONFIG_CONSOLE_UART_DEFAULT=y
CONFIG_CONSOLE_UART_CUSTOM=
CONFIG_CONSOLE_UART_NONE=
CONFIG_CONSOLE_UART_NUM=0
CONFIG_CONSOLE_UART_BAUDRATE=115200
CONFIG_ULP_COPROC_ENABLED=y
CONFIG_ULP_COPROC_RESERVE_MEM=512
CONFIG_ESP32_PANIC_PRINT_HALT=
CONFIG_ESP32_PANIC_PRINT_REBOOT=y
CONFIG_ESP32_PANIC_SILENT_REBOOT=
CONFIG_ESP32_PANIC_GDBSTUB=
CONFIG_ESP32_DEBUG_OCDAWARE=y
CONFIG_ESP32_DEBUG_STUBS_ENABLE=y
CONFIG_INT_WDT=y
CONFIG_INT_WDT_TIMEOUT_MS=300
CONFIG_INT_WDT_CHECK_CPU1=y
CONFIG_TASK_WDT=y
CONFIG_TASK_WDT_PANIC=y
CONFIG_TASK_WDT_TIMEOUT_S=5
CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y
CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=
CONFIG_BROWNOUT_DET=y
CONFIG_BROWNOUT_DET_LVL_SEL_0=y
CONFIG_BROWNOUT_DET_LVL_SEL_1=
CONFIG_BROWNOUT_DET_LVL_SEL_2=
CONFIG_BROWNOUT_DET_LVL_SEL_3=
CONFIG_BROWNOUT_DET_LVL_SEL_4=
CONFIG_BROWNOUT_DET_LVL_SEL_5=
CONFIG_BROWNOUT_DET_LVL_SEL_6=
CONFIG_BROWNOUT_DET_LVL_SEL_7=
CONFIG_BROWNOUT_DET_LVL=0
CONFIG_REDUCE_PHY_TX_POWER=y
CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y
CONFIG_ESP32_TIME_SYSCALL_USE_RTC=
CONFIG_ESP32_TIME_SYSCALL_USE_FRC1=
CONFIG_ESP32_TIME_SYSCALL_USE_NONE=
CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y
CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL=
CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC=
CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256=
CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024
CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000
CONFIG_ESP32_XTAL_FREQ_40=
CONFIG_ESP32_XTAL_FREQ_26=
CONFIG_ESP32_XTAL_FREQ_AUTO=y
CONFIG_ESP32_XTAL_FREQ=0
CONFIG_DISABLE_BASIC_ROM_CONSOLE=
CONFIG_ESP_TIMER_PROFILING=
CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS=
CONFIG_ESP_ERR_TO_NAME_LOOKUP=y
CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5

#
# Wi-Fi
#
CONFIG_SW_COEXIST_ENABLE=y
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=16
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32
CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y
CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32
CONFIG_ESP32_WIFI_CSI_ENABLED=
CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y
CONFIG_ESP32_WIFI_TX_BA_WIN=6
CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y
CONFIG_ESP32_WIFI_RX_BA_WIN=16
CONFIG_ESP32_WIFI_NVS_ENABLED=y
CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y
CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1=
CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752
CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32
CONFIG_ESP32_WIFI_DEBUG_LOG_ENABLE=
CONFIG_ESP32_WIFI_IRAM_OPT=y
CONFIG_ESP32_WIFI_RX_IRAM_OPT=y

#
# PHY
#
CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y
CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION=
CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20
CONFIG_ESP32_PHY_MAX_TX_POWER=20

#
# Power Management
#
CONFIG_PM_ENABLE=

#
# ADC-Calibration
#
CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y
CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y
CONFIG_ADC_CAL_LUT_ENABLE=y

#
# Event Loop Library
#
CONFIG_EVENT_LOOP_PROFILING=

#
# ESP HTTP client
#
CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y
CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH=

#
# HTTP Server
#
CONFIG_HTTPD_MAX_REQ_HDR_LEN=512
CONFIG_HTTPD_MAX_URI_LEN=512
CONFIG_HTTPD_ERR_RESP_NO_DELAY=y
CONFIG_HTTPD_PURGE_BUF_LEN=32
CONFIG_HTTPD_LOG_PURGE_DATA=

#
# ESP HTTPS OTA
#
CONFIG_OTA_ALLOW_HTTP=

#
# Core dump
#
CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH=
CONFIG_ESP32_ENABLE_COREDUMP_TO_UART=
CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y
CONFIG_ESP32_ENABLE_COREDUMP=

#
# Ethernet
#
CONFIG_DMA_RX_BUF_NUM=10
CONFIG_DMA_TX_BUF_NUM=10
CONFIG_EMAC_L2_TO_L3_RX_BUF_MODE=y
CONFIG_EMAC_CHECK_LINK_PERIOD_MS=2000
CONFIG_EMAC_TASK_PRIORITY=20
CONFIG_EMAC_TASK_STACK_SIZE=3072

#
# FAT Filesystem support
#
CONFIG_FATFS_CODEPAGE_DYNAMIC=
CONFIG_FATFS_CODEPAGE_437=
CONFIG_FATFS_CODEPAGE_720=
CONFIG_FATFS_CODEPAGE_737=
CONFIG_FATFS_CODEPAGE_771=
CONFIG_FATFS_CODEPAGE_775=
CONFIG_FATFS_CODEPAGE_850=y
CONFIG_FATFS_CODEPAGE_852=
CONFIG_FATFS_CODEPAGE_855=
CONFIG_FATFS_CODEPAGE_857=
CONFIG_FATFS_CODEPAGE_860=
CONFIG_FATFS_CODEPAGE_861=
CONFIG_FATFS_CODEPAGE_862=
CONFIG_FATFS_CODEPAGE_863=
CONFIG_FATFS_CODEPAGE_864=
CONFIG_FATFS_CODEPAGE_865=
CONFIG_FATFS_CODEPAGE_866=
CONFIG_FATFS_CODEPAGE_869=
CONFIG_FATFS_CODEPAGE_932=
CONFIG_FATFS_CODEPAGE_936=
CONFIG_FATFS_CODEPAGE_949=
CONFIG_FATFS_CODEPAGE_950=
CONFIG_FATFS_CODEPAGE=850
CONFIG_FATFS_LFN_NONE=
CONFIG_FATFS_LFN_HEAP=
CONFIG_FATFS_LFN_STACK=y
CONFIG_FATFS_MAX_LFN=255
CONFIG_FATFS_API_ENCODING_ANSI_OEM=y
CONFIG_FATFS_API_ENCODING_UTF_16=
CONFIG_FATFS_API_ENCODING_UTF_8=
CONFIG_FATFS_FS_LOCK=0
CONFIG_FATFS_TIMEOUT_MS=10000
CONFIG_FATFS_PER_FILE_CACHE=y
CONFIG_FATFS_ALLOC_PREFER_EXTRAM=y

#
# Modbus configuration
#
CONFIG_MB_QUEUE_LENGTH=20
CONFIG_MB_SERIAL_TASK_STACK_SIZE=2048
CONFIG_MB_SERIAL_BUF_SIZE=256
CONFIG_MB_SERIAL_TASK_PRIO=10
CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT=
CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20
CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20
CONFIG_MB_CONTROLLER_STACK_SIZE=4096
CONFIG_MB_EVENT_QUEUE_TIMEOUT=20
CONFIG_MB_TIMER_PORT_ENABLED=y
CONFIG_MB_TIMER_GROUP=0
CONFIG_MB_TIMER_INDEX=0

#
# FreeRTOS
#
CONFIG_FREERTOS_UNICORE=
CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF
CONFIG_FREERTOS_CORETIMER_0=y
CONFIG_FREERTOS_CORETIMER_1=
CONFIG_FREERTOS_HZ=1000
CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE=
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL=
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y
CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y
CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y
CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1
CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y
CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE=
CONFIG_FREERTOS_ASSERT_DISABLE=
CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1024
CONFIG_FREERTOS_ISR_STACKSIZE=1536
CONFIG_FREERTOS_LEGACY_HOOKS=
CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16
CONFIG_SUPPORT_STATIC_ALLOCATION=
CONFIG_TIMER_TASK_PRIORITY=1
CONFIG_TIMER_TASK_STACK_DEPTH=2048
CONFIG_TIMER_QUEUE_LENGTH=10
CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0
CONFIG_FREERTOS_USE_TRACE_FACILITY=
CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=
CONFIG_FREERTOS_DEBUG_INTERNALS=
CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y
CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE=

#
# Heap memory debugging
#
CONFIG_HEAP_POISONING_DISABLED=
CONFIG_HEAP_POISONING_LIGHT=y
CONFIG_HEAP_POISONING_COMPREHENSIVE=
CONFIG_HEAP_TRACING=
CONFIG_HEAP_TASK_TRACKING=

#
# libsodium
#
CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y

#
# Log output
#
CONFIG_LOG_DEFAULT_LEVEL_NONE=
CONFIG_LOG_DEFAULT_LEVEL_ERROR=y
CONFIG_LOG_DEFAULT_LEVEL_WARN=
CONFIG_LOG_DEFAULT_LEVEL_INFO=
CONFIG_LOG_DEFAULT_LEVEL_DEBUG=
CONFIG_LOG_DEFAULT_LEVEL_VERBOSE=
CONFIG_LOG_DEFAULT_LEVEL=1
CONFIG_LOG_COLORS=

#
# LWIP
#
CONFIG_L2_TO_L3_COPY=
CONFIG_ETHARP_SUPPORT_VLAN=
CONFIG_LWIP_IRAM_OPTIMIZATION=y
CONFIG_LWIP_MAX_SOCKETS=10
CONFIG_LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS=y
CONFIG_USE_ONLY_LWIP_SELECT=
CONFIG_LWIP_SO_LINGER=
CONFIG_LWIP_SO_REUSE=y
CONFIG_LWIP_SO_REUSE_RXTOALL=y
CONFIG_LWIP_SO_RCVBUF=y
CONFIG_LWIP_IP4_FRAG=y
CONFIG_LWIP_IP6_FRAG=y
CONFIG_LWIP_IP4_REASSEMBLY=
CONFIG_LWIP_IP6_REASSEMBLY=
CONFIG_LWIP_STATS=
CONFIG_LWIP_ETHARP_TRUST_IP_MAC=y
CONFIG_ESP_GRATUITOUS_ARP=y
CONFIG_GARP_TMR_INTERVAL=60
CONFIG_TCPIP_RECVMBOX_SIZE=32
CONFIG_LWIP_DHCP_DOES_ARP_CHECK=
CONFIG_LWIP_DHCP_RESTORE_LAST_IP=y

#
# DHCP server
#
CONFIG_LWIP_DHCPS_LEASE_UNIT=60
CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8
CONFIG_LWIP_AUTOIP=
CONFIG_LWIP_IPV6_AUTOCONFIG=
CONFIG_LWIP_NETIF_LOOPBACK=y
CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8

#
# TCP
#
CONFIG_LWIP_MAX_ACTIVE_TCP=16
CONFIG_LWIP_MAX_LISTENING_TCP=16
CONFIG_TCP_MAXRTX=12
CONFIG_TCP_SYNMAXRTX=6
CONFIG_TCP_MSS=1436
CONFIG_TCP_MSL=60000
CONFIG_TCP_SND_BUF_DEFAULT=5744
CONFIG_TCP_WND_DEFAULT=5744
CONFIG_TCP_RECVMBOX_SIZE=6
CONFIG_TCP_QUEUE_OOSEQ=y
CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES=
CONFIG_TCP_OVERSIZE_MSS=y
CONFIG_TCP_OVERSIZE_QUARTER_MSS=
CONFIG_TCP_OVERSIZE_DISABLE=
CONFIG_LWIP_TCP_RTO_TIME=3000

#
# UDP
#
CONFIG_LWIP_MAX_UDP_PCBS=16
CONFIG_UDP_RECVMBOX_SIZE=6
CONFIG_TCPIP_TASK_STACK_SIZE=2560
CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=
CONFIG_TCPIP_TASK_AFFINITY_CPU0=y
CONFIG_TCPIP_TASK_AFFINITY_CPU1=
CONFIG_TCPIP_TASK_AFFINITY=0x0
CONFIG_PPP_SUPPORT=y
CONFIG_PPP_NOTIFY_PHASE_SUPPORT=
CONFIG_PPP_PAP_SUPPORT=y
CONFIG_PPP_CHAP_SUPPORT=y
CONFIG_PPP_MSCHAP_SUPPORT=y
CONFIG_PPP_MPPE_SUPPORT=y
CONFIG_PPP_DEBUG_ON=

#
# ICMP
#
CONFIG_LWIP_MULTICAST_PING=
CONFIG_LWIP_BROADCAST_PING=

#
# LWIP RAW API
#
CONFIG_LWIP_MAX_RAW_PCBS=16

#
# SNTP
#
CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1
CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000
CONFIG_LWIP_ESP_LWIP_ASSERT=y

#
# mbedTLS
#
CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC=
CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC=
CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC=
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384
CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=
CONFIG_MBEDTLS_DEBUG=
CONFIG_MBEDTLS_ECP_RESTARTABLE=y
CONFIG_MBEDTLS_CMAC_C=y
CONFIG_MBEDTLS_HARDWARE_AES=y
CONFIG_MBEDTLS_HARDWARE_MPI=
CONFIG_MBEDTLS_HARDWARE_SHA=
CONFIG_MBEDTLS_HAVE_TIME=y
CONFIG_MBEDTLS_HAVE_TIME_DATE=
CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y
CONFIG_MBEDTLS_TLS_SERVER_ONLY=
CONFIG_MBEDTLS_TLS_CLIENT_ONLY=
CONFIG_MBEDTLS_TLS_DISABLED=
CONFIG_MBEDTLS_TLS_SERVER=y
CONFIG_MBEDTLS_TLS_CLIENT=y
CONFIG_MBEDTLS_TLS_ENABLED=y

#
# 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
CONFIG_MBEDTLS_SSL_RENEGOTIATION=y
CONFIG_MBEDTLS_SSL_PROTO_SSL3=
CONFIG_MBEDTLS_SSL_PROTO_TLS1=y
CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y
CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y
CONFIG_MBEDTLS_SSL_PROTO_DTLS=
CONFIG_MBEDTLS_SSL_ALPN=y
CONFIG_MBEDTLS_SSL_SESSION_TICKETS=y

#
# Symmetric Ciphers
#
CONFIG_MBEDTLS_AES_C=y
CONFIG_MBEDTLS_CAMELLIA_C=
CONFIG_MBEDTLS_DES_C=
CONFIG_MBEDTLS_RC4_DISABLED=y
CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT=
CONFIG_MBEDTLS_RC4_ENABLED=
CONFIG_MBEDTLS_BLOWFISH_C=
CONFIG_MBEDTLS_XTEA_C=
CONFIG_MBEDTLS_CCM_C=y
CONFIG_MBEDTLS_GCM_C=y
CONFIG_MBEDTLS_RIPEMD160_C=

#
# Certificates
#
CONFIG_MBEDTLS_PEM_PARSE_C=y
CONFIG_MBEDTLS_PEM_WRITE_C=y
CONFIG_MBEDTLS_X509_CRL_PARSE_C=y
CONFIG_MBEDTLS_X509_CSR_PARSE_C=y
CONFIG_MBEDTLS_ECP_C=y
CONFIG_MBEDTLS_ECDH_C=y
CONFIG_MBEDTLS_ECDSA_C=y
CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y
CONFIG_MBEDTLS_ECP_NIST_OPTIM=y

#
# mDNS
#
CONFIG_MDNS_MAX_SERVICES=10

#
# ESP-MQTT Configurations
#
CONFIG_MQTT_PROTOCOL_311=y
CONFIG_MQTT_TRANSPORT_SSL=y
CONFIG_MQTT_TRANSPORT_WEBSOCKET=y
CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y
CONFIG_MQTT_USE_CUSTOM_CONFIG=
CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED=
CONFIG_MQTT_CUSTOM_OUTBOX=

#
# NVS
#

#
# OpenSSL
#
CONFIG_OPENSSL_DEBUG=
CONFIG_OPENSSL_ASSERT_DO_NOTHING=y
CONFIG_OPENSSL_ASSERT_EXIT=

#
# PThreads
#
CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5
CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=2048
CONFIG_PTHREAD_STACK_MIN=768
CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y
CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0=
CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1=
CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1
CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread"

#
# SPI Flash driver
#
CONFIG_SPI_FLASH_VERIFY_WRITE=
CONFIG_SPI_FLASH_ENABLE_COUNTERS=
CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y
CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y
CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS=
CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED=
CONFIG_SPI_FLASH_YIELD_DURING_ERASE=

#
# SPIFFS Configuration
#
CONFIG_SPIFFS_MAX_PARTITIONS=3

#
# SPIFFS Cache Configuration
#
CONFIG_SPIFFS_CACHE=
CONFIG_SPIFFS_PAGE_CHECK=y
CONFIG_SPIFFS_GC_MAX_RUNS=10
CONFIG_SPIFFS_GC_STATS=
CONFIG_SPIFFS_PAGE_SIZE=256
CONFIG_SPIFFS_OBJ_NAME_LEN=32
CONFIG_SPIFFS_USE_MAGIC=y
CONFIG_SPIFFS_USE_MAGIC_LENGTH=y
CONFIG_SPIFFS_META_LENGTH=4
CONFIG_SPIFFS_USE_MTIME=y

#
# Debug Configuration
#
CONFIG_SPIFFS_DBG=
CONFIG_SPIFFS_API_DBG=
CONFIG_SPIFFS_GC_DBG=
CONFIG_SPIFFS_CHECK_DBG=
CONFIG_SPIFFS_TEST_VISUALISATION=

#
# TCP/IP Adapter
#
CONFIG_IP_LOST_TIMER_INTERVAL=120
CONFIG_TCPIP_LWIP=y

#
# Unity unit testing library
#
CONFIG_UNITY_ENABLE_FLOAT=y
CONFIG_UNITY_ENABLE_DOUBLE=y
CONFIG_UNITY_ENABLE_COLOR=
CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y
CONFIG_UNITY_ENABLE_FIXTURE=

#
# Virtual file system
#
CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y
CONFIG_SUPPORT_TERMIOS=y

#
# Wear Levelling
#
CONFIG_WL_SECTOR_SIZE_512=
CONFIG_WL_SECTOR_SIZE_4096=y
CONFIG_WL_SECTOR_SIZE=4096

#
# Wi-Fi Provisioning Manager
#
CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16

#
# Supplicant
#
CONFIG_WPA_WPS_WARS=

from nimble-arduino.

ntwallace avatar ntwallace commented on May 19, 2024

Ok I copied the arduino sdkconfig and changed only the options I need to run and I'm still getting the boot loop with NimBLEDevice::init() in the code. Built using make.

CONFIG_AUTOSTART_ARDUINO=

CONFIG_ESPTOOLPY_FLASHSIZE_4MB=
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="16MB"

CONFIG_PARTITION_TABLE_SINGLE_APP=
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x10000

make doesn't indicate that I'm running out of DRAM or IRAM:

Total sizes:
 DRAM .data size:   16772 bytes
 DRAM .bss  size:   42824 bytes
Used static DRAM:   59596 bytes (  64984 available, 47.8% used)
Used static IRAM:  105320 bytes (  25752 available, 80.4% used)
      Flash code:  905560 bytes
    Flash rodata:  261304 bytes
Total image size:~1288956 bytes (.bin may be padded larger)

I also bumped the app partitions to 3Mb each just to make sure there wasn't a flash issue

# Name,   Type, SubType, Offset,  Size, Flags
nvs,      data, nvs,     0x11000, 0x4000,
otadata,  data, ota,     ,        0x2000,
phy_init, data, phy,     ,        0x1000,
factory,  app,  factory, 0x20000, 3M,
ota_0,    app,  ota_0,   ,        3M,
ota_1,    app,  ota_1,   ,        3M,

from nimble-arduino.

ntwallace avatar ntwallace commented on May 19, 2024

@h2zero One final comment, it does seem after all of that this is likely an IRAM/DRAM issue. I disabled all tasks in my app_main() and was able to get it to run normally. After renabling them one by one, I found that one specific task that is very IRAM and DRAM heavy was causing this. I'm going to keep debugging until I know what exactly is causing it and will update with a final solution for future reference.

Thanks for your patience and responsiveness.

from nimble-arduino.

h2zero avatar h2zero commented on May 19, 2024

@ntwallace Glad you found it, was confused as to how that error occurred.

Thanks for keeping me up to date with the progress. I will update the cmake files for future users (component was missing stuff as well).

Feedback is always appreciated, please let me know how you make out with this.

from nimble-arduino.

ntwallace avatar ntwallace commented on May 19, 2024

@h2zero turns out it was some kind of issue with dynamic DRAM allocation. Commenting out my OTA code stopped the abort loop, and I worked backwards from there. Changing the menuconfig setting CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY to load large system libraries like lwip into PSRAM instead of DRAM .bss allows me to run OTA and NimBLE without issue.

Having said that, I'm not sure that NimBLE is actually getting loaded in PSRAM after I enabled CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_EXTERNAL. Running make size-components shows the NimBLE component still taking up a good chunk of DRAM. Is that normal?

            Archive File DRAM .data & .bss  IRAM  Flash code & rodata  Total
               libmain.a         54   6579    208     140994    13188  161023
           libnet80211.a        938      0  10459      91592    21856  124845
           libbtdm_app.a        660   2386  23415      66548     4158   97167
               liblwip.a         21      0   8616      69485     5066   83188
libesp-nimble-component.        256   5107     48      68375     4227   78013

from nimble-arduino.

h2zero avatar h2zero commented on May 19, 2024

@ntwallace Thanks for the update, I'm glad you found the source of that issue.

As for the PSRAM I'm not sure if what you're seeing there is normal. I have not personally tested this config but a few others around here have reported success with that. If you suspect it is not working I would encourage creating a new issue so it's more visible to others who may have used this. I will try to test it on my end also.

from nimble-arduino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.