The breaking changes here changes in header location, and changes in driver name passed down to the usb stack. Changes affect: stm32f102/f103, stm32l1, and some f3 parts * instead of the confusingly generic "usb" use the name "st_usbfs" for the USB Full speed peripheral ST provides in a variety of their stm32 products. Include directives should change as: #include <libopencm3/stm32/usb.h> => <libopencm3/stm32/st_usbfs.h> * instead of the confusingly specific "f103" name for the driver, use "st_usbfs_v1" [BREAKING_CHANGE] Instead of: usbd_init(&stm32f103_usb_driver, .....) ==> usbd_init(&st_usbfs_v1_usb_driver, .....) ==> The purpose of these changes is to reduce some confusion around naming, but primarily to prepare for the "v2" peripheral available on stm32f0/l0 and some f3 devices. Work by Frantisek Burian, Kuldeep Singh Dhaka, Robin Kreis, fenugrec and zyp on irc, and all those forgotten.
This project, inspired by usbtest and the linux usb gadget zero driver is used for regression testing changes to the libopencm3 usb stack.
The firmware itself is meant to be portable to any supported hardware, and then identical unit test code is run against all platforms. This project can and should be built for multiple devices.
Requirements: pyusb for running the tests. openocd >= 0.9 for automated flashing of specific boards python3 for running the tests at the command line.
You will need to modify the openocd config files, as they contain specific serial numbers of programming hardware. You should set these up for the set of available boards at your disposal.
Tests marked as @unittest.skip are either for functionality that is known to be broken, and are awaiting code fixes, or are long running performance tests
An example of a successful test run: