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 Newbie needs help with Serial programming ESP8266 (Read 4239 times)
orbitcoms
Junior Member
**
Offline


Posts: 45
Joined: Jun 21st, 2017
Newbie needs help with Serial programming ESP8266
Jun 21st, 2017 at 5:08am
Print Post  
Hi,
I have installed Atmel Studio 7 and Visual Micro with debugger.
I can compile ok but having trouble uploading code using the serial port (I have USB to serial adaptor connected to my target on COM23). I have set the COM port on the Visual Micro toolbar line and also tried to add an external tool but the example I found for external tool had ATmega328 as device and I am not sure of correct device name to put in arguments field for the esp8266?

Hopefully, this latest version of VM might support serial programming directly?

Any help much appreciated.

OK, I got it. I just needed to click "attach to target" and the code uploaded ok to my ESP via the serial port.
« Last Edit: Jun 21st, 2017 at 5:45am by orbitcoms »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Newbie needs help with Serial programming ESP8266
Reply #1 - Jun 21st, 2017 at 11:33am
Print Post  
You should use visual studio for esp8266, atmel is a different company so you will be (are) very confused.

Serial upload is the standard upload method for esp8266 and has been for a couple of years (since its release)

In any IDE, with Visual Micro, you should simply set the COM port using the vMicro tool bar or menu and then click "Build & Upload" , or Debug>Start etc.

I am struggling to understand what problem you hit when doing as I have suggested.

Visual micro will ignore all the atmel specific settings because they don't apply to your esp board
  
Back to top
WWW  
IP Logged
 
orbitcoms
Junior Member
**
Offline


Posts: 45
Joined: Jun 21st, 2017
Re: Newbie needs help with Serial programming ESP8266
Reply #2 - Jun 21st, 2017 at 8:19pm
Print Post  
Tim,
I see my newbie question has confused you. Firstly, I have never heard of "Visual Studio for esp8266". 

Esp8266 is a board setting and visual micro handles that no problem. My initial issue was how to upload the code via serial port but I found by experiment that "Connect to Target" actually did the upload.
As you can see from my edit, I managed to get it running using the built-in function for upload over serial. As a "NEWBIE" I was unfamiliar with the environment and hence why I asked the question. BTW:
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Newbie needs help with Serial programming ESP8266
Reply #3 - Jun 21st, 2017 at 9:01pm
Print Post  
Well Atmel Studio is an IDE based on Microsoft Visual Studio. Atmel is a company that makes the Arduino boards which is a competitor to Esp8266. 

Atmel Studio is tailored for the Atmel boards and does not know about other boards. Visual Micro overrides most of the intellisenseto force it to look at the currently selected visual micro boards such as esp8266 but the IDE still believes it is using an Arduino board in this case Atmega328.

The esp8266 is a good board that runs code compatible with the Arduino standard however it is not an Arduino or an Atmel.

When you have an Arduino project open in Atmel Studio, Visual Micro also overrides many of the Atmel functions that will make no sense for an Arduino board such as Connect to Target. Actually you would normally click the green or blue arrow on the tool bar or one of the Debug>Start commands to build and upload, or use the vMicro menu or use the Build or Debug menu short cut keys.

You have the option to just build or build and upload, you also have the option to re-upload the last build via the vMicro menu.

Microsoft Visual Studio 2017 with C++ is in many ways better for Arduino except when you have an Atmel board with Atmel hardware debugger. It is also better for the Esp8266 because you have the added facility to "Publish Data Files" to the esp8266 on board memory (file system)

Visual Studio will also be less confusing because you won't bee seeing things like "atmega 328" and other unrelated micro-controller features. Atmel Studio has become even more confusing recently because Atmel are trying to add "Arduino" converter options to their IDE which won't work for non-atmel boards/hardware.

In either IDE it is a good idea to follow the documentation which explains how to use Visual Micro. Please click the Tutorial/Wiki link at the top of this forum and view the docs.

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


Posts: 45
Joined: Jun 21st, 2017
Re: Newbie needs help with Serial programming ESP8266
Reply #4 - Jun 21st, 2017 at 9:22pm
Print Post  
Thanks Tim, I will use Visual Studio. Some of my projects have ICSP headers and I use the Amtel-ICE debugger for those. Some of my project use the STM32F103xx hardware and the ST-Link debugger. I think Visual Micro in Visual Studio can handle them all ok?

Most of my recent development was for PSOC 5LP and used their own IDE and debugger, only recently I included Arduino, Raspberry pi and ESP8266 projects. Initially the Arduino and ESP projects were done in Arduino IDE but lack of debugger and dislike of the IDE caused me to look around and I found Atmel Studio. Then I was looking for a better IDE for Particle Electron and Photon and can Across Visual Micro. Though this did not offer a solution for the Particle projects, I liked the fact it could integrate with VS (which I had traditionally used for C# projects) and run with Atmel Studio.
Finally, I found a template for Particle project in Visual Studio  but unfortunately it only works properly on my home PC and not the office PC. It does the same as Visual Studio new project (no solution name or location dialog). In the case of VM, at least I can save the project but the particle project will not allow me to save it, I have to discard the project every time I leave VS. If I create a project at home and copy it to my drive at office then it works fine and I can edit and save it ok but cannot create a new project from the template (talking about the particle template here)
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Newbie needs help with Serial programming ESP8266
Reply #5 - Jun 21st, 2017 at 9:35pm
Print Post  
If you have hardware debug working in atmel studio then stick with it. 

Are you saying you use STM32F103xx hardware and the ST-Link debugger in Atmel Studio? Can you show screen shot when time available.

Thanks
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint