CLEAR and any other Caravel chip have the same Car...
# clear
a
CLEAR and any other Caravel chip have the same Caravel RISC-V SoC, so generally-speaking they can both run the same firmware. Just note that any given firmware might be designed to target a specific circuit/project within the user project area of the custom silicon die space of Caravel... in which case it doesn't make sense for that firmware to be run on a different chip that doesn't have that same design in silicon. Firmware that should work universally is any that (for example) ONLY configures the GPIO pins and controls them directly without trying to interface with the custom design area of the chip. Peripherals such as the 38 GPIO pins, the on-chip UART, SPI Controller, timer, single Caravel-controlled 'gpio' pin, and DLL/PLL should all be accessible in this way on any Caravel chip.
In the hkflash snippet above, a possible explanation for what you're seeing (all zeroes) is that there is firmware running on your chip that has overridden the HKSPI interface on GPIO[4:0]. Since the utility has to use those pins specifically in their 'default' HKSPI mode, then if the pin mode for any of these has been reconfigured by firmware after power-on, then the various 'hk' utilities will not work. To get around that, you can hold down the 'reset' button while powering on the board (or otherwise find a way to short it), and keep it held while using the utilities.
I doubt that any firmware you have has actually done this, though, in which case I'd be checking whether you've got anything attached to GPIO[4:0] pins that could be interfering -- avoid those pins, and prefer connections to GPIO[37:5] instead.
If I recall correctly, it might also be that the FTDI UART interface can be jumpered to be active instead of the HKSPI interface... so check that you haven't done that also when trying to use any of the hk utilities.
m
In short as was confirmed here (https://open-source-silicon.slack.com/archives/C076M1W2M7G/p1721741266861139) util/ftdi_flash.py is less picky than util/caravel_hkflash.py for when you have uploaded a program that filddles with Caravel's GPIO pull up/down states - which we almost always do in order to program and use the project user area FPGA.