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 18819 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 #20 - Feb 5th, 2020 at 3:56pm
Print Post  
this is the page that I got the boards file change from   https://forum.arduino.cc/index.php?topic=622372.0
  
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 #21 - Feb 5th, 2020 at 4:33pm
Print Post  
thanks for the help so far!

I now have serial debugging working with vmicro.

if i set debugging to hardware, I still get backend not running.

i bought the arduino m0 to allow me to step thru programs for debugging.

will i be ok on the older boards file?

is this something you would help with, if not where should i go for help?
  
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 #22 - Feb 5th, 2020 at 10:25pm
Print Post  
To be honest it is easier to help users in Visual Studio than atmel studio. To use atmel studio we simply hand off to atmel and users are expected to know how its tools work and how to test connection etc. There are also more options in atmel studio therefore unless users explain exactly what they have set we end up guessing.

In Visual Studio it's more within the vMicro menus and we get better errors back from problems launching hardware debug.
  
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 #23 - Feb 6th, 2020 at 3:30am
Print Post  
just to be sure, vmicro does not do hardware debugging, with stepping etc, correct.
  
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 #24 - Feb 6th, 2020 at 1:57pm
Print Post  
That's not right. From mid last year we released hardware debugging in Visual Studio. You can use either the software/serial debug or the hardware/gdb debug.

You can also run both atmel studio and visual studio on the same machine and try it out.
  
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 #25 - Feb 6th, 2020 at 3:32pm
Print Post  
when I change to hardware debugging, my sketch does not run and i get backend not running.

is there a step by step tutorial for vmicro in atmel studio?
  
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 #26 - Feb 6th, 2020 at 8:38pm
Print Post  
When you switch on use atmel debugging we simply hand over to atmel studio.

I asked you some questions previously but you did not answer them. Here they re again.


Is vMicro>Debugger>Atmel Studio Debugger enabled?
What happens when you click "Debug>Attach to Target"?
What board is shown in the atmel studio project properties? (right click proj name)



  
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 #27 - Feb 7th, 2020 at 1:04am
Print Post  
It was not before when i got serial debugging going, It was on automatic.
I enabled Atmel Studio debugger now.
I created a new sketch using file/ new /arduino project.  the board was already set to /arduino m0.
for some reason, it wants to assign the ATSAMD18EA to that board.
The board has a 21GA on it so I changed the device to that in the properties.
it does not show a board, device is now  ATSAMD21GA since I changed it.
debug attach to target yields backend not running (no tools)
on the tool tab of project properties, only custom programmer is available
  
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 #28 - Feb 7th, 2020 at 1:09am
Print Post  
I noticed that there was no tool library path in the tools/options/device & tool libraries/toollibrary path.
i set it to C:\Program Files (x86)\Atmel\Studio\7.0\tools and did debug/attach to target.
it no longer gives backend not running (no tools)
here is the output

------ Build started: Project: moTest6, Configuration: Debug ARM ------
Build started.
Project "moTest6.cppproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Studio\7.0\Vs\Compiler.targets" from project "C:\Users\chris\OneDrive\Documents\Arduino\moTest6\moTest6.cppproj" (target "Build" depends on it):
     Using "RunCompilerTask" task from assembly "C:\Program Files (x86)\Atmel\Studio\7.0\Extensions\Application\AvrGCC.dll".
     Task "RunCompilerTask"
           Shell Utils Path C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils
           C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils\make.exe all --jobs 8 --output-sync 
cannot open linker script file samd21e18a_flash.ld: No such file or directorycollect2.exe(0,0): error: ld returned 1 exit status
           make: *** [moTest6.elf] Error 1
           Building target: moTest6.elf
           Invoking: ARM/GNU Linker : 6.3.1
           "C:\Program Files " -o moTest6.elf     -mthumb -Wl,-Map="moTest6.map" -Wl,--start-group -lm  -Wl,--end-group -L"../cmsis/linkerScripts"  -Wl,--gc-sections -mcpu=cortex-m0plus -Tsamd21e18a_flash.ld   
C:\Users\chris\OneDrive\Documents\Arduino\moTest6\Debug\Makefile(95,1): error: recipe for target 'moTest6.elf' failed
           The command exited with code 2.
     Done executing task "RunCompilerTask" -- FAILED.
Done building target "CoreBuild" in project "moTest6.cppproj" -- FAILED.
Done building project "moTest6.cppproj" -- FAILED.

Build FAILED.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
  
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 #29 - Feb 7th, 2020 at 1:12am
Print Post  
it is saying
cannot open linker script file samd21e18a_flash.ld: No such file or directorycol
when the device is set to samd21g18A
  
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 #30 - Feb 7th, 2020 at 12:06pm
Print Post  
Thanks, you do not want atmel to try to build so please open build>configuration manager and uncheck your project from build. We only want the debug side of atmel studio.

You also should not be using the atmel device programming, just normal edbg or serial. What we want is same as arduino ide for upload but with as7 for debug.
« Last Edit: Feb 7th, 2020 at 3:12pm 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 #31 - Feb 7th, 2020 at 2:45pm
Print Post  
the script file exists at
C:\Program Files (x86)\Atmel\Studio\7.0\packs\atmel\SAMD21_DFP\1.3.331\samd21a\gcc\gcc
and can be opened in a text editor
  
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 #32 - Feb 7th, 2020 at 3:13pm
Print Post  
You do not want atmel to build, so please open build>configuration manager and uncheck your project from build. We only want the debug side of atmel studio.

You also should not be using the atmel device programming, just normal edbg or serial. What we want is same as arduino ide for upload but with as7 for debug.
« Last Edit: Feb 7th, 2020 at 3:14pm 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 #33 - Feb 7th, 2020 at 5:15pm
Print Post  
uploads ok and runs, but no tracing window comes up despite breakpoint with {millis()} in actions
  
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 #34 - Feb 7th, 2020 at 5:21pm
Print Post  
i have vmicro/debugger/atmel studio degugger checked.
using debug/start debugging and break yields backen not running, no tools
  
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 #35 - Feb 7th, 2020 at 6:44pm
Print Post  
If you right click your project and inspect the atmel studio properties what device is set? 
What device name shows on the tool bar if you see one (I don't mean the visual micro tool bar, atmel has its own tool bar that shows which device it thinks is selected.


  
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 #36 - Feb 7th, 2020 at 9:00pm
Print Post  
ATSAMD21G18A  same on toolbar
« Last Edit: Feb 7th, 2020 at 9:01pm by Chris Molloy »  
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 #37 - Feb 7th, 2020 at 9:10pm
Print Post  
ATSAMD21G18A  same on toolbar
  
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 #38 - Feb 7th, 2020 at 9:14pm
Print Post  
here is the properties window and the toolbar
  

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 #39 - Feb 8th, 2020 at 1:24pm
Print Post  
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.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1 [2] 3 
Send TopicPrint