pylink
pylink copied to clipboard
Changing a specific memory address
Hey, I'm new to Python and pylink, but I've managed to flash my target through file. I wanted to know if is it possible to change a specific memory address, if so, any tips?
Hello,
Do you mean changing the last few bytes of the image you're flashing? There are two flashing apis: flash
and flash_file
. I'm going to assume you're using the latter. If so, then you could use the former and modify the last couple bytes of your image. E.g.
with open('image.bin', 'rb') as f:
data = f.read()
modified_bytes = [...]
data = data[:len(modified_bytes)] + modified_bytes
Then you could call .flash()
with the target address (same as with flash_file
), but the modified data above.
Ability should be available in v1.0.0
through flash()
.