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  Send TopicPrint
Very Hot Topic (More than 25 Replies) disable all debugging, compile like arduino IDE (Read 19188 times)
mamama2
Junior Member
**
Offline


Posts: 17
Joined: Oct 27th, 2017
disable all debugging, compile like arduino IDE
Oct 27th, 2017 at 4:38pm
Print Post  
Hi!

i was now struggling for hours because my ESP8266 sketch was behaving completely unpredictable regarding WiFi connections. Either it disconnects and reconnects when it receives a packet, or it doesn't reconnect or it connects and disconnects periodically right from the beginning (right after the sketch starts) infinitely.

I then tried to compile my sketch using the arduino IDE and voila, no issues whatsoever.

So: what options do I have to set, to make VisualMicro compile my sketch just as the Arduino IDE would? No debugging, no extra stuff, no extra optimization, ...?

I don't want to load my sketch in the Arduino IDE everytime i want to test a change.

My only use of the VisualMicro Addin is the fact that I can code in Visual Studio instead of the Arduino IDE, which until the last few days, didn't even support anything near IntelliSense.

Thanks!

edit: oh yes, I tried ESP8266 Arduino Core 2.3.0 and 2.4.0 rc2.
« Last Edit: Oct 27th, 2017 at 4:39pm by mamama2 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: disable all debugging, compile like arduino IDE
Reply #1 - Oct 27th, 2017 at 4:45pm
Print Post  
Hi,

You can switch off debug by changing the tool bar from Debug to Release. See docs here

When you have done that please report how it is.

I think the last esp test was 2.3.0 which a lot of people are using.

Are you using OTA or Serial upload?
« Last Edit: Oct 27th, 2017 at 4:45pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
mamama2
Junior Member
**
Offline


Posts: 17
Joined: Oct 27th, 2017
Re: disable all debugging, compile like arduino IDE
Reply #2 - Oct 27th, 2017 at 5:23pm
Print Post  
Thanks for the fast reply.

Unfortunately, setting the tool bar to Release doesn't generate the same output as the Arduino IDE. 
The two resulting bin files aren't even the same size.

391.856 Bytes (Arduino IDE Build)
391.872 Bytes (VMicro Build)

Currently, the "Debug" option and when compiling in Arduino IDE makes the thing work, when compiling with the "Release" option, Wifi connects and disconnects in an endless loop as soon as the ESP is powered on. The rest of the sketch is being executed normally but obviously my software isn't reachable via IP.

I'm using the Web Updater (ESP8266HTTPUpdateServer.h) however it doesn't matter whether I upload the sketch via Serial or via the Web Update page.
  
Back to top
 
IP Logged
 
mamama2
Junior Member
**
Offline


Posts: 17
Joined: Oct 27th, 2017
Re: disable all debugging, compile like arduino IDE
Reply #3 - Oct 27th, 2017 at 8:19pm
Print Post  
now it is the opposite (after ongoing development).

release build works, debug build has the phenomenon where WiFi disconnects and connects infinitely.

thats really annoying. any idea what to configure to make visualmicro compile exactly like the arduino IDE?

again, when compiled with the arduino IDE, there was no issue whatsoever.

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: disable all debugging, compile like arduino IDE
Reply #4 - Oct 27th, 2017 at 9:54pm
Print Post  
Hi,

The arduino ide does not have debug so it is always in release mode. Now it is like Visual Micro that is as you request.

I do recall that when serial is connected the opening of the serial window can cause the board to reboot. The serial window opens automatically when in debug mode so this might be related.

I think from memory for the esp8266 you need to ensure the serial dtr and rts are off. Again the arduino ide controls this automatically but then it can be inflexible at the wrong time.

I hope the discussion about the serial window is the key. You should also note that when the serial is open it resets after upload. 

If you want to prove this clearly then power the board from another source, not the pc can't communicate with the usb.

  
Back to top
WWW  
IP Logged
 
mamama2
Junior Member
**
Offline


Posts: 17
Joined: Oct 27th, 2017
Re: disable all debugging, compile like arduino IDE
Reply #5 - Oct 27th, 2017 at 10:51pm
Print Post  
Hi

thanks for your continuing effort.
I already tried powering the board from my lab PSU, same result.

I can 100% reproduce that when I compile using Arduino IDE and then using VisualMicro in Release Mode, that the output bin files are very different. Also I can 100% reproduce that when uploading the bin compiled with the Arduino IDE the issue doesn't occur and when using the bin compiled with VisualMicro, the issue occurs.

dtr and rts is disabled. it is not related to the serial monitor because the issue also
occurs when no pc is connected to the board. also, the board does NOT reboot, only the wifi connection gets lost and reconnected all the time. the rest of the sketch runs fine all the time.

i do connect to wifi at the beginning and then during loop i maintain and check the connection.
  
Back to top
 
IP Logged
 
mamama2
Junior Member
**
Offline


Posts: 17
Joined: Oct 27th, 2017
Re: disable all debugging, compile like arduino IDE
Reply #6 - Oct 29th, 2017 at 1:03pm
Print Post  
Hi

any idea? Is there anything i can do to help you identifying the issue?

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: disable all debugging, compile like arduino IDE
Reply #7 - Oct 29th, 2017 at 1:18pm
Print Post  
Thanks. No i will try 2.3 over next week
  
Back to top
WWW  
IP Logged
 
mamama2
Junior Member
**
Offline


Posts: 17
Joined: Oct 27th, 2017
Re: disable all debugging, compile like arduino IDE
Reply #8 - Oct 29th, 2017 at 9:18pm
Print Post  
ok thank you! if you need anything, let me know.

I have a feeling that you still don't believe me that the Arduino IDE compiled BIN is not the same as the one compiled by Visual Micro, right?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: disable all debugging, compile like arduino IDE
Reply #9 - Oct 30th, 2017 at 4:10am
Print Post  
No not right thanks
  
Back to top
WWW  
IP Logged
 
mamama2
Junior Member
**
Offline


Posts: 17
Joined: Oct 27th, 2017
Re: disable all debugging, compile like arduino IDE
Reply #10 - Oct 30th, 2017 at 7:25am
Print Post  
OK, I'll wait then.
I really like Visual Micro. It is absolutely fantastic, being able to program Arduino and Arduino compatible stuff in Visual Studio.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: disable all debugging, compile like arduino IDE
Reply #11 - Oct 30th, 2017 at 6:41pm
Print Post  
thanks

if you want to help then switch on vmicro>compiler>verbose and then build and copy the output into a .txt file then email

in arduino ide switch on file>preference>compile verbose then copy the output into a .txt file

Email both files to info[at]visualmicro.com

Thanks
  
Back to top
WWW  
IP Logged
 
mamama2
Junior Member
**
Offline


Posts: 17
Joined: Oct 27th, 2017
Re: disable all debugging, compile like arduino IDE
Reply #12 - Oct 30th, 2017 at 7:17pm
Print Post  
sure, just dropped you an e-mail.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: disable all debugging, compile like arduino IDE
Reply #13 - Oct 30th, 2017 at 7:36pm
Print Post  
Thanks, I can see you aren't using the stable 2.3 which is what has been tested and should be working.

Can you please use the arduino ide board manager to remove 2.4 rc2 and install 2.3 then try again

Then send another two build outputs

Thanks a lot
  
Back to top
WWW  
IP Logged
 
mamama2
Junior Member
**
Offline


Posts: 17
Joined: Oct 27th, 2017
Re: disable all debugging, compile like arduino IDE
Reply #14 - Oct 30th, 2017 at 7:36pm
Print Post  
yeh sorry, will do that and come back to you in a minute.
  
Back to top
 
IP Logged
 
mamama2
Junior Member
**
Offline


Posts: 17
Joined: Oct 27th, 2017
Re: disable all debugging, compile like arduino IDE
Reply #15 - Oct 30th, 2017 at 7:56pm
Print Post  
just resent the logs (now 2.3.0).
  
Back to top
 
IP Logged
 
mamama2
Junior Member
**
Offline


Posts: 17
Joined: Oct 27th, 2017
Re: disable all debugging, compile like arduino IDE
Reply #16 - Oct 31st, 2017 at 5:28pm
Print Post  
were you able to find anything out? doesn't this occur with 2.2.0 (didn't try that yet)?

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: disable all debugging, compile like arduino IDE
Reply #17 - Oct 31st, 2017 at 6:21pm
Print Post  
Hi,

2.3. is fine Visual micro only attempts to support the current release of each board.

The build outputs looks the same so I will try my esp8266 over the next few days. 2.3 has been well used by many over the past year or so.

The linker order is the only difference I see. It's possible that the combination of libraries you are using require a certain order. I will look into why there is a difference.
  
Back to top
WWW  
IP Logged
 
mamama2
Junior Member
**
Offline


Posts: 17
Joined: Oct 27th, 2017
Re: disable all debugging, compile like arduino IDE
Reply #18 - Oct 31st, 2017 at 6:35pm
Print Post  
perfect, thanks! currently i have to compile everything using the arduino IDE, thats quite a PITA...
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: disable all debugging, compile like arduino IDE
Reply #19 - Oct 31st, 2017 at 6:39pm
Print Post  
Easier if you switch on external editor in Arduino prefs
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint