Reading hex files from CheapStat

  • @Will-Dickson Also if the above programmer is incompatible, can you suggest whether the following one will be compatible or not

  • @AheliGhosh

    The mcu on the cheapstat is ATXMEGA32A4 which is on the supported list for the model : RKI-1043 programmer in your first link. I haven't used that programmer - so I can't really give you any advice on using it. However, it does look like it is compatible with avrdude. I do have repository online with modified version of the cheapstat firmware which is set up so that you can build/flash the firmware from the linux command line (using avrdude) as follows

    make hex - builds software and creates .hex and .eep files.
    make flash - flashs firmware to cheapstat using the avrispmkII programmer
    make clean - clean source directory

    Note, you may need to modify the "-c" option in the call to avrdude in the Makefile in order to specify your programmer.

  • @AheliGhosh

    Sorry here is the link to the repository

  • @Will-Dickson

    The following avrdude command should read the flash and eeprom to .hex files

    avrdude -c avrispmkII -p x32a4 -U flash:r:cheapstat_flash.hex:i -U eeprom:r:cheapstat_eeprom.hex:i

    Again you may need to modify the -c option for your programmer.

  • @Will-Dickson

    You could use the following to use the resulting files to program another device

    avrdude -c avrispmkII -p x32a4 -U flash:w:cheapstat_flash.hex -U eeprom:w:cheapstat_eeprom.hex

    I tested it out with the AVR ISP MKII and seems to work fine with the Cheapstat that I have. Again you may need to change the "-c" option for your programmer.

  • Thank you for all your suggestions. I tried using the programmer of the first link I sent to you through avrdude in linux by replacing -c option with both stk500 and stk500v2. It shows the following error - 'program enable instruction not defined for part "ATxmega32A4"'. The supplier of the programmer informed us that the product does not support PDI and has only ISP. We have decided to go for an AVRISPMKII programmer hoping that would solve the issue.
    It would be of great help if you could suggest us the better one of the following two options or provide us the link of the supplier from where you got the hardware. Thanks in advance.
    Thanks in advance.

  • @Will-Dickson I found out that stk500 and stk500v2 do not support PDI programming. And only these two are supported by the programmer available with me. So I think I will have to discard this one and go for an actual AVRISPMK2 programmer. I'm looking forward to your suggestions.

  • @AheliGhosh

    I haven't used these programmers - so I can't really recommend one over the other. However, if they work as advertised either should work.

  • @Will-Dickson Thank you so much for the suggestions. I could make it work with the AVRISPMKII programmer. Also, your modified firmware, especially the makefile was very helpful and made my work absolutely easy. Thank you once again.

Log in to reply