Okay, I combined the two original hex files from xyphro's repository with this command:
srec_cat BootloaderMassStorage.hex -Intel TestAndMeasurement.hex -Intel -o UsbGpib-combined.hex -Intel
Then I programmed that combined hex file to one of my five working adapter of xyphro's hardware design using this command:
avrdude -c atmelice_isp -p m32u4 -e -Ulock:w:0x3F:m -Uefuse:w:0xcb:m -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m -U flash:w:UsbGpib-combined.hex
So the hex file attached below when flashed to the hardware I have results in a working UsbGpib adapter.
OK so that is good progress. It will make initial programming of the adapter a lot easier. A very simple script/batch file will do it. It could also be done with adding to the MAKE file.
I am still confident that both hex files can be programmed with the one avrdude call. The hex files already include the right addresses to correctly place them in memory space. I didn't set the fuses when I tried because they were already programmed. Using just avrdude would avoid the need to install srec. Just one less thing to go wrong.
I am still working to the hypothesis that I have a usb hardware fault, so any failure with my avrdude command is probably due to that fault. I need to do fault finding. I have only assembled one of five pcbs to ensure I haven't introduced any design errors.
OK I used srec-cat to program the adapter. That worked. I did a dump on the flash memory.
I then ran the following command to program the adapter just using avrdude:
..\avrdude -c usbasp -p m32u4 -e -Ulock:w:0x3F:m -Uefuse:w:0xcb:m -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m -U flash:w:TestAndMeasurement.hex -U flash:w:BootLoader.hex
and did another flash memory dump. Both dumps are identical. That means there is no requirement to install and run srec-cat. Programming both files can be done with a single command and this should mean the adapter is ready to run straight away.
My adapter still won't run with both files installed. It takes power from the USB-C, but the LED won't flash at all under any circumstances. I have to erase/not program the BootLoader.hex file.
With the adapter plugged into my HP 3478A Multi-meter, the usb does not register on my PC.
I gave the board a really good clean (acetone/IPA) to get rid of any trace of flux.
I did a continuity check of the USB data lines to make sure they were OK between the connector and the MCU.
I cannot find a hardware fault so far.
When I program just the TestAndMeasurement.hex file without the BootLoader, the LED starts flashing again.
When I connected the adapter to a Linux laptop and ran
>lsusb
The adapter did not show (as expected).
When I then connected the adapter to my HP 3478A, and ran
>lsusb
again, no show.
I have an issue with the USB. I have swapped cables with no change.