init echo "Dump ITCM area" dump_image backups/itcm_backup.bin 0x0 1300 echo "Reset and halt" reset halt echo "Load image" load_image firmware/flash_dumper.elf reset halt sleep 1000 echo "Set stack pointer" reg sp [mrw 0x20000000] reg pc [mrw 0x20000004] echo "Continuing, wait ca. 10 seconds" resume sleep 10000 halt echo "Dumping" dump_image backups/flash_backup.bin 0x24000000 1048576 echo "Done!" exit