atmega8dip28.test 905 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/sh
  2. test_init()
  3. {
  4. request_DUT "atmega8dip28" || return 1
  5. return 0
  6. }
  7. test_run()
  8. {
  9. # Check signature
  10. toprammer --read-sig "$tmpfile"
  11. compare_file_to_hex "$tmpfile" "1E9307" || die "signature mismatch"
  12. toprammer --erase
  13. # Check progmem
  14. toprammer --write-prog "$testfile_8k"
  15. toprammer --read-prog "$tmpfile"
  16. compare_files "$testfile_8k" "$tmpfile" || die "progmem mismatch"
  17. # Check EEPROM
  18. toprammer --write-eeprom "$testfile_512"
  19. toprammer --read-eeprom "$tmpfile"
  20. compare_files "$testfile_512" "$tmpfile" || die "EEPROM mismatch"
  21. # Check fuses
  22. testfuses="E1D9"
  23. echo "0x0000: $testfuses" | toprammer -I ahex --write-fuse -
  24. toprammer --read-fuse "$tmpfile"
  25. compare_file_to_hex "$tmpfile" "$testfuses" || die "fuses mismatch"
  26. # Check lockbits
  27. toprammer --read-lock "$tmpfile"
  28. compare_file_to_hex "$tmpfile" "FF" || die "lockbits mismatch"
  29. toprammer --write-lock "$tmpfile"
  30. }