1234567891011121314151617181920212223242526272829303132333435363738 |
- #!/bin/sh
- test_init()
- {
- request_DUT "atmega32dip40" || return 1
- return 0
- }
- test_run()
- {
- # Check signature
- toprammer --read-sig "$tmpfile"
- compare_file_to_hex "$tmpfile" "1E9502" || die "signature mismatch"
- toprammer --erase
- # Check progmem
- toprammer --write-prog "$testfile_32k"
- toprammer --read-prog "$tmpfile"
- compare_files "$testfile_32k" "$tmpfile" || die "progmem mismatch"
- # Check EEPROM
- toprammer --write-eeprom "$testfile_1k"
- toprammer --read-eeprom "$tmpfile"
- compare_files "$testfile_1k" "$tmpfile" || die "EEPROM mismatch"
- # Check fuses
- testfuses="A4D9"
- echo "0x0000: $testfuses" | toprammer -I ahex --write-fuse -
- toprammer --read-fuse "$tmpfile"
- compare_file_to_hex "$tmpfile" "$testfuses" || die "fuses mismatch"
- # Check lockbits
- toprammer --read-lock "$tmpfile"
- compare_file_to_hex "$tmpfile" "FF" || die "lockbits mismatch"
- toprammer --write-lock "$tmpfile"
- }
|