This commit is contained in:
2024-12-04 06:46:44 +06:00
parent a764880fe0
commit a521086d10
18 changed files with 2244 additions and 1115 deletions

16
generate_ocd.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/sh
if [ $# -ne 1 ]; then
echo "Usage: $0 <binary_file>" >&2
exit 1
fi
printf "set rtl8710_flasher_firmware_ptr %s\n" "$FIRMWARE_ADDRESS"
printf "set rtl8710_flasher_buffer %s\n" "$BUFFER_ADDRESS"
printf "set rtl8710_flasher_buffer_size %s\n" "$BUFFER_SIZE"
printf "set rtl8710_flasher_sector_size %s\n" "$FLASH_SECTOR_SIZE"
printf "\n"
printf "set rtl8710_flasher_code [list \\\n"
hexdump -v -e '1/4 "0x%08x "' "$1"
printf "]\n\n"