Hello, I’ve been trying to use the recovery instructions in the wiki to copy and run a recovery image for the JH7100 core. I’ve run into a few problems and while I’ve got a path forward worked out, I figured I’d share my my findings in case anyone else finds themselves with a similar problem.
So the initial loader when connecting to the debug pins and holding boot provides a small list of commands. The load command is supposed to open up for an XMODEM connection to receive binary data and load it at a given address. In the recovery instructions, this is used to load the recovery to 0x18000000. Afterwards, a do command is used to enter this address. I’ve not been able to get the XMODEM connection to work for this particular item thus far, although it has worked in the past for the later stage boot loader restorations. I simply get some sort of ACK error, I’ll have to copy the text verbatim next time I try.
Another task the loader seems to have trouble with is reading 4-byte longs that occupy the second half of an 8-byte quad-word. The commands are r(b|w|l) and w(b|w|l) to read and write a byte, word, or long respectively. The byte command can read any, and the word command appears to need to be 16-byte word aligned, and will pass back an error if this isn’t the case, but the long command only succeeds on 8-byte boundaries, and fails to pass back an error or return on the odd 4-byte boundaries.
Finally, there is a show command that appears to be somewhat similar to “od” on Unix in that it is used to dump a range of memory in some sort of intelligible fashion. However, I’ve found using this function only prints one line as individual bytes and then hangs until an interrupt is sent. I haven’t tried in a few days, I will update this with the exact behavior, but I’m pretty sure if I left the address and length off in subsequent calls, it would print back another line of bytes but likewise hang after printing rather than printing the full length or exiting.
I can verify that the do command seems to enter the program text correctly, as I used the wb command to write in an arbitrary binary and enter it and observed what I expected to happen.
This component passes back a copyright notice of SiFive, so the component itself may not be in direct control of StarFive.