Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/targetdisk/td-ez

Target Disk firmware for EZ-USB device bridge hardware
https://github.com/targetdisk/td-ez

Last synced: 3 months ago
JSON representation

Target Disk firmware for EZ-USB device bridge hardware

Awesome Lists containing this project

README

        

# Targetdisk Cable Firmware
### for Cypress EZ-USB FX2

This firmware is for the Cypress CY7C68013 EZ-USB FX2 chip (well for two
FX2 chips, actually).

## What is this?

My USB target disk solution allows any UEFI-compatible motherboard to share all
attached block storage devices with another computer as if they were just regular
USB mass storage devices.

![diagram of how this all works](fx2-sketch.png)

1. The business end of our dongle device attaches to a target computer. The
target computer loads and executes
[the Targetdisk UEFI runtime](https://github.com/targetdisk/targetdisk-efi)
hosted on the business end of our dongle.
2. The UEFI runtime on the target device reloads the business end of our
dongle device its FIFO-establishing firmware.
3. After the business end of the dongle reboots, it lets the other FX2 know
that it's time to wake up and establish our hardware FIFO. The hardware
FIFO then begins to proxy SCSI commands from the mass storage interface end
of our dongle to the target computer's UEFI runtime.

## Building
### Building the Firmware IHEX
So far I have only partially implemented step one of the diagram above, named
`efi-booter`. You can build the Cypress EZ-USB FX2 firmware by running:
```
make efi-booter
```

### Building the ESP image
To build the SPI flash image that it hosts, you'll need a GNU/Linux system with
`losetup`, `sgdisk`, `mkfs.fat,` and a recent version of the Bash shell. These
are used in the image creation targets of the `GNUmakefile` and the `mk-esp` and
`populate-esp` scripts that it calls.
```
make esp-image
```

## Running
### Flashing the FX2 Firmware
Due to the current unfinished state of the project, I'm not yet permanently
flashing my firmware to the device yet.
```
make load-booter
```

## Troubleshooting
If you pull down recent code and stuff is no longer building, you can safely
remove the `var` directory in your local project root. That should fix most
problems. If that still doesn't work, please file a
[GitHub issue](https://github.com/targetdisk/td-ez/issues/new/choose).

## See Also
- The [libfx2 documentation](https://libfx2.readthedocs.io/en/stable/introduction.html)
- My work-in-progress
[Targetdisk UEFI runtime](https://github.com/targetdisk/targetdisk-efi)
- The [original CY7C68013 EZ-USB FX2 USB Microcontroller datasheet](https://www.keil.com/dd/docs/datashts/cypress/cy7c68xxx_ds.pdf)
- Infineon's [updated datasheet](https://www.infineon.com/dgdl/Infineon-CY7C68013A_CY7C68014A_CY7C68015A_CY7C68016A_EZ-USB_FX2LP_USB_Microcontroller_High-Speed_USB_Peripheral_Controller-DataSheet-v31_00-EN.pdf?fileId=8ac78c8c7d0d8da4017d0ec9f7974252)
- The [FX2 Technical Reference Manual](https://www.infineon.com/dgdl/Infineon-EZ-USB_TECHNICAL_REFERENCE_MANUAL-AdditionalTechnicalInformation-v08_00-EN.pdf?fileId=8ac78c8c7d0d8da4017d0f9093657d61)