[patch #9573] patch to add atmelice avr32 programming support to avrdude #1435
Replies: 10 comments
-
Bradley Jarvis <bradley_jarvis> This patch is in relation to bug #43178, I have had a few people ask me for the patch lately so want to add it back into avrdude. I just re-applied my patch made on 6.1 which was the original code base I worked with to the latest svn trunk version. |
Beta Was this translation helpful? Give feedback.
-
Joerg Wunsch <joerg_wunsch> Thanks for submitting the patch! First thing that springs to mind after applying it:
So why is this function no longer going to be used? After some closer inspection, I have a number of stylistic issues with the patch before I'd like to apply it.
Really in ISP mode?
I would appreciate if the patch keeps the existing style rule of having white space around operators (=, == etc.).
Source code comments and conditional compilation is not the way to keep track of history. This is what SVN (or whatever VCS is used) is for. Also, as you can see in the first snippet, make sure to not artificially alter the indentation style. Unfortunately, AVRDUDE's code base was never very consistent on whether to use TAB or spaces, but if you change a single existing line, do not convert a TAB to spaces or vice versa.
See above. If some piece of code isn't needed anymore, remove it, rather than commenting it out.
Again, random indentation changes, please avoid this. Tell you editor to not touch anything else but what you're actually editing.
Unneeded. The C standard guarantees free(0) does nothing. The entire patch looks quite intrusive to the existing jtag3.c file. Thus, it imposes quite a bit of risk of breaking things that are unrelated to the AVR32 addition (see the first warning about a now unused function). For that reason, I'd like to defer inclusion of the patch until after the next AVRDUDE release. Sorry, I don't have the time and energy of maintaining a separate -stable branch. However, even though I'm setting it to "postponed" now, please feel encouraged to re-submit the patch with the above things fixed. |
Beta Was this translation helpful? Give feedback.
-
Bradley Jarvis <bradley_jarvis> No problem, I will update the patch following the formatting guides mentioned. The function jtag3_edbg_recv_frame was only being called from jtag3_recv_frame and it had to be fixed so it was integrated into this function, from memory it was how it was handling fragmented frames. I initially implemented this patch on avrdude 6.1 back in 2015 and I believe in that version the jtag3.c module could not receive fragmented frames(besides I think my version is much clearer/cleaner ;). I think the ISP comment is a copy/paste error, it should have been JTAG, thanks for picking that up. I have made the changes and once I get a chance to test it on some hardware and then I will update the patch. |
Beta Was this translation helpful? Give feedback.
-
Bradley Jarvis <bradley_jarvis> Hi Joerg, I have attached a new patch with updated style changes and have also now tested on the AVR32 platform via jtag and also the AVR8 via ISP and XMEGA via PDI and all appears to work fine. There were some things that I needed to fix to get AVR8/XMEGA working. I did find a potential memory leak in the current jtag3 driver in the function jtag3_command(), at the end of the function on error the the memort allocated to resp is freed and then resp=0, it should have beenresp=0. However looking through the rest of the code it only ever called free on resp if the jtag3_command failed so really no problem there. Please let me know if I need to do anything else testing wise etc. Also not sure how to remove the old patch |
Beta Was this translation helpful? Give feedback.
-
Can this patch be adapted for Atmel JTAG ICE mkII (as well as AVR Dragon) for the AVR32 support? They do support AVR32. Ref: |
Beta Was this translation helpful? Give feedback.
-
The patch is here. |
Beta Was this translation helpful? Give feedback.
-
The other thing is that this support can probably extended to other UC3 parts. |
Beta Was this translation helpful? Give feedback.
-
AVR32 has been de-focused by Microchip/Atmel long ago. So we will close this issue. |
Beta Was this translation helpful? Give feedback.
-
Patch:
|
Beta Was this translation helpful? Give feedback.
-
Keep this in discussion in case thee are people who are interested in avr32. |
Beta Was this translation helpful? Give feedback.
-
Thu 22 Feb 2018 10:16:28 AM UTC
This patch adds support for programming avr32 devices via the atmelice jtag programmer using the jtag3 driver. The update add a new programmer atmelice_avr32 which is used to access the new feature
file #43383: avr32-jtag3.patch
file #51797: avr32-jtag3.patch
This issue was migrated from https://savannah.nongnu.org/patch/?9573
Beta Was this translation helpful? Give feedback.
All reactions