Visual Studio Ide for Arduino
https://www.visualmicro.com/forums/YaBB.pl
Visual Micro >> General Board >> Atmel, Avr Dragon ++
https://www.visualmicro.com/forums/YaBB.pl?num=1459804993

Message started by PStechPaul on Apr 4th, 2016 at 10:23pm

Title: Atmel, Avr Dragon ++
Post by PStechPaul on Apr 4th, 2016 at 10:23pm
I replied to a thread that seems to have disappeared. The link is http://www.visualmicro.com/forums/YaBB.pl?num=1459728921/1#1. What happened?  :-?

Title: Re: What happened to my thread?
Post by Visual Micro on Apr 4th, 2016 at 10:24pm
I found a few threads about the same thing and tried to consolidate them. Obviously not very well.

Will try to review tomorrow.

Title: Re: What happened to my thread?
Post by PStechPaul on Apr 5th, 2016 at 12:20am
According to the info in my profile I have 28 posts, but it only shows 7, and except for the most recent two, they are replies to other threads. None of my original posts seem to be available anymore. I wish I would have archived them, as there was a lot of information contained in them that would be valuable to me and perhaps others with similar problems.

Hopefully they can be restored or put into a useful consolidated form. Thanks.

Title: Re: What happened to my thread?
Post by Visual Micro on Apr 5th, 2016 at 12:28am
I'll look into it but all the information I have given you I looked up on google.

All the settings to add programmers and extend Arduino are taken from the arduino.cc published documentation.

I also got the lib usb driver conflict between atmel and arduino solution from google.

And currently on the downloads page you will see that atmel is not recommended because of all the confusion and problems it caused you  :)

So maybe the less discussion about expert non-arduino modes the better  :) :)

Title: Re: What happened to my thread?
Post by PStechPaul on Apr 5th, 2016 at 12:51am
Well, I would still like to have access to the content I provided and your responses. The information would be helpful to me, although perhaps confusing to others. Is there any way to send me the content of the posts for my own use? Thanks.

Title: Re: What happened to my thread?
Post by Visual Micro on Apr 5th, 2016 at 12:52am
Yes I will look into it over next day or so. There is supposed to be a single consolidated version

Title: Re: What happened to my thread?
Post by PStechPaul on Apr 11th, 2016 at 12:26am
Is there any way you can restore access to this content, or is it lost and gone forever? I've pretty much given up on using Visual Micro at this point. I'll just use Atmel Studio 7.0 to be able to use the Dragon to read the device, and the native Arduino environment for everything else, but it would be nice to use Visual Studio or Atmel Studio for development.

Thanks.

Title: Re: What happened to my thread?
Post by Visual Micro on Apr 14th, 2016 at 11:00pm
Hi,

Looking at the 5 posts you made about the dragon there were also lot of arduino ide install issues which I have ignored because you resolved them with a clean Arduino Ide install.

Post A - My project won't compile with Arduino 1.6x and 1.5x but will with 1.x + Want to use


Quote:
It might be because I had not "properly" installed 1.6.8 using the installer. It said that 1.0.6 was already installed. Yes, reinstalling using the installer fixed that problem, but now I get this error using the Dragon:

[code]avrdude: usbdev_open(): did not find any USB device "usb"[/code]

Getting closer to working! Thanks  8-)


It's a good idea to uninstall/remove the arduino ide folder before installing a major new version because it can confuse things by leaving old format files behind)

Post B - Using Dragon with Atmel Studio 6.2

Some more discussion about build errors which resolved in another of your threads

You also then asked about the atmel simulator? I explained that you need to use "File>Open object file for debugging" after building with Visual Micro

Post C - Software debug only using simulator?

I explained that you need to use "File>Open object file for debugging"

Post D - avrdude & Dragon in cmd line, Arduino IDE, and Atmel or Visual Studio

Your report a usb driver error when attempting to upload to the dragon.

I explained the following:-


Quote:
Often there is confusion between the usb drivers that atmel studio installs and the ones that avrdude uses.

What is the usb driver that device manager shows as being used by the dragon?

If the driver shows as Jungo then it is probably the problem.

This is another reason why I don't recommend installing atmel studio :) I have no idea why atmel would let this confusion happen to their arduino base.

If I am right then this page might help http://www.visualmicro.com/post/2014/01/17/AvrIsp-MkII-Usb-Driver-for-Arduino.aspx


Please remember these are standard tools so the Arduino and other forums will also help. I found this similar article with similar solution http://www.avrfreaks.net/forum/avr-dragon-avrdude-need-correct-port

I found your reply confusing and thought it would confuse forum users however you seemed to be able to program and upload your Arduino so I moved into to other priorities.

Your reply seemed to confuse some facts and indicated that you believed you could only use FTDI/Serial upload from the Arduino Ide. This just meant that you need to untick "Always use programmer for upload" in Visual Micro which you had previously ticked in your efforts to use the dragon programmer.

[quote]That is good information, and probably can be used to get things working properly. But it is rather confusing and tedious, so I think for now I will just accept the limitations and proceed with what I really need to do. That is to build an Arduino sketch that can be edited with the Arduino IDE and uploaded to the board using the normal means with the FTDI device. This is so that people with the existing EV charger can replace the buggy sketch they are now using, with a better user interface, and eventually also replace the ugly PCBs now being used with a much improved design that I am working on.

For more information on this project, you can visit the forum where I discuss my involvement with the charger, which is a DIY 10-12 kW battery pack charger for EVs. It has gone through many revisions, with lots of poorly documented "fixes" and "patches" to the hardware and software, and is poorly supported by the developer:

http://www.diyelectriccar.com/forums/showthread.php/10kw-60a-diy-charger-open-so...

Another thread is here, which documents my efforts to provide an upgrade for these chargers:

http://www.diyelectriccar.com/forums/showthread.php/analyzing-troubleshooting-fi...

My ultimate preference would be to use a Microchip PIC instead of an AVR device or Arduino board. I have been using Microchip devices for perhaps 15 years and I am more comfortable with their architecture and software framework, and their debugger/programming tools. I like their software simulator which is very powerful and effective. Atmel also has a similar simulator that I would like to be able to use, but so far I've only been able to do so for simple C projects for the Arduino or ATMega328P.

I think it would be helpful if you could add some of the contents of this forum to the FAQs and maybe even put together an installation script that performs most of the tasks described here and elsewhere. Most people might find these instructions too confusing or dangerous to attempt.


Post E - AVR Dragon with Microsoft Visual Studio and Arduino Pro Mini

Started with a report that you wanted to upload using a Dragon programmer so you used the "AVR ISP" option and it failed with an error looking for a port.

I explained that you could use FTDI/Serial by unticking "Always use programmer for upload"

You explained you wanted to use an AVR Dragon

I then gave you some tips of how to extend the Arduino Ide hardware definitions

After some messages you posted these links:-

http://stackoverflow.com/questions/24688215/programming-arduinos-from-a-centralized-location
http://forum.arduino.cc/index.php?topic=329572.0
https://github.com/arduino/Arduino/issues/2075
https://gist.github.com/tsohr/639182ba4b182a0a1c6d
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification
http://arduino.stackexchange.com/questions/17411/where-do-avrdude-parameters-get-defined-in-the-arduino-library-ide
http://comments.gmane.org/gmane.comp.hardware.arduino.devel/1683
http://www.visualmicro.com/forums/YaBB.pl?num=1410869581

Thinks that it!

Thanks :)

Title: Re: What happened to my thread?
Post by PStechPaul on Apr 15th, 2016 at 1:27am
Thanks for putting that together. I have moved on to other things and I will probably just use the Arduino environment for continued work on this project, since that is what those who have the EMW charger will use. I don't see any real advantage to using VS or AS at this point, except for downloading code from the device for archive purposes.

I am still confused about the debugger using the object file. I would like to be able to set breakpoints in the source file and run the code in the simulator, and then view and/or change variables in RAM and I/O ports. I can do this for a C or C++ project in Atmel Studio, but not AFAICT with an Arduino project.

I am much more experienced with the Microchip PIC devices and I am familiar with their IDE which allows software simulator debugging as well as a more limited hardware debugging using the ISP interface.  8-)

Title: Re: What happened to my thread?
Post by Visual Micro on Apr 15th, 2016 at 1:39am
Yes if you don't need intellisense, drill down from errors, goto definition, edit/view core/library sources, refactoring , serial debugger etc. then there is little difference between Visual Micro and the Arduino Ide so you might as well use Arduino.

Did you try building (build only) with Visual Micro and then click "File>Open Object File For Debugging"?

Title: Re: Atmel, Avr Dragon ++
Post by PStechPaul on Apr 15th, 2016 at 7:19am
I found a short video by Atmel that explains how to use AS7 to import, build, and debug an Arduino project. I think I was doing something wrong, so now I tried it with a simple sketch and I was able to use the simulator to debug.

https://www.youtube.com/watch?v=7WnOe00dVu0

One thing to remember when using the simulator is that it runs much slower than real time, so a 2000 mSec (2 sec) delay may take several minutes.

The Dragon does not support debugging, but it works as an ISP programmer.

I added the avrdude as an external tool for AS7, using the following:

Command: C:\Users\paul_000\Downloads\avrdude-6.1-mingw32\avrdude.exe

Arguments:  -v -v -v -v -c avrispmkII -p atmega328p -P COM11

Initial Directory: $(ProjectDir)

It seemed to be communicating for quite some time, but I'm not sure exactly what it was doing. Here is some of the dialog:


Code (]avrdude.exe: Version 6.1, compiled on Mar 13 2014 at 00:09:49
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2014 Joerg Wunsch

             System wide configuration file is "C:\Users\paul_000\Downloads\avrdude-6.1-mingw32\avrdude.conf"

             Using Port                    : COM11
             Using Programmer              : avrispmkII
avrdude.exe: Send: . [1b):

. [01] . [00] . [01] . [0e] . [01] . [14]
avrdude.exe: Recv: . [00]
avrdude.exe: Recv: . [00]
avrdude.exe: Recv: . [00]
avrdude.exe: Recv: . [00]
avrdude.exe: Recv: . [00]
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude.exe: Recv: . [00]
avrdude.exe: Recv: . [00]
avrdude.exe: Recv: . [00]
avrdude.exe: Recv: . [00]
avrdude.exe: Recv: . [00]
avrdude.exe: Recv: . [00]
avrdude.exe: Recv: . [00]
avrdude.exe: Recv: . [00]
avrdude.exe: Recv: . [00]
avrdude.exe: Recv: . [00]
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude.exe: Recv: . [00]

... Snipped similar lines

avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: stk500v2_getsync(): timeout communicating with programmer
             AVR Part                      : ATmega328P
             Chip Erase delay              : 9000 us
             PAGEL                         : PD7
             BS2                           : PC2
             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  3600  3600 0xff 0xff
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

             Programmer Type : STK500V2
             Description     : Atmel AVR ISP mkII
             Programmer Model: Unknown
avrdude.exe: Send: . [1b] . [01] . [00] . [02] . [0e] . [03] . [90] . [85]
avrdude.exe: Recv: . [00]

... snipped more lines

avrdude.exe: Recv: . [00]
avrdude.exe: ser_recv(): programmer is not responding
avrdude.exe: stk500v2_ReceiveMessage(): timeout
avrdude.exe: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]


Program execution was stopped.

... at that point I manually stopped it using the menu item: avrdude(stop)


It seemed to be communicating and the LED on the FTDI interface was blinking sometimes. It looks like this might eventually be able to work, but it might be easier to just use the Arduino IDE if I don't have access to the ISP pins and the Dragon.

Feel free to move this to another category. I think it has some valuable information, but probably more specific to the Atmel Studio sub-forum.

Thanks.

Title: Re: Atmel, Avr Dragon ++
Post by Visual Micro on Apr 27th, 2016 at 5:43pm
There is an article here about how to configure the dragon for the Arduino Ide. Visual Micro will use the same config

http://fab.cba.mit.edu/classes/863.12/people/charles.fracchia/wk6.html

Visual Studio Ide for Arduino » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2019. All Rights Reserved.