
Previously CPLD programming involved a large 64kbyte buffer into which the the entire bitstream would be completely downloaded, and at which point the programming process would commence. This is needlessly wasteful of memory. Moreover, it could lead to USB timeouts as the firmware needs to wait the entire duration of the programming process before returning an ACK to the host after the final SETUP data phase packet. Instead, we now receive 512 byte chunks of the bitstream and stream them to the CPLD one at a time. We wait for each packet to be streamed out to the CPLD before ACKing the packet to prevent active data being overwritten.
The primary firmware source code for USB HackRF devices is hackrf_usb. Most of the other directories contain firmware source code for test and development. The common directory contains source code shared by multiple HackRF firmware projects. The cpld directory contains HDL source for the CPLD present on the Jawbreaker and Jellybean designs. The firmware is set up for compilation with the GCC toolchain available here: https://code.launchpad.net/gcc-arm-embedded Required dependency: https://github.com/mossmann/libopencm3 For loading firmware into RAM with DFU you will also need: git://git.openezx.org/dfu-util.git