lowRISC / sonata-system

A full micro-controller system utilizing the CHERIoT Ibex core, part of the Sunburst project funded by UKRI
Apache License 2.0
29 stars 17 forks source link

Simple bare metal CHERI check application for USB device. #181

Closed alees24 closed 2 months ago

alees24 commented 2 months ago

This does not require any special software on a physical USB host controller; usbdev_check will simply set up and connect the USB device to the USB host controller and await successful completion of the the normal device inspection and configuration sequence by the host.

If the do_disconnect switch in usbdev_check.cc is set to false then serial comunications may also be tested by opening a terminal emulator on /dev/ttyUSB where the number 'n' may be ascertained by monitoring the output from dmesg when the USB device is being configured.

Notes on the code:

alees24 commented 2 months ago

I was mimicking uart_check.cc which contained its own implementation; now changed. It may be worth mentioning that including a header file which contains functions defined as 'static' can lead to warnings from the compiler if a translation unit happens not to use all of the functions in the header file. The builds are okay for now.