Add Imxrt erase firmware#102
Conversation
| # TODO write-register doesn't work | ||
| erase-app: $(BUILD)/$(OUTNAME).bin | ||
| @:$(call check_defined, SDPHOST, not found for this machine) | ||
| $(SDPHOST) -u 0x1fc9,$(SDP_$(MCU)_PID) -- write-register $(DBL_TAP_REG_ADDR) 32 $(DBL_TAP_MAGIC_ERASE_APP) |
There was a problem hiding this comment.
@nxf58843 somehow I couldn't get the write-register to work, it always get no response from device. Though this is not important, most user should use the erase-firmware.uf2 . I just wonder if I made any mistakes. Else we could just remove this together.
sdphost -u 0x1fc9,0x0145 -- write-register 0x400D410C 32 0xf5e80ab4
getStatusResponse.readPacket error 5.
Status (HAB mode) = 10004 (0x2714) No response from device.
read-register doesn't work as well
sdphost -u 0x1fc9,0x0145 -- read-register 0x400D410C
getStatusResponse.readPacket error 5.
Status (HAB mode) = 10004 (0x2714) No response from device.
There was a problem hiding this comment.
Let me look into this.
Have you tried reading an address from OCRAM?
I need to see if that address is accessible or needs to be enabled.
There was a problem hiding this comment.
I have just tried to read from dtcm and ocram but it doesn't response either. No problems at all, I am just curious, using uf2 is more preferable. I will merge it now, you don't have to "fix" it at all 😃
$ sdphost -u 0x1fc9,0x0145 -- read-register 0x20200000
getStatusResponse.readPacket error 5.
Status (HAB mode) = 10004 (0x2714) No response from device.
$ sdphost -u 0x1fc9,0x0145 -- read-register 0x20000000
getStatusResponse.readPacket error 5.
Status (HAB mode) = 10004 (0x2714) No response from device.
There was a problem hiding this comment.
Glad you can move forward with the uf2 implementation.
It looks like the read/write register commands were dropped from the RT1010 due to ROM size limitation.
You could write a single word using write-file, but adding another file is not much better than separate binaries.
I may try setting the magic numbers with different jump addresses when I can find time.
There was a problem hiding this comment.
ah thanks for confirmation, I will just remove the make target. uf2 will be the standard way for erase_firmware (factory reset) for tinyuf2. Don't worry about having other register for erase_firmware. I don't see any issue with packing to the double tap reg. May only need to rename these variable a bit to be more generic than just double tap
This PR fix #95
erase_firmware-BOARD.uf2for all portserase_firmware-BOARD.uf2is also uploaded as ci artifact/release if available.