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 [3]  Send TopicPrint
Very Hot Topic (More than 25 Replies) Linker error on first build for visual micro (Read 18815 times)
Chris Molloy
Junior Member
**
Offline


Posts: 54
Location: Ontario, Canada
Joined: Dec 13th, 2012
Re: Linker error on first build for visual micro
Reply #40 - Feb 9th, 2020 at 5:55pm
Print Post  
Tim@Visual Micro wrote on Feb 8th, 2020 at 1:24pm:
Please se the visual micro debugger to Off or Serial. The "Hardware" option is relatively new, applies only to VS and needs to be hidden from As7. The only option in AS7 is to override the visual micro serial debugger and "use atmel studio debugging".

That might be causing some confusion.


i have it running. breakpoints are working, but i dont see how to step/step into. using the buttons in atmel toolbar results in nothing.  also curious why millis() keeps advancing when the program is halted?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linker error on first build for visual micro
Reply #41 - Feb 9th, 2020 at 8:45pm
Print Post  
Make sure you are on an upto date version of atmel studio "help>check for updates".

Please show a screen shot of the debug working so we can be sure you are using the atmel debugger and not the visual micro debugger.

If it does not have optimization disabled for the code you are trying to debug it can cause step/break to fail. But becareful with the optimization it can break the build if too much. 

There are ways to disable optimization for chunks of code without disabling it for all related code but it means adding # directives to the code which is messier.

Let's first try debugging only in the .ino file with "no project" optimization. Can you inspect variables and step over simple lines of code, for example adding and subtracting 1 from a variable.

millis() it handled differently by every core. How the debug works is down to atmel and your hardware.



« Last Edit: Feb 9th, 2020 at 8:49pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Chris Molloy
Junior Member
**
Offline


Posts: 54
Location: Ontario, Canada
Joined: Dec 13th, 2012
Re: Linker error on first build for visual micro
Reply #42 - Feb 9th, 2020 at 10:09pm
Print Post  
i was running the vmicro debugger.  I switched to the atmel debugger and no project optimization and the screen attached is what I get.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Chris Molloy
Junior Member
**
Offline


Posts: 54
Location: Ontario, Canada
Joined: Dec 13th, 2012
Re: Linker error on first build for visual micro
Reply #43 - Feb 9th, 2020 at 10:21pm
Print Post  
i started by clicking the "start debugging and break button beside release/debug selector resulting in the screen I sent
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linker error on first build for visual micro
Reply #44 - Feb 10th, 2020 at 1:15am
Print Post  
Those are atmel errors so you might get more info by changing the output window from "Micro build" to "Build". The output windows with name that starts "Micro" are visual micro output windows. Atmel has its own.

Try these things in any order.

1) Run a repair on atmel studio via control panel add or remove programs.

2) Create an atmel studio application project and select your board. Click start > debugging to see if it can upload and start the debugger for a standard gcc application.

3) Look at the standard atmel studio project property pages for your project to see which debugger/programmer is selected.

4) Look at tools device programming to see if your device is detected and what config the ide has.

5) Post the verbose micro output when you try to lunch and it fails just so we can see that visual micro isn't doing anything.
  
Back to top
IP Logged
 
Chris Molloy
Junior Member
**
Offline


Posts: 54
Location: Ontario, Canada
Joined: Dec 13th, 2012
Re: Linker error on first build for visual micro
Reply #45 - Feb 13th, 2020 at 6:33pm
Print Post  
1) Run a repair on atmel studio via control panel add or remove programs. THIS IS MY 3RD FULL INSTALL AND I HAVE REPAIRED TWICE.

2) Create an atmel studio application project and select your board. Click start > debugging to see if it can upload and start the debugger for a standard gcc application.  BACKEND NOT RUNNING, NO TOOLS

3) Look at the standard atmel studio project property pages for your project to see which debugger/programmer is selected.  NO PROGRAMMER AVAILABLE, ONLY CUSTOM PROGRAMMER

4) Look at tools device programming to see if your device is detected and what config the ide has.
THERE ARE NO AVAILABLE TOOLS.

5) Post the verbose micro output when you try to lunch and it fails just so we can see that visual micro isn't doing anything.  SEE ATTACHED
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linker error on first build for visual micro
Reply #46 - Feb 13th, 2020 at 6:43pm
Print Post  
There is an update for as7 that allows you to set the micro-controller that the atmel project believes it is using. There isn't a direct connection between the arduino definitions and atmel device names so visual micro has to guess. For SAMD boards Visual Micro is bias to the original Arduino Zero. 

Another AS7 user was using an Adafruit M0 that has a slightly different MCU name. There is a new option on the vMicro>General menu that allows you to switch off Visual Micro attempt to automatically set the Atmel Studio Device. Then you can alter the mcu name to be correct.

Your arduino builds shows the mcu/device name should be SAMD21G18A when your ide is set to SAMD21E18A.

https://www.visualmicro.com/forums/YaBB.pl?num=1580914071

  
Back to top
IP Logged
 
Chris Molloy
Junior Member
**
Offline


Posts: 54
Location: Ontario, Canada
Joined: Dec 13th, 2012
Re: Linker error on first build for visual micro
Reply #47 - Feb 13th, 2020 at 7:12pm
Print Post  
I am running vmicro 1911.23.0
the tools extensions does not show any updates available.

autoselect board/port has been off all along.

when I create a new arduino project using vmicro, It always selects the E version. I change it using the project properties/device to the G18A, which is the device installed on my board.

i closed a solution that I had set up for arduino nano.  created new vmicro new arduino project .  I changed board to pro programming port.  went to change the device, and no samd devices are available.

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


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linker error on first build for visual micro
Reply #48 - Feb 13th, 2020 at 7:16pm
Print Post  
As I said you should try the version published earlier today to the link I posted in my previous comment.

If that doesn't help then you are really looking at an AS7 issue and I suggested previously testing with a simple atmel gcc project to prove the tools are working.

These issues are why we recommend VS over atmel studio. Unless you already know atmel it is a learning curve for arduino users. In atmel studio we have better control over the hardware debugger than in AS7.

It might be worth re-checking the guide for AS7 here

https://www.visualmicro.com/page/Arduino-for-Atmel-Studio-7.aspx
  
Back to top
IP Logged
 
Chris Molloy
Junior Member
**
Offline


Posts: 54
Location: Ontario, Canada
Joined: Dec 13th, 2012
Re: Linker error on first build for visual micro
Reply #49 - Feb 13th, 2020 at 7:30pm
Print Post  
in general out put, get the following
14:24:41: [WARNING] TCF command: Tool:getAttachedTools receiving failed, channel is closed
14:24:41: [ERROR] Command [C 0 Tool getAttachedTools ""] aborted, ModuleName: TCF (Command [C 0 Tool getAttachedTools ""] aborted)
14:24:41: [ERROR] Command [C 0 Tool getAttachedTools ""] aborted, ModuleName: TCF (Command [C 0 Tool getAttachedTools ""] aborted)
14:25:00: [WARNING] TCF command: Tool:getAttachedTools receiving failed, channel is closed
14:25:00: [ERROR] Command [C 1 Tool getAttachedTools ""] aborted, ModuleName: TCF (Command [C 1 Tool getAttachedTools ""] aborted)
14:25:00: [ERROR] Command [C 1 Tool getAttachedTools ""] aborted, ModuleName: TCF (Command [C 1 Tool getAttachedTools ""] aborted)
14:25:03: [WARNING] TCF command: Tool:getAttachedTools receiving failed, channel is closed
14:25:03: [ERROR] Command [C 2 Tool getAttachedTools ""] aborted, ModuleName: TCF (Command [C 2 Tool getAttachedTools ""] aborted)
14:25:03: [ERROR] Command [C 2 Tool getAttachedTools ""] aborted, ModuleName: TCF (Command [C 2 Tool getAttachedTools ""] aborted)
14:25:15: [WARNING] Error updating project settings:Object reference not set to an instance of an object.
14:26:11: [ERROR] 
14:29:10: [ERROR]
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linker error on first build for visual micro
Reply #50 - Feb 13th, 2020 at 7:37pm
Print Post  
Thanks, those are all atmel errors not caused by Visual Micro.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linker error on first build for visual micro
Reply #51 - Feb 13th, 2020 at 7:42pm
Print Post  
ps: I don't think that you haven't said what atmel studio tool(s) you have set in the project properties. If you click click the project name > properties that is a very important area because you are allowing atmel to take control. That is where you would set the programmer/debugger you want to use. That is what atmel is trying to load for debug.
« Last Edit: Feb 13th, 2020 at 7:42pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Chris Molloy
Junior Member
**
Offline


Posts: 54
Location: Ontario, Canada
Joined: Dec 13th, 2012
Re: Linker error on first build for visual micro
Reply #52 - Feb 13th, 2020 at 7:42pm
Print Post  
I switched to atmel studio because it seemed like a simpler environment for an arduino type guy.

Would you suggest I try visual studio, which I have previously used instead of atmel?

  
Back to top
 
IP Logged
 
Chris Molloy
Junior Member
**
Offline


Posts: 54
Location: Ontario, Canada
Joined: Dec 13th, 2012
Re: Linker error on first build for visual micro
Reply #53 - Feb 13th, 2020 at 7:48pm
Print Post  
in general out put, get the following
14:24:41: [WARNING] TCF command: Tool:getAttachedTools receiving failed, channel is closed
14:24:41: [ERROR] Command [C 0 Tool getAttachedTools ""] aborted, ModuleName: TCF (Command [C 0 Tool getAttachedTools ""] aborted)
14:24:41: [ERROR] Command [C 0 Tool getAttachedTools ""] aborted, ModuleName: TCF (Command [C 0 Tool getAttachedTools ""] aborted)
14:25:00: [WARNING] TCF command: Tool:getAttachedTools receiving failed, channel is closed
14:25:00: [ERROR] Command [C 1 Tool getAttachedTools ""] aborted, ModuleName: TCF (Command [C 1 Tool getAttachedTools ""] aborted)
14:25:00: [ERROR] Command [C 1 Tool getAttachedTools ""] aborted, ModuleName: TCF (Command [C 1 Tool getAttachedTools ""] aborted)
14:25:03: [WARNING] TCF command: Tool:getAttachedTools receiving failed, channel is closed
14:25:03: [ERROR] Command [C 2 Tool getAttachedTools ""] aborted, ModuleName: TCF (Command [C 2 Tool getAttachedTools ""] aborted)
14:25:03: [ERROR] Command [C 2 Tool getAttachedTools ""] aborted, ModuleName: TCF (Command [C 2 Tool getAttachedTools ""] aborted)
14:25:15: [WARNING] Error updating project settings:Object reference not set to an instance of an object.
14:26:11: [ERROR] 
14:29:10: [ERROR]
  
Back to top
 
IP Logged
 
Chris Molloy
Junior Member
**
Offline


Posts: 54
Location: Ontario, Canada
Joined: Dec 13th, 2012
Re: Linker error on first build for visual micro
Reply #54 - Feb 13th, 2020 at 7:49pm
Print Post  
I have no toolls available.  see attached.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linker error on first build for visual micro
Reply #55 - Feb 13th, 2020 at 7:50pm
Print Post  
I think it's an easy thing to think that Atmel is more in tune with micro-controllers and for advanced users who are familiar with the underlying micro controllers it can be. However it is much more complicated for the same reason.

The intellisense can be more robust in atmel studio but other than that Visual Studio is certainly the easiest. It is also easier to support because, for example, if there is hardware debugger problem we have control over the tools to fix it and we can better report the entire build/debug process in our own verbose output.

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


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linker error on first build for visual micro
Reply #56 - Feb 13th, 2020 at 7:52pm
Print Post  
In your last post atmel studio can not see your board.  EDBG should be in the list, it might be related to my previous note about the wrong process/mcu being assigned to the atmel project.

It is also evident that the last upload you made was with serial debug enabled and NOT using the vmicro>debugger>use atmel studio debugging.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1 2 [3] 
Send TopicPrint