Skip to content

Unable to compile USB console example with uart_mux #36608

@ycsin

Description

@ycsin

Describe the bug
Unable to compile USB console example with uart_mux enabled. Compiler complaining repeated variable declaration by cdc_acm.c & uart_mux.c

zephyrproject/zephyr/drivers/console/uart_mux.c:897: multiple definition of `rx_ringbuf_0'; 
zephyr/libzephyr.a(cdc_acm.c.obj):C:/Users/yongc/zephyrproject/zephyr/subsys/usb/class/cdc_acm.c:1127: first defined here

zephyrproject/zephyr/drivers/console/uart_mux.c:897: multiple definition of `tx_ringbuf_0'; 
zephyr/libzephyr.a(cdc_acm.c.obj):C:/Users/yongc/zephyrproject/zephyr/subsys/usb/class/cdc_acm.c:1127: first defined here

To Reproduce
Steps to reproduce the behavior:

  1. Build usb/console with CONFIG_GSM_MUX set
  2. See compilation error

Expected behavior
Should compile fine (?)

Impact
Unable to use usb/console with gsm_mux

Logs and console output
Full compilation log: usb_compilation_log.txt

Environment (please complete the following information):

  • OS: Windows 10
  • Toolchain: gnuarmemb
  • Zephyr 2.6 RC2
  • stm32g0b1re custom board

Additional context

  1. Using offline WIP usb driver
  2. Can be workaround in the meantime by renaming either file's &t(r)x_ringbuf_##x to &yyy_t(r)x_ringbuf_##x

Metadata

Metadata

Assignees

Labels

bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions