- src/: прошивка встроенного отладчика BL616 — составное USB-устройство 1209:C0CA: DirtyJTAG v3 (WinUSB через MS OS 2.0) + CDC-ACM UART к FPGA B3/C3; UART до 20 Мбод на DMA, JTAG до 30 МГц через аппаратный SPI; - bin/: загрузчик Sipeed (0x0) и штатная прошивка 2025030317 для отката; - gui/: TangProgrammer.exe (C# WinForms, .NET Framework 4) — загрузка FPGA в SRAM и во флеш-память, копия и стирание флеш-памяти FPGA, прошивка моста; светлая и тёмная тема; - scripts/: setup, build, flash, build_gui, make_portable, а также make_release и publish_release для релизов Gitea; - fpga_test/, tests/: тестовые проекты Gowin (loopback, stream) и тесты UART на Python; - tools/openFPGALoader/: openFPGALoader 1.1.1 для Windows x64. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
61 lines
1.8 KiB
C
61 lines
1.8 KiB
C
/*
|
|
* CherryUSB configuration for the Tang Primer 25K BL616 debugger firmware.
|
|
*/
|
|
#ifndef CHERRYUSB_CONFIG_H
|
|
#define CHERRYUSB_CONFIG_H
|
|
|
|
/* ================ USB common Configuration ================ */
|
|
|
|
#define CONFIG_USB_PRINTF(...) printf(__VA_ARGS__)
|
|
|
|
#ifndef CONFIG_USB_DBG_LEVEL
|
|
#define CONFIG_USB_DBG_LEVEL USB_DBG_WARNING
|
|
#endif
|
|
|
|
#ifndef CONFIG_USB_ALIGN_SIZE
|
|
#define CONFIG_USB_ALIGN_SIZE 4
|
|
#endif
|
|
|
|
/* USB VDMA does not go through the D-cache */
|
|
#define USB_NOCACHE_RAM_SECTION __attribute__((section(".noncacheable")))
|
|
|
|
/* ================= USB Device Stack Configuration ================ */
|
|
|
|
#ifndef CONFIG_USBDEV_REQUEST_BUFFER_LEN
|
|
#define CONFIG_USBDEV_REQUEST_BUFFER_LEN 512
|
|
#endif
|
|
|
|
#define CONFIG_USBDEV_ADVANCE_DESC
|
|
|
|
/* ================ USB Device Port Configuration ================ */
|
|
|
|
#ifndef CONFIG_USBDEV_MAX_BUS
|
|
#define CONFIG_USBDEV_MAX_BUS 1
|
|
#endif
|
|
|
|
/* EP0 + EP1..EP4 have FIFOs on BL616; EP5 is used as a FIFO-less CDC notify EP */
|
|
#ifndef CONFIG_USBDEV_EP_NUM
|
|
#define CONFIG_USBDEV_EP_NUM 6
|
|
#endif
|
|
|
|
/*
|
|
* Host-side defines: bflb_usb_v2.c includes usbh_core.h even in device-only
|
|
* builds, so these have to exist.
|
|
*/
|
|
#define CONFIG_USB_EHCI_HCOR_RESERVED_DISABLE
|
|
#define CONFIG_USBHOST_MAX_RHPORTS 1
|
|
#define CONFIG_USBHOST_MAX_EXTHUBS 1
|
|
#define CONFIG_USBHOST_MAX_EHPORTS 4
|
|
#define CONFIG_USBHOST_MAX_INTERFACES 8
|
|
#define CONFIG_USBHOST_MAX_INTF_ALTSETTINGS 8
|
|
#define CONFIG_USBHOST_MAX_ENDPOINTS 4
|
|
#define CONFIG_USBHOST_DEV_NAMELEN 16
|
|
#define CONFIG_USBHOST_MAX_BUS 1
|
|
#define CONFIG_USBHOST_PIPE_NUM 10
|
|
#define CONFIG_USB_EHCI_FRAME_LIST_SIZE 1024
|
|
#define CONFIG_USB_EHCI_QH_NUM CONFIG_USBHOST_PIPE_NUM
|
|
#define CONFIG_USB_EHCI_QTD_NUM 3
|
|
#define CONFIG_USB_EHCI_ITD_NUM 20
|
|
|
|
#endif
|