Closed kaidegit closed 6 months ago
This is not easy to fix. Some chip maps 0x0800_0000 to 0x0000_0000. When running, it uses 0x0800_0000, when flashing, it uses 0x0000_0000. I need to add full memory region info to handle this.
HEX files provide the write address. So i think the you can ignore default address and write to address from HEX file. Default address is only needed for BIN files, because they provide no location.
HEX files provide the write address. So i think the you can ignore default address and write to address from HEX file. Default address is only needed for BIN files, because they provide no location.
Agreed. .hex(intel hex) and .elf has the required region info.
logs are shown as follows
My hex file is started at 0x00008000, however, the program flashed it to 0x00000000.
i think the issue is caused by this, which always return a 0x00000000 or 0x8000000.
https://github.com/ch32-rs/wlink/blob/59459e298906ec41283595cbe3ac86dd08b6cac9/src/main.rs#L335-L337