Re: USB console sample not working with STM32F070

Yannis Damigos



I am trying to use the USB CDC device driver with an STM32F070. However, the usb console sample fails with the following error message (several similar errors shown, only one of them posted):

In file included from ../../../../../include/arch/arm/cortex_m/irq.h:17:0,
                 from ../../../../../include/arch/arm/arch.h:27,
                 from ../../../../../include/arch/cpu.h:15,
                 from ../../../../../include/syscall.h:15,
                 from ../../../../../include/kernel_includes.h:32,
                 from ../../../../../arch/arm/soc/st_stm32/stm32f0/soc.h:33,
                 from <path-to-zephyr>/zephyr/drivers/usb/device/usb_dc_stm32.c:47:
<path-to-zephyr>/zephyr/drivers/usb/device/usb_dc_stm32.c: In function ‘usb_dc_ep_write’:
zephyr/include/generated/generated_dts_board.h:247:27: error: ‘ST_STM32_USB_40005C00_IRQ_USB’ undeclared (first use in this function)
 #define CONFIG_USB_IRQ    ST_STM32_USB_40005C00_IRQ_USB
../../../../../include/irq.h:241:44: note: in definition of macro ‘irq_disable’
 #define irq_disable(irq) _arch_irq_disable(irq)
<path-to-zephyr>/zephyr/drivers/usb/device/usb_dc_stm32.c:670:15: note: in expansion of macro ‘CONFIG_USB_IRQ’
You need to enable the usb device in boards device tree file:

&usb {
status = "ok";

Please consider creating a pull request if it works.


Join to automatically receive all group messages.