问题
使用esp32-s3-wroom 遇到了下面的问题
Info : only one transport option; autoselect 'jtag'
Info : esp_usb_jtag: VID set to 0x303a and PID to 0x4001
Info : esp_usb_jtag: capabilities descriptor set to 0x2000
Warn : Transport "jtag" was already selected
Warn : Interface already configured, ignoring
Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1001
Info : esp_usb_jtag: capabilities descriptor set to 0x2000
adapter speed: 40000 kHz
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : esp_usb_jtag: serial (123456)
Error: esp_usb_jtag: error finding/claiming JTAG interface on device!
使用usb工具查看该usb的号是 4001, 303a
原因, 这个口可能被设定为了usb的otg的口了,具体的说明和解决方案如下
方法:
You likely have firmware in the S3 that uses the USB-OTG peripheral and you're seeing that rather than the USB-serial-JTAG. Suggest you turn on the S3 in download mode, i.e. hold 'boot', press and release 'reset' and release 'boot' and try again; you should be seeing the USB-serial-JTAG then. (Obviously, you also need to change your openocd config back.)
参考网址:
https://esp32.com/viewtopic.php?t=33623
问题
esp32 idf 的vscode的开发过程中, 发现有些定义编译能够通过的, 编写的时候有些定义显示为红色,显示为了undefined, 语法没有被自动的关联上, 现象如下图
并且设定的一些宏,在vscode 中显示的也不对,不太方便进行代码的开发和调试
方法
cmake的编译选项里面已经添加了
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
所以默认的定义在build 下面就会产生这个compile_commands.json 文件, 这个定义添加到.vscode/c_cpp_properties.json
里面既可以
{
"configurations": [
{
"name": "ESP-IDF",
"compileCommands": "${workspaceFolder}/build/compile_commands.json",
// other properties...
}
],
"version": 4
}