soc/usb_acm: Move clone of ValentyUSB to LiteX instead of doing it in each LiteX-Boards target.

This commit is contained in:
Florent Kermarrec 2022-04-21 15:41:33 +02:00
parent ca6378a207
commit 08e9cfcd86

View file

@ -6,6 +6,7 @@
# This file is Copyright (c) 2019 Gabriel L. Somlo <somlo@cmu.edu>
# SPDX-License-Identifier: BSD-2-Clause
import os
import sys
import time
import logging
@ -1277,6 +1278,9 @@ class LiteXSoC(SoC):
# USB ACM (with ValentyUSB core).
elif uart_name in ["usb_acm"]:
# FIXME: do proper install of ValentyUSB.
os.system("git clone https://github.com/litex-hub/valentyusb -b hw_cdc_eptri")
sys.path.append("valentyusb")
import valentyusb.usbcore.io as usbio
import valentyusb.usbcore.cpu.cdc_eptri as cdc_eptri
usb_pads = self.platform.request("usb")