Closed MarqueIV closed 4 years ago
It looks like Create is using an old version of avrdude /Users/marqueiv/.arduino-create/arduino/avrdude/6.3.0-arduino14/bin/avrdude
.
The Catalina compatible ones are 6.3.0-arduino16
and 6.3.0-arduino17
which you get with AVR core 1.8.1 (bundled in IDE 1.8.10) . May you also paste the verbose output of the IDE upload phase?
I believe it's above (the first code block). The second one was the cloud editor's output. Lemme make the separation more clear...
Ok, great. I may have an idea: it looks like the port reappears with the same name after the 1200bps touch (/dev/tty.usbmodem141401
) .
For some reasons maybe the bootloader is not getting recognized as a correct CDC device and the upload starts when the timeout is reached and the sketch restarted.
You may try to keep the board in bootloader mode by pressing the reset button "often" (once every 5 seconds), make sure the LED is fading, check in the meantime if the port is recognized by the OS.
Probably @gvarisco knows some dmesg
-like command that can help understanding what is going on.
Thanks!
No, the button just kicks you right out with an error. Damn. Well I do have a Windows VM which I'm gonna try to see if that works. Fingers crossed! Otherwise I'm DOA!
Hello, Same problem here with Arduino 18.1.11 and Catalina final. For me, Arduino Leonardo is concerned. But, with Windows 7 VM via Parallels Desktop, there is no problem... By the way, the D13 LED smoothly blinks before the error that's mean there is a communication. Regards, Cyril
Just confirmed my version of macOS is the released version, so this is going to be a critical issue for Mac users as now there's no viable Arduino solution for them short of installing Windows. Not optimal at all!
We're on it, @MarqueIV. We'll get back to you all once we are done with our findings.
Sorry. Just whining because I'm now cut off from one of my most favorite toys! :)
I've run into the same issue like @facchinm observed with the 1200 baud touch not doing anything and noted it here: https://github.com/qmk/qmk_firmware/issues/6133#issuecomment-531884906
I'm seeing mctl RS232_S_OUTPUTS failed
when I check things in dmesg
.
I'm seeing the exact same behavior, unfortunately. Tried replacing the avrdude executable and .conf
with a newer one built today and available in Homebrew - same output.
I am seeing this as well with the 1.9.x beta on Catalina.
Same issue... Looks like an issue with AVRDude trying to communicate with the serial interface? Trying to update a project to Arduino Leonardo using macOS Catalina 10.15. Just another hint, the "Get Board Info" functionality works...
Have not been around Arduino in some time, just trying to get back into a sketch - turbine control application I wrote a few years ago. "User configuration file does not exist... " when I upload the simplest sketch. Mac OS 10.15, Arduino 1.8.10. I broke out the old Powerbook G4 OS 10.4.11 Arduino 1.0.6 where the original sketch was developed, compiled and uploaded successfully years ago. Now any upload attempts end with " avrdude: stk500_getsync(): not in sync: resp=0x30" What is going on? It used to be easy. Please help me get started again.
For those who don't want to downgrade their OS but still want to continue with Arduino IDE workaround is installing a windows VM.
We're very sorry this is happening, looks like macOS Catalina update broke the bootloader recognition for atmega32u4-based Arduino boards. We've filled a case (FB7376052 for reference) with Apple and we hope to hear back from them as this is impacting lot of users.
We're very sorry this is happening, looks like macOS Catalina update broke the bootloader recognition for atmega32u4-based Arduino boards. We've filled a case (FB7376052 for reference) with Apple and we hope to hear back from them as this is impacting lot of users.
Hello, Thank you very much for your feedback. We'll gonna be patient. By the way, and only for my curiosity, why upload works via a VM ? Regards, Cyril
By the way, and only for my curiosity, why upload works via a VM ?
Are you saying they work when Catalina is run under a VM? That would be interesting.
However if you're asking why, as others have stated, you can do this under a VM running Windows or even earlier versions of macOS, it's because exactly of that... those are different OS versions. The issue is with Catalina, not the computer or the Arduino.
same here, confirm that update to Catalina breaks avrdude flashing to arduino leonardo and any clones using catherina bootloader.
By the way, and only for my curiosity, why upload works via a VM ?
Are you saying they work when Catalina is run under a VM? That would be interesting.
However if you're asking why, as others have stated, you can do this under a VM running Windows or even earlier versions of macOS, it's because exactly of that... those are different OS versions. The issue is with Catalina, not the computer or the Arduino.
No, that's not what I want to say... :-) Sorry...
Correct sentence is : With Windows 7 running under Parallels Desktop, Arduino IDE uplaod to Leonardo works correctly. Which means that Catalina is totaly "clear" and without control about the USB software layer used by Parallels Desktop ?
By the way, the last Catalina update (macOS 10.15 (19A602), 19.10.15) doesn't change anything.
Regards,
Cyril
The issue is indeed with catalina. It works on my same laptop with triple boot : the windows and linux installed on it still flash .hex files perfectly with avrdude. Only macos catalina is broken. Other things broken: mini display ports no longer support higher resolutions anymore (for instance external monitor used to be able to do 3840x2160 both with hdmi and display port on mojave. after catelina update the higher resolution only works on the big hdmi port. But no longer on the mini ports they now fall back to 1920x1024) So basically a lot of stuff is now broken on Catalina, wished I stayed on Mojave now...
Have the same issue. And that happened after the update. Tried to connect other serial devices or redirect to Parallels Desktop on Windows, unsuccessfully. I suppose that the reason in OS X
Hi everyone, after some tests on real hardware it appears that the issue is about the Caterina bootloader being recognized as "something else" (see https://github.com/qmk/qmk_firmware/issues/6133#issuecomment-542147187)
I'm trying to find the specific problem that triggers that behaviour to speedup Apple fix.
In the meantime, the experimental Caterina2 bootloader (from this repo) works on Catalina.
If you have an external debugger or another Arduino board not affected by the bug (like a UNO) you can flash it using the attached binary and these command lines
.../6.3.0-arduino17/bin/avrdude -C.../6.3.0-arduino17/etc/avrdude.conf -v -patmega32u4 -catmelice_isp -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0xfb:m -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m
.../6.3.0-arduino17/bin/avrdude -C.../6.3.0-arduino17/etc/avrdude.conf -v -patmega32u4 -catmelice_isp -Pusb -Uflash:w:Caterina2-Yun.hex:i -Ulock:w:0x2F:m
You need to change ...
with the actual path of your avrdude and -catmelice_isp
with your programmer.
The first command removes the bootloader flash protection, while the second one flashes the real bootloader. On a successful load, the fading led will be faster than previously.
Good guide on ArduinoAsISP: https://www.microcontrollertips.com/programming-avr-microcontrollers-arduinos-arduino-isp/
ArduinoAsISP example (also included in the IDE): https://github.com/arduino/Arduino/blob/master/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino
Ok, it looks like we have a culprit.
From Catalina dmesg
AppleUSBACMControl::sendMER: deviceRequest() bmRequestType 0x21, bRequest 0x22, result 0xe0005000
This happens when a port serial configuration gets changed; the fix (bootloader side) is trivial
diff --git a/bootloaders/caterina/Caterina.c b/bootloaders/caterina/Caterina.c
index 9860b3a..fe4bc95 100644
--- a/bootloaders/caterina/Caterina.c
+++ b/bootloaders/caterina/Caterina.c
@@ -256,6 +256,16 @@ void EVENT_USB_Device_ControlRequest(void)
}
break;
+
+ case CDC_REQ_SetControlLineState:
+ if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
+ {
+ Endpoint_ClearSETUP();
+ Endpoint_ClearStatusStage();
+ }
+
+ break;
+
case CDC_REQ_SetLineEncoding:
if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
{
So the problem is about OSX failing where it should just report a warning (since failing to change the baudrate is not a fatal problem).
If anyone has intels about Darwin sources for latest macOS we can probably provide the patch to Apple directly.
@gvarisco @w-A-L-L-e @nooges
I'd like to add as it is maybe relevant that this also happens using Arduino with esptool.py instead of avrdude. I also just updated my SILabs drivers as well. Funny thing is this worked for me all through the Catalina betas.I'll reboot soon and see if that helps re the driver install though it didnt say it required restart.
So what to do to fix thIs bug? The only way is waiting apple to fix the Problem?
You can do what @facchinm said, which is upgrade the bootloader of the microprocessor or wait for Apple to change their way of handling baudrate changes. I will try to do upgrade the bootloader as I don't think Apple will be convinced that changing the baudrate should only raise a warning and not disconnect the device.
By the way great work @facchinm !
Would it be possible to directly access the bootloader using something like libusb? That way a modified avrdude could be able to bypass the macos acm layer.
do we need to create a post on apple forums ?
do we need to create a post on apple forums ?
Apple forums might help, but I do suggest to file a bug using their new 'Feedback Assistant' tool: https://feedbackassistant.apple.com
@rolzing indeed, ideally apple should fix it as it means currently bricking all existing arduino leonardo or compatible devices (basically 90% of atmega32u4 devices in the wild).
It requires reprogramming a new bootloader for these in order to get them working again (allowing uploading of new sketches from catalina or firmware upgrades in our case also are broken on catalina due to this). I've applied the patch from @facchinm to our bootloader as well and recompiled a .hex of anykey bootloader with this patch (the anykey bootloader is useable for other arduinos, it just adds a copy+write protection by allowing to turn on/off the bootloader using a flag in eeprom).
Will test this on mac + win + linux before merging into master. https://github.com/w-A-L-L-e/anykey-bootloader/blob/development/anykey/anykey_bootloader.hex Thanks @facchinm for the quick patch!
@gvarisco ok also left a feedback here https://feedbackassistant.apple.com/feedback/7388070
if this is due to an exception due to baud rate change failure apple isnt likely to change that. The exception should be handled by the caller.
Sent from my iPhone
On Oct 17, 2019, at 9:37 AM, Walter Schreppers notifications@github.com wrote:
@rolzing indeed, ideally apple should fix it as it means currently bricking all existing arduino leonardo or compatible devices (basically 90% of atmega32u4 devices in the wild).
It requires reprogramming a new bootloader for these in order to get them working again (allowing uploading of new sketches from catalina or firmware upgrades in our case also are broken on catalina due to this). I've applied the patch from @facchinm to our bootloader as well and recompiled a .hex of anykey bootloader with this patch (the anykey bootloader is useable for other arduinos, it just adds a copy+write protection by allowing to turn on/off the bootloader using a flag in eeprom).
Will test this on mac + win + linux before merging into master. https://github.com/w-A-L-L-e/anykey-bootloader/blob/development/anykey/anykey_bootloader.hex Thanks @facchinm for the quick patch!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Where is Caterina.c ?How could i edit it? i could not find it on Arduino for macOS
@zixzixzix it's a part of ArduinoCore-avr
If anyone finds themselves in this ticket's situation:
I can confirm that running Arduino in a virtualbox instance can work. However you end up opening a can of not insignificant worms around USB access between the host (MacOS) and the guest OS.
I got something working for my own use case, and wanted to share a heavily-commented Vagrantfile
which should get you rolling with arduino-cli
. This was sufficient for me to compile and load my Adafruit Feather 32u4, and I have no reason to believe it wouldn't work for most other hardware as well.
https://gist.github.com/triplepoint/3d6d6070dc9b974b2a715d4dc2f2f59e
Good luck.
Isn't there a way to directly patch AVRDude, so that it handshakes exactly the same way virtualbox is doing it?
@fubyo it's not about avrdude; virtualbox forwards the whole USB communication so the virtualized operating system operates independently (and doesn't fail on the missing control request)
I am using Caterina2 bootloader as @facchinm suggested and it works as expected. Anyone knows when are the boards going to be released with this new bootloader?
Using esp32 it uses esptool.py and has the same issue. Drivers are moved to a new space in Catalina, not a kext, not user space per se but a dext space. That could be the culprit here.Whatever change it broke very recently when it had worked fine for 10 or so betas.IT is not just AVRdude. I've not had any luck yet. I wonder if it is a permission/security related issue as it always reports the resource is busy from a fresh boot and no open handles. Later I could check the last few release notes for Catalina and see if anything stands out.
Thanks @facchinm. The patch works well on my Catalina v10.15 19A602.
Here I created Vagrantfile which does everything via provisioning. One can use it for sample. My project is based on Spark Fun Pro Micro, that's why VID/PID are set for it. PlatformIO used as backend
https://github.com/p1ne/fdim-controller/blob/master/Vagrantfile
I think i need to compile BootLoader file. I think its too far for me. And my English is not good. When a run make. `/bin/sh: avr-size: command not found /bin/sh: avr-size: command not found [INFO] : Begin compilation of project "Caterina2"...
make: avr-gcc: No such file or directory make: *** [build_begin] Error 1` Could anyone upload the hex file ?
I think i need to compile BootLoader file. I think its too far for me. And my English is not good. When a run make. `/bin/sh: avr-size: command not found /bin/sh: avr-size: command not found [INFO] : Begin compilation of project "Caterina2"...
make: avr-gcc: No such file or directory make: *** [build_begin] Error 1` Could anyone upload the hex file ?
At the bottom of the post there is a link. https://github.com/arduino/Arduino/issues/9290#issuecomment-542706407
Regards.
Thank you all! It works
@zixzixzix here's the original caterina bootloader patched and bootlock feature added as hex file: https://github.com/w-A-L-L-e/anykey-bootloader/blob/development/anykey/anykey_bootloader.hex
Rrrrrr !!! I'm going to be mad ! All is done from Catalina.
I'm using a Uno as programmer. The target is a Leonardo, of course. I've injected the sketch ArduinoISP in the Uno, then I'have wired the Uno to the Leonardo.
I've tried the two ways : to the ICSP of the Leo, and to pins 11, 12, and 13.
Here is my command line :
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C /Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -p atmega32u4 -c arduino -P /dev/cu.usbserial-141230 -e -U lock:w:0x3F:m -U efuse:w:0xfb:m -U hfuse:w:0xd8:m -U lfuse:w:0xff:m
And here is the output :
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/Users/csab/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/cu.usbserial-141230
Using Programmer : arduino
AVR Part : ATmega32U4
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 9000 9000 0x00 0x00
flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 4.4
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: Expected signature for ATmega32U4 is 1E 95 87
Double check chip, or use -F to override this check.
avrdude done. Thank you.
Why avrdude see the Uno's chip (m328p), and not the Leo one (m32u4) ???
I'm going to try via a Linux.
Regards,
Cyril
I've got an express M4, thinking whether I could use that to write patched bootloader. But not sure what the correct pinout for the default sketch would be. Do I only need to assign one GPIO that connects to reset pin? Can I pick any?
For what it's worth, I updated my Macbook to 10.15.1 last night, and I'm still getting the same failure today.
hiya if someone is enterprising they can update https://github.com/adafruit/Adafruit_AVRProg to have a sketch for the leonardo bootloader, this library runs on any microcontroller
Anyone else still unable to use Arduino on esp? esptool.py 2.6 that seems to be included in Arduino might be the problem. I installed 2.7 which may have a fix, but Arduino still reports 2.6. Point being there must be other Catalina issues than the avr boot loader as esps would use something different? I've been down for well over a week now. Everything works fine on windows 10 same version of Arduino.
For what it's worth, I updated my Macbook to 10.15.1 last night, and I'm still getting the same failure today.
I'm digging deeper myself as I can't wait for the community to fix it it seems.
I'm going to try copying esptool.py into the location of 2.6.1 in library/Arduino15 if you aren't using ESP, perhaps doing the same for updating avrdude will fix it for Catalina also. I haven't tried burning to an avr in a while. If this works I'll let you know with instructions so you can try it.
Just downloaded and upgraded to the released version of macOS 10.5 Catalina (build 19A583) along with the latest official release of Arduino (1.8.10). I'm using an official (i.e. not a clone) Arduino Micro. Ever since doing so, I can not upload.
Here is the sketch...
The app compiles, but as soon as the upload begins (the light 'breathes' on the device) I get the below.
Note: I also tried the cloud editor with the plugin (again, latest as of tonight) but that didn't work either. Those results are under these ones.
RESULTS FROM THE ARDUINO IDE:
RESULTS FROM THE ARDUINO WEB EDITOR: