Error while uploading: missing 'program.pattern' configuration parameter - on Mac #620
Replies: 5 comments
-
Arduino as ISP is only for classic AVRs, these are modern AVRs. You will notice that Arduino as ISP isn't an option on the tools -> programmer menu, You can upload using jtag2updi (but it's got a variety of bugs that I was never able to completely sort out (the code is an exercise in "look how good I am at C++" rather than something meant for any other human being to modify. Adding Dx support to it was hell). And it needs something like an arduino nano to run - instead of a serial adapter. UPDI initialization failed doesn't give enough information. It's like "The upload did not work" As of 2.5.7 the verbose mode during uploads works for SerialUPDI, so you may have success there. Start with the slowest serialupdi option. You'll notice there are a ton of them now, because USB latency is often dominant rather than data transfer time. So the page write delay - on windows, oe with a CH340 adapter, is handled by just the USB latency. Whereas with other combinations, you often need to account for the time that a page write takes with a pause. But on a CH340 on windows, that pause destroys performance and those users would scream at me if I put it in for everyone. It would appear that you found a critical bug impacting uploads on non-windows platforms. Somehow, for reasons unclear to me, avrdude.pattern.program got changed to avrdude.pattern.program.windows, and is broken on non-windows platforms (or should be) Will release 2.5.8 shortly to correct this. |
Beta Was this translation helpful? Give feedback.
-
Hi Spence. Thanks for the speedy reply and the excellent detailed answer. That really helped clarify things for me. I look forward to 2.5.8. Many thanks again. I have the utmost respect for you.👏🏻👏🏻👏🏻 |
Beta Was this translation helpful? Give feedback.
-
Forward would be the right direction to look - towards the instance of the Arduino IDE on your computer screen, because it's available in board manager now. It was a truly trivial fix for an issue which I have no idea how long has been |
Beta Was this translation helpful? Give feedback.
-
Thanks for fixing this, @SpenceKonde, though to be honest, it was the kick in the butt I needed to drop jtap2updi for SerialUPDI. 😉 |
Beta Was this translation helpful? Give feedback.
-
Thank's so much @SpenceKonde I tried it tonight when I got in and it now works on my mac. Thank you so much for the speedy responce. You are a true gentleman and a scholar. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Great work Spence on this amazing resource. Thanks so much for everything you have done. I take my hat off to you sir.
So, let me say this right from the get-go: I'm very inexperienced with all of this. I previously only ever did a few months of coding True Basic at Uni back in 1999 and I only ordered an Arduino Nano a week ago, and subsequently some ATtiny204s a few days later. I have, however, succeeded in writing my first program, which worked on the Nano first time of asking.
Then came transferring it onto the ATtiny. I had seen various methods for using an Arduino as ISP and additionally jtag2updi. I watch several different videos on how to program the ATtiny using Arduino. Some using the single 4.7k resistor method from pin6 of the Nano to UPDI, and others using the diode Rx>Tx and resistor which I had also read through from your fantastic documentation.
I watch the following videos, and possibly some others, and read through several tutorials on the Arduino pages and other blogs.
https://www.youtube.com/watch?v=Oi5mpWqeIDk&t=608s
https://www.youtube.com/watch?v=n55BnGd6Fak&t=59s
https://www.youtube.com/watch?v=AL9vK_xMt4E
So my brain was swimming with contrasting approaches, and I got the feeling from reading the documentation, that I should avoid jtag2updi if possible. At this point, after watching the videos, I was unsure what sketch I should load into the Arduino, 'jtag2updi' or the example 'ArduinoISP' included in the IDE. Could someone please clarify this point for me?
I first tried the diode method and serialUPDI (I tried every speed). I tried this with both ArduinoISP & jtagupdi.
I ran into a few issues here. My primary computer is a Mac running 10.15.7, Arduino IDE 1.8.19, megaTinyCore 2.5.6 (I have now updated to 2.5.7) and Arduino Nano which has CH340 and I had loaded the jtag2udpi sketch into the Arduino (Is this step correct?
I got these errors:
pymcuprog.pymcuprog_errors.Pymcuprog Error: UPDI initialisation failed (this is when selecting SerialUPDI as the programmer)
Error while uploading: missing 'program.pattern' configuration parameter (this is when selecting jtag2updi as the programmer)
I thought this was just due to my lack of knowledge/experience, or I was just doing a step wrong as I had confused myself from watching different methods on youtube. Or maybe I was setting up the hardware wrong. I additionally tried the pull-up resistor on Rx as it has an indicator LED on the Nano, in case this was causing the communication to fail.
But, when I gave up on the Mac and tried again on a Windows machine, it worked the first time. The method I used was the old school, 4.7k resistor from pin6 of the Nano top UPDI on the ATtiny204, jtag2updi method( jtag2updi sketch uploaded to the Arduino and then jtag2updi from the programmer in Arduino IDE, but it worked ok. I haven't tried the serialUPDI programmer yet.
I would prefer to use my Mac for this and it is my main machine. Do I need to install something extra, or am I just plain doing something wrong?
Any help would be greatly appreciated. I am very new to all this, but can usually get my head around things after a while.
Many thanks in advance.
JM
Beta Was this translation helpful? Give feedback.
All reactions