I've made some modification to the FPGA image of Pluto, and using JTAG to update the FPGA image works perfectly. But when I build the firmware and load it (either mount or DFU mode) the firmware doesn't get updated.
I've integrated my code in HDL submodule of the firmware repo at https://github.com/analogdevicesinc/plutosdr-fw. I do make at the top directory and it builds the new FPGA bit file along the way. I use this bit file for JTAG programming and it works perfectly. I don't get any errors, you can find the log attached (It has both stdout and stderr outputs). But when I use mount or DFU mode to flash the device, the flashing goes smoothly as expected (blinking and all), but the firmware is not updated and I get the default image behavior. I even tried only sending 0xDEADBEEF out, but again it sends me normal samples from the default image. The interesting thing is when I wanted to update the default firmware from the website, using normal copy in Windows worked, but for the new image trying Windows or Linux did not change the problem either.
I would appreciate any suggestions or pointers to how I can debug this issue.
P.S.: after updating the image with JTAG I have to unbind and rebind the AXI dmas on the integrated ARM to receive the data, but that's not the case when updating the firmware and it brings up the default image.
Here is output of serial bus in normal reset (power cycle):
And when I upload the firmware image and set diagnostic_report to 1:
Not sure if those missing index_*.html is a sign or dhcpd failure.
Can you try dropping the entire zip of an older firmware (not v0.30) and ejecting the device. Then check the index.html page to make sure that it is changing.
I tried with v0.29 and v0.25, again the process finishes earlier than it should and no change. I loaded boot.frm alongside pluto.frm, or all the contents of the zip file, or the zip file itself, still no change. Even I tried DFU mode and it didn't downgrade:
and here is the log on serial which seems to be correct (I used ssh and device_reboot sf to go to DFU mode):
I guess I can change the question to "help, stuck firmware!"
P.S.: dfu-util needs sudo but it was not mentioned in https://wiki.analog.com/university/tools/pluto/users/firmware
This sounds like a protected flash.
Can you break into u-boot via the UART terminal on the JTAG pins.
While the system boots conterminously press CTRL-C.
At the u-boot prompt enter:
sf probe && sf protect unlock 0 100000 && sf protect lock 0 100000
Yesssss, this worked! Thank you very much Michael and Travis.
Just to keep it in the post this was what I got at u-boot:
Pluto> sf probe && sf protect unlock 0 100000 && sf protect lock 0 100000SF: Detected N25Q512A with page size 256 Bytes, erase size 4 KiB, total 64 MiBSF: UnlockedSF: Locked
And after that firmware update took longer and the image was downgraded, and for my custom image this was the result:
And it's functioning as expected.Moein