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 ld.exe error (Read 7647 times)
Stephen
Newbies
*
Offline


Posts: 4
Joined: Jul 3rd, 2015
ld.exe error
Jul 3rd, 2015 at 3:40pm
Print Post  
I have a new install of Atmel Studio(I have never used it before) and was trying to compile/build the very basic arduino sketch 'Blink'. As you can see from the Output message below. Its not creating the elf file. I'd guess because the slashs have changed direction in the filepath. Does anyone know how to fix this problem Please forgive if it is a school boy error, like I said I have never used Atmel studio before and I'm not a SW programmer guy either

Compiling 'myBlink' for 'Arduino Uno'
Build folder: file:///C:/Users/sdacombe/AppData/Local/V.Micro/Arduino/Builds/myBlink/uno
Summary: Header=1 Prototypes=3 Imports=0
Additional Defines: 
Architecture Tools: E:\Arduino\arduino-nightly\hardware\tools\avr/bin/
Sketchbook: file:///C:/Users/sdacombe/Documents/Arduino
Core Include Paths
Include Path 'E:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino'
Include Path 'E:\Arduino\arduino-nightly\hardware\arduino\avr\variants\standard'
"E:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=160 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I"E:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino" -I"E:\Arduino\arduino-nightly\hardware\arduino\avr\variants\standard"  -o o"
Build Core Paths: E:\Arduino\arduino-nightly\hardware\arduino\avr\cores\arduino
"E:\Arduino\arduino-nightly\hardware\tools\avr/bin/avr-gcc" -w -Os -Wl,--gc-sections -mmcu=atmega328p -o nk.elf" o" "C:\Users\sdacombe\AppData\Local\V.Micro\Arduino\Builds\myBlink\uno/core.a" "-LC:\Users\sdacombe\AppData\Local\V.Micro\Arduino\Builds\myBlink\uno" -lm
ld.exe:cannot open output file k.elf: No such file or directory
collect2.exe*:error: ld returned 1 exit status
Error creating .elf
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ld.exe error
Reply #1 - Jul 3rd, 2015 at 4:39pm
Print Post  
Hi,

It can only be couple of two things.

First thing is don't use the nightly build use the normal release version. Normally nightly might be okay but its for experienced people and not supported.

  
Back to top
WWW  
IP Logged
 
Stephen
Newbies
*
Offline


Posts: 4
Joined: Jul 3rd, 2015
Re: ld.exe error
Reply #2 - Jul 3rd, 2015 at 5:10pm
Print Post  
Hah that was a bit of a schoolboy error, but thanks for your advice). I changed the default build of Arduino and it got over this problem. However, I now have another probelm, see below. If its obvious what this problem is then by all means let me know, but for know I will try and decipher this for a while and maybe create seperate thread if I can't figure it out:

Uploading via Bootloader 
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude "-CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -patmega32u4 -cavr109 -PCOM3 -b57600 -D k.hex:i"
avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
         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)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM3
         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    20     4    0 no       1024    4      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: butterfly_recv(): programmer is not responding
  
Back to top
 
IP Logged
 
Stephen
Newbies
*
Offline


Posts: 4
Joined: Jul 3rd, 2015
Re: ld.exe error
Reply #3 - Jul 3rd, 2015 at 5:15pm
Print Post  
Restarting Atmel Studio fixed this problem. So I'm all good ... it's all working ok. Many Thanks for your help!!!!! Smiley
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ld.exe error
Reply #4 - Jul 3rd, 2015 at 5:53pm
Print Post  
Good to hear that. 

Actually I think you had the Leonardo or non-Uno board selected so the upload failed.

Your upload was showing ATmega32U4 as the cpu which is Leonardo/Yun type boaards

Below you can see the ATmega328P which is the cpu on the Uno

Using Port                    : COM4
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7

I'll check that visual micro shows the correct board selection after altering ide paths. Might have been the confusion
« Last Edit: Jul 3rd, 2015 at 5:55pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Stephen
Newbies
*
Offline


Posts: 4
Joined: Jul 3rd, 2015
Re: ld.exe error
Reply #5 - Jul 6th, 2015 at 12:47pm
Print Post  
I see what you are saying, but I never noticed this until you pointed it out. I never changed it from Uno and its always set at Uno now, but like you say changing the ide path might?? have changed it but otherwise I don't know.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ld.exe error
Reply #6 - Jul 6th, 2015 at 12:47pm
Print Post  
Great thanks will look into it. It was probably the yun which is first in the list Smiley
« Last Edit: Jul 6th, 2015 at 12:49pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint