espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.82k stars 7.32k forks source link

基于VS CODE插件使用ESP32-S2在IDF5.3配置SDK选项,异常的出现了蓝牙的选项,并且可以勾选"When configuring SDK options for ESP32-S2 in IDF5.3 using the VS CODE plugin, an unusual Bluetooth option appeared and could be selected." (IDFGH-13535) #14425

Open caidamao opened 3 months ago

caidamao commented 3 months ago

Answers checklist.

IDF version.

IDF5.3

Espressif SoC revision.

ESP32-S2

Operating System used.

Windows

How did you build your project?

Command line with Make

If you are using Windows, please specify command line type.

None

Development Kit.

Custom Board

Power Supply used.

External 3.3V

What is the expected behavior?

没有蓝牙选项 No Bluetooth option available

What is the actual behavior?

出现了蓝牙选项,且可以勾选。且勾选后编译的文件由1258个增加到1523个,证明实际上蓝牙的文件真的被编译到了,但显然S2它没有蓝牙。 "The Bluetooth option appeared and can be selected. After selecting it, the number of compiled files increased from 1258 to 1523, proving that the Bluetooth files were indeed compiled in. However, it is apparent that the ESP32-S2 does not actually have Bluetooth capabilities."

Steps to reproduce.

  1. 更新到IDF5.3
  2. 用VS CODE插件打开一个idf5.22的esp32-s2的工程
  3. 开启SDK配置,勾选蓝牙选项 4.保存并编译 5.出现此问题

1.Update to IDF5.3

  1. Open an idf5.22 esp32-s2 project with VS CODE plugin
  2. Open the SDK configuration and check the Bluetooth option
  3. Save and compile
  4. This problem occurs

Debug Logs.

No response

More Information.

No response

caidamao commented 3 months ago

1 这个是问题的截图

caidamao commented 3 months ago

我尝试回到了5.2.2,没有复现这个问题,再次切换到5.3,问题复现

brianignacio5 commented 3 months ago

Could you share the output from here:

Click menu View -> Output -> Choose from dropdown the ESP-IDF option ?

caidamao commented 3 months ago

Could you share the output from here:

Click menu View -> Output -> Choose from dropdown the ESP-IDF option ?

image

caidamao commented 3 months ago

Could you share the output from here:

Click menu View -> Output -> Choose from dropdown the ESP-IDF option ?

bug log.zip

caidamao commented 3 months ago

I believe the output you share is from the terminal output. In the bottom bar you can see that there is a tab called OUTPUT which has a dropdown in the right side. From there choose the ESP-IDF. I want to see if there is an error when you set the bluetooth enable or not.

I know that it's just because of the network problems in China that I haven't managed to upload the compressed log package until now after sending the screenshot.

brianignacio5 commented 3 months ago

Thank you.

So the issue is that the bluetooth enable KConfig setting (the code behind idf.py menuconfig) is not dependent of IDF_TARGET (esp32s2) so you can enable bluetooth regardless. Not really a esp-idf vscode extension issue here.

caidamao commented 3 months ago

I remember that these options in the figure should not be enabled by default. Is it possible that there are issues beyond just the Bluetooth option? I updated from IDF 5.2.2 to IDF 5.3, and apart from the SDK update, there were no other changes made, but the memory consumption increased by several kilobytes.

Thank you.

So the issue is that the bluetooth enable KConfig setting (the code behind idf.py menuconfig) is not dependent of IDF_TARGET (esp32s2) so you can enable bluetooth regardless. Not really a esp-idf vscode extension issue here.

esp-zhp commented 2 months ago

@caidamao 你有提到 “从 IDF 5.2.2 更新到了 IDF 5.3,除了 SDK 更新之外,没有其他变化,但是内存占用增加了好几千字节。”我想确定一下:如果将 BT_ENABLED 关闭,还会增加内存吗?

esp-zhp commented 2 months ago

@caidamao BT_ENABLED 我这面显示在 v5.2.2 和 v5.3 默认都是关着的。 你提到 “使用ESP32-S2在IDF5.3配置SDK选项,异常的出现了蓝牙的选项”,这不是异常,因为 BT 分为 controller 和 host,ESP32-S2 不支持 BT,准确说只是不支持 controller,而对于 host,这是纯软件做的,还是可以支持的。所以,该配置项能够打开。

caidamao commented 2 months ago

@caidamao BT_ENABLED 我这面显示在 v5.2.2 和 v5.3 默认都是关着的。 你提到 “使用ESP32-S2在IDF5.3配置SDK选项,异常的出现了蓝牙的选项”,这不是异常,因为 BT 分为 controller 和 host,ESP32-S2 不支持 BT,准确说只是不支持 controller,而对于 host,这是纯软件做的,还是可以支持的。所以,该配置项能够打开。

image 你看这个,5.22我重新拉了一个例程出来,也有蓝牙选项。我记得以前没有吧?S2有蓝牙选项,真的有点怪.

caidamao commented 2 months ago

@caidamao 你有提到 “从 IDF 5.2.2 更新到了 IDF 5.3,除了 SDK 更新之外,没有其他变化,但是内存占用增加了好几千字节。”我想确定一下:如果将 BT_ENABLED 关闭,还会增加内存吗?

这个是基于5.22编译的 image

caidamao commented 2 months ago

@caidamao 你有提到 “从 IDF 5.2.2 更新到了 IDF 5.3,除了 SDK 更新之外,没有其他变化,但是内存占用增加了好几千字节。”我想确定一下:如果将 BT_ENABLED 关闭,还会增加内存吗?

这是基于5.3编译的:可以看到内存使用量多了一点。 image

caidamao commented 2 months ago

5.3spi_lcd_touch.zip 5.22spi_lcd_touch.zip 这两个压缩包是直接从5.2.2例程里拉取的,我手里的一个工程更明显,但因为保密原则我没办法展示 @esp-zhp

esp-zhp commented 2 months ago

@caidamao 你认为关闭 BT_ENABLED 后,还有 BT 的内容被遍进来吗?我是负责的 BLE 模块的,从你的反馈来看:即使 BT_ENABLED 关闭了,使用使用的内存还是增加。 这应该是其他模块的导致的。 你能够确定是那个模块导致的内存增加吗,我让对应模块的同事来支持你的问题。

caidamao commented 2 months ago

@caidamao 你认为关闭 BT_ENABLED 后,还有 BT 的内容被遍进来吗?我是负责的 BLE 模块的,从你的反馈来看:即使 BT_ENABLED 关闭了,使用使用的内存还是增加。 这应该是其他模块的导致的。 你能够确定是那个模块导致的内存增加吗,我让对应模块的同事来支持你的问题。

我觉得应该是跟蓝牙相关的模块无关(没有使能蓝牙的时候,蓝牙相关的代码都没有被编译进去),我目前有确认都有用到的就SPI。好像是有很多外设的旧代码选项有出现在sdk配置里,但我很难确定跟什么有关。

caidamao commented 2 months ago

35d7e0cf588201a34a74ff589e6e21a5 image 我这个工程只涉及了SPI/IO这两个外设,SPI的嫌疑可能很大。更多的信息如果能找到我会在进行补充。

这个链接可以复现这个情况:git clone https://gitee.com/caidamao/key_-esp32.git @esp-zhp