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 Send TopicPrint
Normal Topic How to compile and upload? (Read 6062 times)
ChrisF
Newbies
*
Offline


Posts: 3
Joined: Feb 1st, 2014
How to compile and upload?
Feb 1st, 2014 at 8:50pm
Print Post  
Hello, 
I am unable to upload to Arduino Micro board from AS61.  
I have no problems uploading using the Arduino IDE.
I have AS61, ATE and Visual Micro for Arduino.  
When I run the external tool for named Deploy (AVRDude) I get the following:
Deploy script
The system cannot find the path specified.

I think this means I have to go into Deploy.bat and LocalDeploy.bat and edit any path issues I can find for files referenced in those batch files ?

When I run the External Tool that I set up following the ENGBlaze tutorial for AS6 and the asensar.com tutorial on setting up AVRDude for Arduino, I get this output:
avrdude.exe: Version 5.11, compiled on Sep  2 2011 at 19:38:36
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2009 Joerg Wunsch

             System wide configuration file is "C:\program files (x86)\arduino1.0.5\hardware/tools/avr/etc/avrdude.conf"

             Using Port                    : \\.\COM6
             Using Programmer              : avr109
             Overriding Baud Rate          : 57600
             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    10     8    0 no       1024    8      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 : butterfly
             Description     : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .
avrdude.exe: ser_send(): write error: sorry no info avail

Thanks,
Chris
« Last Edit: Feb 1st, 2014 at 11:58pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to compile and upload?
Reply #1 - Feb 2nd, 2014 at 12:21am
Print Post  
Hi Chris,

I think there is a bit of confusion here. ATE is a different product to Visual Micro. 

Visual Micro is a plugin and all that is required to setup is setting the location of the Arduino Ide in the Visual Micro ide locations dialog accessed via the tool bar apps list><Configuration Manager> or via tools>options>visual micro>application locations. You should also have been prompted when Visual Micro the first time Visual Micro was run in the Atmel Ide.

You can also optionally set a sketchbook folder but the default is whatever sketchbook folder is specified for the Arduino Ide.

After setting the location of the Arduino Ide you can cause Visual Micro to create an Atmel project simply by trying to open an existing sketch. You can do this a variety of ways but until you get to know the tool just use File>Open>Sketch project or File>New>Sketch project.

When you have a sketch open all of the standard Atmel build and debug/start options will compile and/or upload based upon the Arduino board and serial port you have selected from the tool bars that Visual Micro creates.

Visual Micro automatically finds the libraries and tools and is aware of the different versions of Arduino libraries based upon the current selected Arduino Ide (select from the tool bar). Visual Micro also uses the configuration files of the selected Arduino Ide so the boards list, programmers, libs, platforms etc. will be identical to those provided by the Arduino Ide. The option lists will also include any custom Arduino libraries and hardware defined for the Arduino Ide using the standard rules published on Arduino.cc. Changes and additions of new libraries and boards are automatically detected when you start Atmel Studio or when you click "Tools>Visual Micro>Reload Tool chains".

If you want to upload using a programmer instead of usb then tick "Tools>Visual Micro>Upload using programmer" and make sure you have selected a programmer from the programmers menu immediately above.

Visual Micro uses standard Atmel Studio projects for either avr or sam and simply detects when the project contains Arduino files and then overrides the standard Atmel Studio intellisense, build and upload processes. 

Aside from hardware and library compatibility (especially for the new formats of arduino 1.5.x) another benefit of overriding the build process to match how the Arduino Ide works is that it allows us to compile an Arduino sketch that contains multiple .ino sources whilst also providing us with double click drill down into compiler errors (nb: the Arduino Ide doesn't do that bit).

So we don't use .bat files, we don't use the external tools. We use the instructions defined within the Arduino Ide configuration files to compile and upload. In the case of avr chips the upload will use avrdude but the only way you would know that is if you switch on tools>options>visual micro>compiler>verbose.

Because you have used a different mechanism to create an Atmel Studio project for Arduino in the past it might be that Visual Micro doesn't recognize the project as avr or sam. We have not tested this combination. If you have problems I would suggest removing the .ccpproj from the sketch folder and any other sub folders. So you have a clean sketch, then open the sketch with Visual Micro and let it create a new project. 

Here are a few articles from the visual micro wiki, the instructions are the same for both atmel studio and visual studio

http://www.visualmicro.com/post/2011/10/04/How-to-test-a-new-installation-of-Ard...
http://www.visualmicro.com/page/How-to-compile-and-upload-to-an-Arduino-using-Vi...
http://www.visualmicro.com/post/2011/10/27/How-to-add-an-Arduino-library-using-V...
« Last Edit: Feb 2nd, 2014 at 4:19am by Tim@Visual Micro »  
Back to top
IP Logged
 
ChrisF
Newbies
*
Offline


Posts: 3
Joined: Feb 1st, 2014
Re: How to compile and upload?
Reply #2 - Feb 2nd, 2014 at 3:55am
Print Post  
In AS61, I opened a file from the Aruduino Sketch folder (blink.ino) and I turned on the Debug in the properties window, F5 and everything works fine.
I can upload with our with out debug.  I see I was pretty confused about the functionality of the IDE and Visual Micro interface.
Thank you for the detailed explanation and links for guidance.
Chris Fisher
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to compile and upload?
Reply #3 - Feb 2nd, 2014 at 4:17am
Print Post  
Great, thanks for letting me know.

Better documentation is the next job on the list!  Smiley
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint