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 Errors compiling Arduino Example. (Read 897 times)
Livio
Junior Member
**
Offline


Posts: 55
Location: Italy
Joined: Jan 10th, 2018
Errors compiling Arduino Example.
Feb 5th, 2021 at 1:05pm
Print Post  
After many posts and many helps from this forum I can use Atmel-ICE to debug Blink Example with Visual Studio on the board MKRWiFi1010.

Now I try to use another example: EthernetHTPS, I can compile this file with Arduino IDE without errors.

I try to import: Visual Studio - Continue without code - Extensions - vMicro - Open Existing Arduino Project - I select the same code I compiled wit Arduino IDE

When I try Debug - Compile there is an error:

Error linking for board Arduino MKR WiFi 1010
Build failed for project 'EthernetHTTPS2'

SSLClient.cpp.o: In function __gnu_cxx::new_allocator<SSLSession>::allocate(unsigned int, void const*)
new_allocator.h:102: undefined reference to std  __throw_bad_alloc()

collect2.exe*: error: ld returned 1 exit status


Here attached the output from Arduino IDE and Visual Studio

Thanks for your help
Livio
  

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


Posts: 55
Location: Italy
Joined: Jan 10th, 2018
Re: Errors compiling Arduino Example.
Reply #1 - Feb 5th, 2021 at 2:19pm
Print Post  
I try to compile the same on Microchip Studio + Visual Micro

First I receive the error: File name or extension too long.

You suggest me, in other post, to install Visual.Micro.Microchip.Studio_21_01_06_2_v2Installer.zip
Ok, now the error is the same as in Visual Studio, see attached file.

Now the situation is similar in Visual Studio e Microchip Studio, towards which of the two do you advise me to employ my efforts?

My target is:
- develop software for board similar to Arduino boards, the same processor, so I can use many libraries online.
- Use Atmel-ICE for debugging.
- If I choose Visual Studio can I import projects from Microchip Studio?

Thank you
Livio
  

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


Posts: 2704
Joined: Feb 13th, 2019
Re: Errors compiling Arduino Example.
Reply #2 - Feb 5th, 2021 at 2:56pm
Print Post  
This Example compiles fine for me with the 1.8.9 + 1.8.11 SAMD Core, can you upgrade the SAMD Board package to this version and retry?
  
Back to top
IP Logged
 
Livio
Junior Member
**
Offline


Posts: 55
Location: Italy
Joined: Jan 10th, 2018
[Solved] Errors compiling Arduino Example.
Reply #3 - Feb 5th, 2021 at 3:45pm
Print Post  
I didn't know how to do this for the first time, but I was ashamed to ask for help right away, so I searched a bit.

Visual Studio - vMicro - Visual Micro Explorer - Manage Boards - look for Available Updates

Done update, now compile without error.

Thank you very much.
Livio
  
Back to top
IP Logged
 
Livio
Junior Member
**
Offline


Posts: 55
Location: Italy
Joined: Jan 10th, 2018
Re: Errors compiling Arduino Example.
Reply #4 - Feb 5th, 2021 at 4:24pm
Print Post  
Yes I can compile, but I can't run the program.
The problem also exists with a previous project, Led Blink, which I could previously load and run perfectly.

In Manage Boards I found 5 or 6 item to update and I apdate all. Update too much?

Now, after Programming and Verifiyng the Flash inside the chip, this errror is show: 
Unable to start debugging. Unable to establish a connection to GDB. Debug output may contain more information.

Gdb an On Chip Debugging - Gdb Enable - is True

The Atmel-ICE is working, if I open Microchip Studio I can read the Device Signature of the chip and the voltage from the board.

« Last Edit: Feb 5th, 2021 at 4:27pm by Livio »  

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


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Errors compiling Arduino Example.
Reply #5 - Feb 7th, 2021 at 2:44am
Print Post  
Switch the tool bar to Release mode and make sure debugging is off. The prove the upload is working same as Arduino IDE. When that is working then try debugging and report in another thread.

Thanks
« Last Edit: Feb 7th, 2021 at 2:44am by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Errors compiling Arduino Example.
Reply #6 - Mar 6th, 2021 at 11:46pm
Print Post  
This Topic was moved here from Visual Studio 2017, 2019 [move by] Tim@Visual Micro.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint