USB console sample not working with STM32F070

Martin Jäger


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’

Steps to reproduce:

cd zephyr/samples/subsys/usb/console
mkdir build; cd build
cmake -GNinja -DBOARD=nucleo_f070rb ..

Anyone has an idea what I might have done wrong? If I compile for -DBOARD=arduino_101, everything works fine.



Join to automatically receive all group messages.