espressif / esp-idf

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

CONFIG_USJ_ENABLE_USB_SERIAL_JTAG can't be disabled (IDFGH-13778) #14638

Closed higaski closed 1 month ago

higaski commented 1 month ago

Answers checklist.

IDF version.

v5.3

Operating System used.

Linux

How did you build your project?

Command line with Make

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

None

What is the expected behavior?

It should be possible to enable/disable CONFIG_USJ_ENABLE_USB_SERIAL_JTAG.

What is the actual behavior?

Is it per design that currently the CONFIG_USJ_ENABLE_USB_SERIAL_JTAG option (btw, is this a typo or a wordplay on JTAG?) can't be disabled on ESP32-S3 devices?

menuconfig

Steps to reproduce.

  1. Set up any ESP32-S3 example
  2. Try to change the CONFIG_USJ_ENABLE_USB_SERIAL_JTAG option using idf.py menuconfig

Build or installation Logs.

No response

More Information.

No response

igrr commented 1 month ago

It can't be disabled because it gets enabled by another option. You can see which one if you press '?', one of the things shown there will be:

Symbols currently y-selecting this symbol:
  - ESP_CONSOLE_USB_SERIAL_JTAG_ENABLED

and going to that option and pressing '?' again we get

Default:
  - y
    Condition (=y):
       ESP_CONSOLE_USB_SERIAL_JTAG(=n)
    || ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG(=y)

So basically, CONFIG_USJ_ENABLE_USB_SERIAL_JTAG gets selected if USB_SERIAL_JTAG is selected as either primary or secondary console output. If you change the console output setting to UART, then you should be able to disable CONFIG_USJ_ENABLE_USB_SERIAL_JTAG as well.

We'll update the help text of CONFIG_USJ_ENABLE_USB_SERIAL_JTAG to make this clear.

higaski commented 1 month ago

Thanks!