Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leonardo support #3

Open
cb88 opened this issue Dec 7, 2015 · 1 comment
Open

Leonardo support #3

cb88 opened this issue Dec 7, 2015 · 1 comment

Comments

@cb88
Copy link

cb88 commented Dec 7, 2015

I have my own frontend just for Arduino Leonardo's and similar boards that use the Catarina bootloader that I currently use and this is the code I use to program them. I hope it is of use to you.

                mySerial.Close();
                Thread.Sleep(500);

                int OldBaud = mySerial.BaudRate;
                mySerial.BaudRate = 1200; // toggles the Leonardo into programming mode
                mySerial.Open();     
                Thread.Sleep(1000);
                mySerial.Close();
                Thread.Sleep(4000);
                int progPortNum;
                //Note that the port is whatever com port it was before + 1
                //So I grab the port number and add one to it here.
                int.TryParse(mySerial.PortName.Replace("COM", ""), out progPortNum);

                var app = new ConsoleAppLauncher.ConsoleApp(avrDudePath, String.Format(@"""-C{0}"" -v -patmega32u4 -cavr109 -P{1} -b57600 -D -Uflash:w:{2}:i", confPath, String.Format("COM{0}", progPortNum + 1), HexPath));
                app.ConsoleOutput += updateListBox;
@ZakKemble
Copy link
Owner

It looks like avrdude will soon have built-in support for this in 7.3 via the -r option avrdudes/avrdude#1507

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants