Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
ESP8266 Exception Decoding (Read 1871 times)
David Albert
Newbies
*
Offline



Posts: 1
ESP8266 Exception Decoding
Dec 12th, 2017 at 10:21pm
 
Anyone who does much work with the ESP8266 encounters exceptions and the accompanying register and stack dump.  In the Arduino IDE, you can use EpsExceptionDecoder (https://github.com/me-no-dev/EspExceptionDecoder) to decode the exception.  This is incredibly useful; is there a way to do this in vMicro?

Unfortunately, the xtensa tools directory that gets installed automatically with the arduino board selection doesn't appear to include some common gcc tools like objdump that would allow you to examine the .elf file and decode exceptions manually.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 8856
United Kingdom
Re: ESP8266 Exception Decoding
Reply #1 - Dec 13th, 2017 at 1:11pm
 
I'll add it to the list.

You might be able to make use of this already using the visual studio "tools>external tools" system although you might need help with paths.

However I would expect that you can run as an external tools the java.exe from the arduino path along with the name of the .jar file

Back to top
 
WWW  
IP Logged
 
Kabron
Full Member
***
Offline



Posts: 43
Re: ESP8266 Exception Decoding
Reply #2 - Mar 2nd, 2018 at 9:32am
 
Visual Micro wrote on Dec 13th, 2017 at 1:11pm:
I'll add it to the list.

You might be able to make use of this already using the visual studio "tools>external tools" system although you might need help with paths.

However I would expect that you can run as an external tools the java.exe from the arduino path along with the name of the .jar file



It does not work.
Could you, please, test and report how to include
Exception Decoder in Vmicro?
Back to top
« Last Edit: Mar 2nd, 2018 at 9:32am by Kabron »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 8856
United Kingdom
Re: ESP8266 Exception Decoding
Reply #3 - Mar 5th, 2018 at 1:38pm
 
Actually there is a different version on github that runs as an external command line tool. That one would have done the job.

Try the latest visual micro and see if this option works for you.

...
Back to top
 
WWW  
IP Logged
 
Kabron
Full Member
***
Offline



Posts: 43
Re: ESP8266 Exception Decoding
Reply #4 - Mar 6th, 2018 at 6:21am
 
Visual Micro wrote on Mar 5th, 2018 at 1:38pm:
Actually there is a different version on github that runs as an external command line tool.


That was the first I tried. It cannot find xtensa-esp32-elf-addr2line. I tried all possible path variants with no luck, that is why I ask you for a detail installation procedure.
Back to top
« Last Edit: Mar 6th, 2018 at 6:24am by Kabron »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 8856
United Kingdom
Re: ESP8266 Exception Decoding
Reply #5 - Mar 6th, 2018 at 12:11pm
 
I see. If you switch on vmicro>compiler> "show build properties" or "verbose" you get to see where the tool chain is installed.

Did you try the new icon on the serial monitor?
Back to top
 
WWW  
IP Logged
 
Kabron
Full Member
***
Offline



Posts: 43
Re: ESP8266 Exception Decoding
Reply #6 - Mar 6th, 2018 at 2:00pm
 
Visual Micro wrote on Mar 6th, 2018 at 12:11pm:
I see. If you switch on vmicro>compiler> "show build properties" or "verbose" you get to see where the tool chain is installed.

Did you try the new icon on the serial monitor?


1. I do know where tool chain located, but with any path configuration(in my case "d:\Arduino\hardware\espressif\ESP32\tools\xtensa-esp32-elf") in the command line parameters Exception Decoder said that it cannot find xtensa-esp32-elf-addr2line in the d:\Arduino\hardware\espressif\ESP32\tools\xtensa-esp32-elf/bin. It automatidcally added /bin to my path.
Any /\ combinations  in the path do not work.
Code:
D:\Arduino\EspArduinoExceptionDecoder>decoder.py -p ESP32 -t d:\Arduino\hardware\espressif\ESP32\tools\xtensa-esp32-elf  -e "D:\Arduino\Proj\libraries\M5StackSAM\examples\ExampleMENU\Debug\ExampleMENU.elf" "D:\Arduino\Proj\libraries\M5StackSAM\examples\ExampleMENU\ExampleMENU.sln.txt" 
ERROR: addr2line not found (d:\Arduino\hardware\espressif\ESP32\tools\xtensa-esp32-elf\bin/xtensa-esp32-elf-addr2line)
ERROR: Parser not complete! 



2.There is no such icon in the serial monitor in my case in the latest vmicro version.
Back to top
« Last Edit: Mar 6th, 2018 at 2:20pm by Kabron »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 8856
United Kingdom
Re: ESP8266 Exception Decoding
Reply #7 - Mar 6th, 2018 at 3:37pm
 
1)

Does your serial monitor have an exception showing in it? If so please paste it here. If not then you will not see the exception icon.

2)

Please switch on vmicro>compiler> "show build properties" or "verbose"  and post the output as .txt file or email to info[at]visualmicro.com with link to this post

Back to top
 
WWW  
IP Logged
 
Kabron
Full Member
***
Offline



Posts: 43
Re: ESP8266 Exception Decoding
Reply #8 - Mar 6th, 2018 at 4:10pm
 
1. I understand. I had no exception in monitor window.
2. mailed
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 8856
United Kingdom
Re: ESP8266 Exception Decoding
Reply #9 - Mar 6th, 2018 at 5:01pm
 
Your build log doesn't show the standard esp8266 tool chain.

I suggest removing the arduino ide\hardware\expressif folder and installing esp8266 via arduino ide board manager.

http://arduino.esp8266.com/stable/package_esp8266com_index.json



Back to top
 
WWW  
IP Logged
 
Kabron
Full Member
***
Offline



Posts: 43
Re: ESP8266 Exception Decoding
Reply #10 - Mar 7th, 2018 at 6:03am
 
Visual Micro wrote on Mar 6th, 2018 at 5:01pm:
Your build log doesn't show the standard esp8266 tool chain.

ESP8266 is not my goal. As stated on the product page:
Exception Stack Trace Decoder for ESP8266 and ESP32, so I need it for ESP32.
And as you can see, Decoder does understand that the target is ESP32, but could not realize the path.
Back to top
« Last Edit: Mar 7th, 2018 at 6:06am by Kabron »  
 
IP Logged
 
Kabron
Full Member
***
Offline



Posts: 43
Re: ESP8266 Exception Decoding
Reply #11 - Mar 7th, 2018 at 9:06am
 
Apropos, I do not see the exception icon when exception occured.
Back to top
 

2018-03-07_115940.jpg (207 KB | 29 )
2018-03-07_115940.jpg
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 8856
United Kingdom
Re: ESP8266 Exception Decoding
Reply #12 - Mar 7th, 2018 at 11:58am
 
The title of the thread is esp8266 not esp32

The Esp32 page on Visual Micro has a link for an esp32 arduino board package

http://www.visualmicro.com/page/How-to-install-Esp32-for-Arduino-and-Visual-Micr...

If you have any question about exception output then please state which tool chain version you installed.

Thanks
Back to top
 
WWW  
IP Logged
 
Kabron
Full Member
***
Offline



Posts: 43
Re: ESP8266 Exception Decoding
Reply #13 - Mar 7th, 2018 at 1:14pm
 
Sorry, I did not noticed that.
Better, I create a special topic.
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print