Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 8 Replies) Unable to compile for Leonardo in Arduino 1.0.1 (Read 24370 times)
Justblair
Newbies
*
Offline


Posts: 9
Location: Glasgow, Scotland
Joined: Sep 29th, 2011
Unable to compile for Leonardo in Arduino 1.0.1
May 26th, 2012 at 1:37pm
Print Post  
Just changed over from Arduino 1.0 to 1.0.1 

When I try and compile and upload, I get this error

Code
Select All
Compiling 'NewLeoTest' for 'Arduino Leonardo'
core.a(main.cpp.o)* : In function `main'
main.cpp : undefined reference to `USBDevice'
main.cpp : undefined reference to `USBDevice'
main.cpp : attach()'
avr-objcopy* : No such file
avr-objcopy* : No such file
Couldn't determine program size: C:\arduino-1.0.1\hardware\tools\avr\bin\avr-size: st.hex': No such file 



Before spending any time on this, do you happen to know if VisualMicro needs updating or is it a problem at my end?

Regards 

Blair
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to compile for Leonardo in Arduino 1.0.1
Reply #1 - May 26th, 2012 at 2:14pm
Print Post  
Hi,

No it's not a problem at your end. The plugin needs a slight tweak for the leo board same as provided by the Arduino 1.1 version. I thought they were holding off for the the arm changes which will give us multicore however they released the Leo stuff last week so I will do the same.

Hopefully you will see a release next week. In the meantime please use the "external" checkbox in arduino prefs.

The "external" checkbox forces arduino to check for sketch changes when you click compile which allows you to leave the sketch open in the arduino ide whilst making changes in visual studio

Thanks
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to compile for Leonardo in Arduino 1.0.1
Reply #2 - May 26th, 2012 at 3:14pm
Print Post  
oh! you are ahead of me. After looking atit in more detail there were more changes for the leonardo than i thought. I've added most of the changes but 1.0.1 does a lot of messing about with serial ports before and after upload. 

I need a leonardo to test with but they seem to be out of stock in the uk until 11th June.
  
Back to top
WWW  
IP Logged
 
Justblair
Newbies
*
Offline


Posts: 9
Location: Glasgow, Scotland
Joined: Sep 29th, 2011
Re: Unable to compile for Leonardo in Arduino 1.0.1
Reply #3 - May 26th, 2012 at 3:35pm
Print Post  
I am using a couple of devices that are "Leonardo"ish in nature.   

The Vinciduino is a really well made board and uses the same pin defs as the Leonardo AFAIK

http://www.electrofunltd.com/p/pedidos.html

I am also using the mattairtech board, but that is not designed as a Leo-clone, so things like the Led's are on different pins.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to compile for Leonardo in Arduino 1.0.1
Reply #4 - May 26th, 2012 at 7:53pm
Print Post  
Cool thanks, the compile is now working for the leonardo and have ordered a couple of clones to test the upload. it might be that I can put the upload code in as a config setting so you can try it out.

I think these changes also allow for teensy 2 but needs to be tested
« Last Edit: May 26th, 2012 at 7:55pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Justblair
Newbies
*
Offline


Posts: 9
Location: Glasgow, Scotland
Joined: Sep 29th, 2011
Re: Unable to compile for Leonardo in Arduino 1.0.1
Reply #5 - May 26th, 2012 at 9:06pm
Print Post  
Fast work there.  If there is anything that I can do to help out, then just say.   

Regards

Blair
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to compile for Leonardo in Arduino 1.0.1
Reply #6 - May 26th, 2012 at 9:39pm
Print Post  
Thanks. If I get time I'll try adding the upload changes. 

After looking at arduino codes changes, the problem with Leonardo type boards is that they drop the normal usb port and switch to a new port before upload. Then after upload window hangs if we don't wait for the Leonardo to reconnect on the original port.

Not to difficult, just a bit messy.

I stumbled on your keyboard project when searching google recently. nice!
  
Back to top
WWW  
IP Logged
 
Justblair
Newbies
*
Offline


Posts: 9
Location: Glasgow, Scotland
Joined: Sep 29th, 2011
Re: Unable to compile for Leonardo in Arduino 1.0.1
Reply #7 - May 26th, 2012 at 10:09pm
Print Post  
Thanks

I have been designing and making feet for the keyboard today.  I printed a set, but somewhere between work and home I managed to lose a set of 4mm ID bearings. 

Electronically speaking I have the system working well enough for starters.  But my code so far is based on the Arduino 1.0 setup.  Keyboard wise, 1.0.1 is much improved, with commands in place for doing most key combinations that I might need.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to compile for Leonardo in Arduino 1.0.1
Reply #8 - May 26th, 2012 at 11:51pm
Print Post  
Great, I'll keep an eye on it and feel free to create a topic somewhere with updates. It would make a great example for a debugger tutorial Smiley
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to compile for Leonardo in Arduino 1.0.1
Reply #9 - Jun 3rd, 2012 at 7:11pm
Print Post  
That's a great link for electrofunltd thanks. I love companies that don't try to screw me! Great price, free delivery good service!!

Serial upload to Leonardo/USB type boards is working now. 

Upgrade should be a few days. Thanks again. 

There are some articles on the main site should anyone be interested to know what changes are required for Leonardo plugins. I you want to try out the new vm and arduino doc search then use this page and type in Leonardo and you will see them:-

http://www.visualmicro.com/page/Arduino-Programming-Reference-Tutorials-Search.a...
  
Back to top
WWW  
IP Logged
 
Justblair
Newbies
*
Offline


Posts: 9
Location: Glasgow, Scotland
Joined: Sep 29th, 2011
Re: Unable to compile for Leonardo in Arduino 1.0.1
Reply #10 - Jun 4th, 2012 at 6:21am
Print Post  
The Leonardo is a great board. Did you spring for the black version?  

Looking forward to the update.  

On the keyboard front I completed the feet this weekend and have them pretty much working now.  Just need to put it all together! 

http://youtu.be/eZGuserIy8c
« Last Edit: Jun 4th, 2012 at 6:24am by Justblair »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to compile for Leonardo in Arduino 1.0.1
Reply #11 - Jun 4th, 2012 at 8:37am
Print Post  
didn't see the black option Smiley

good vid, got to be the cleverest keyboard on the planet
  
Back to top
WWW  
IP Logged
 
Jo Sto
Ex Member
*


Re: Unable to compile for Leonardo in Arduino 1.0.1
Reply #12 - Jun 21st, 2012 at 7:37am
Print Post  
What do you think, till when can we expect that Leonardo also runs?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to compile for Leonardo in Arduino 1.0.1
Reply #13 - Jun 21st, 2012 at 12:19pm
Print Post  
The 1.0.1 version should be out over the next week.

In the meantime you can click the "External Editor" checkbox in the Arduino IDE preferences. This allows you to edit in VS and compile upload in Arduino IDE. 

The sketch can be open at the same time in both IDE systems
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to compile for Leonardo in Arduino 1.0.1
Reply #14 - Jul 3rd, 2012 at 3:41pm
Print Post  
This is fixed in the 1.1206.30 beta in the downloads list of codeplex. Please let me know if you find any problems with the build. Are you on the beta testers list?
  
Back to top
WWW  
IP Logged
 
Justblair
Newbies
*
Offline


Posts: 9
Location: Glasgow, Scotland
Joined: Sep 29th, 2011
Re: Unable to compile for Leonardo in Arduino 1.0.1
Reply #15 - Jul 3rd, 2012 at 8:28pm
Print Post  
Hi 
I am not on the beta testers list as far as I know...

Thanks for sorting out the problem, I look forward to testing this.
  
Back to top
 
IP Logged
 
Jo Sto
Ex Member
*


Re: Unable to compile for Leonardo in Arduino 1.0.1
Reply #16 - Aug 4th, 2012 at 3:33pm
Print Post  
latest version compiles for leonardo, but only new projects. projects i tried to compile with older version, i have to change its folder and name, then it compiles
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to compile for Leonardo in Arduino 1.0.1
Reply #17 - Aug 4th, 2012 at 5:47pm
Print Post  
Hello thanks for the update, try using the Build>Clean Solution when older projects are open that are failing. 

This will remove the compiler cache for the project.

To remove the compiler cache for every project you can delete the cache folder. This is an example of what is might be called :-

C:\Users\[your name]\AppData\Local\VMicro
  
Back to top
WWW  
IP Logged
 
sixeyes2
Junior Member
**
Offline


Posts: 93
Location: Guildford, United Kingdom
Joined: Dec 19th, 2011
Re: Unable to compile for Leonardo in Arduino 1.0.1
Reply #18 - Aug 7th, 2012 at 10:27am
Print Post  
Perhaps the compiler cache should be linked to the version of the VM plugin. That way each upgrade to the VM plugin will force compilations.

Perhaps it should also be tied to the Arduino version detected?

Iain
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to compile for Leonardo in Arduino 1.0.1
Reply #19 - Aug 7th, 2012 at 1:26pm
Print Post  
yes, it is tied to the arduino version.

i have been trying to work out what was different so this can be handled better.

jo: did you upgrade your arduino between tests?

thanks

did you both get the beta debug instructions a few weeks ago?
« Last Edit: Aug 7th, 2012 at 1:57pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint