[patch #6825] xmega problems with JTAGICEmkII

View: New views
6 Messages — Rating Filter:   Alert me  

[patch #6825] xmega problems with JTAGICEmkII

by Ilguiz Latypov-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


URL:
  <http://savannah.nongnu.org/patch/?6825>

                 Summary: xmega problems with JTAGICEmkII
                 Project: AVR Downloader/UploaDEr
            Submitted by: zladay
            Submitted on: Fri 08 May 2009 10:13:15 AM GMT
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email:
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

I am attaching a patch that fixes some xmega problems on JTAGICEmkII.
Added support/resolved issues:
- handling (r, w, v) of the following memory types
  * EEPROM
  * flash (including sections: application, application table and boot)
  * fuse bytes (0, 1, 2, 4, 5)
  * JTAG signature
  * lockbits
  * production signature
  * user signature
Supported xmega MCUs:
- 128a1d, 128a1, 192a1, 256a1
- 64a3, 128a3, 192a3, 256a3, 256a3b
- 16a4, 32a4, 64a4, 128a4
It was tested with an x128a1 only. Support for the rest
is based on the documentation only and is not tested.

Fixed bugs:
Segmentation fault caused by buffer overflow in jtagmkII_paged_load()
in jtagmkII.c.

Known issues:
- writing of user signature failure at verification (contents differ from
data written)
- writing of EEPROM failure at verification (contents differ from data
written) -
   the same behavior is experienced with the recent [4.16.628] version of
   AVR Studio - no working reference implementation is known

Still to do (among others)
- PDI physical interface support - recent version works with JTAG only
- erase operations (chip, flash, application, boot, EEPROM, user signature)





    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fri 08 May 2009 10:13:15 AM GMT  Name: avrdude-jtagicemkii-xmega.patch
Size: 37kB   By: zladay

<http://savannah.nongnu.org/patch/download.php?file_id=18118>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?6825>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
avrdude-dev mailing list
avrdude-dev@...
http://lists.nongnu.org/mailman/listinfo/avrdude-dev

[patch #6825] xmega problems with JTAGICEmkII

by Ilguiz Latypov-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #1, patch #6825 (project avrdude):

I finally got the time to test the patch.  Sorry for taking
forever.

Alas, with the patch, JTAG programming completely fails for me.
This is just a first test, so I didn't try to isolate the
hunk(s) of the patch that makes it fail.  The symptom is that
it starts out fine, but reads only garbage:

avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATXMEGA128A1REVD is 1E 97 41
avrdude> d fuse4
>>> d fuse4
0000  00                                                |.               |

avrdude> d fuse2
>>> d fuse2
0000  00                                                |.               |

avrdude> d flash
>>> d flash
0000  00 00 00 00 01 00 00 00  00 00 00 40 00 00 10 00  |...........@....|
0010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

avrdude> d ee
>>> d ee
0000  00 00 00 00 01 00 00 00  00 00 00 40 00 00 10 00  |...........@....|
0010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

In contrast, without the patch, at least the minimal
functionality is OK:

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9741
avrdude> d flash
>>> d flash
0000  0e 94 40 00 0e 94 2b 00  0e 94 4d 00 05 e0 00 93  |..@...+...M.....|
0010  05 02 00 93 45 02 00 91  16 02 10 91 56 02 01 23  |....E.......V..#|
0020  01 30 c9 f7 00 91 08 02  00 93 64 06 0e 94 4d 00  |.0........d...M.|
0030  00 91 09 02 00 93 64 06  0e 94 4d 00 00 91 48 02  |.. ...d...M...H.|

avrdude> d ee
>>> d ee
0000  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
0010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
0020  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
0030  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|

avrdude> d fuse4
>>> d fuse4
0000  1e                                                |.               |

avrdude> d fuse5
>>> d fuse5
0000  f7                                                |.               |

avrdude> d lock
>>> d lock
0000  ff                                                |.               |



    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?6825>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
avrdude-dev mailing list
avrdude-dev@...
http://lists.nongnu.org/mailman/listinfo/avrdude-dev

[patch #6825] xmega problems with JTAGICEmkII

by Ilguiz Latypov-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #2, patch #6825 (project avrdude):

I just noticed I mistyped the command.  So, without the patch,
EEPROM access doesn't work either, only the signature could
be read.  (The above data were collected using -c stk600.)



    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?6825>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
avrdude-dev mailing list
avrdude-dev@...
http://lists.nongnu.org/mailman/listinfo/avrdude-dev

[patch #6825] xmega problems with JTAGICEmkII

by Ilguiz Latypov-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #3, patch #6825 (project avrdude):

From the symptoms, it seems to me that you have not refreshed avrdude.conf.
That should remedy the situation. JTAG signature handling should at least
surely work.

There are however still problems with EEPROM read e.g..
I am submitting a newer patch that fixes most of these.
This new patch is against the SVN head (version 819).
This should be easier to integrate.

With this patch, memory handling should work (flash, EEPROM).
I am using this patched version of avrdude on Mac OS for programming
an x128a1 routinely. It is fairly stable. This has been reported by
a user on Linux, too.

There has been one issue reported. If flash programming is finished,
the target board does not start to run the new code. A manual reset
is required.

Features not dealt with:
- chip erase functions
- PDI physical interface support

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?6825>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
avrdude-dev mailing list
avrdude-dev@...
http://lists.nongnu.org/mailman/listinfo/avrdude-dev

[patch #6825] xmega problems with JTAGICEmkII

by Ilguiz Latypov-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Additional Item Attachment, patch #6825 (project avrdude):

File name: avrdude-xmega-05192009.patch   Size:38 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?6825>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
avrdude-dev mailing list
avrdude-dev@...
http://lists.nongnu.org/mailman/listinfo/avrdude-dev

[patch #6825] xmega problems with JTAGICEmkII

by Ilguiz Latypov-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Update of patch #6825 (project avrdude):

                  Status:                    None => Done                  
             Assigned to:                    None => joerg_wunsch          
             Open/Closed:                    Open => Closed                

    _______________________________________________________

Follow-up Comment #4:

Oops, sure, you are right: I forgot to add -C avrdude.conf
to use the local copy of it, rather than the installed
version.

Thanks a lot, I committed it to SVN now.

Fuse changes appear to require leaving and re-entering
programming mode on the Xmega in order to take effect.  This
is still not handled yet.  As it can also be noticed on the
STK600/PDI, it should probably be handled in a more generic
way than per-programmer.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?6825>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
avrdude-dev mailing list
avrdude-dev@...
http://lists.nongnu.org/mailman/listinfo/avrdude-dev