An ISP (In-system programming) tool for HPMicro MCUs.
cargo install hpm_isp
sudo cp 99-hpm_bootrom.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules
# Write to flash (use default memory config)
hpm_isp flash 0 write 0x400 flash.bin
# Write to flash (use custom memory config)
# Note: if hpm_isp.bin exists in the working directory, it will be used by default.
# So you don't need to pass -c option explicitly.
hpm_isp flash -c hpm_isp.bin 0 write 0x400 flash.bin
# Read from flash
hpm_isp flash 0 read 0x0 0x4000 flash.bin
# Use config wizard to generate config file (save as hpm_isp.bin)
hpm_isp wizard