VS Arduino
Visual Micro >> Other Hardware >> ESP8266 Exception Decoding
https://www.visualmicro.com/forums/YaBB.pl?num=1513117293

Message started by David Albert on Dec 12th, 2017 at 10:21pm

Title: ESP8266 Exception Decoding
Post by David Albert on 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.

Title: Re: ESP8266 Exception Decoding
Post by Visual Micro 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


Title: Re: ESP8266 Exception Decoding
Post by Kabron on Mar 2nd, 2018 at 9:32am

Tim@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?

Title: Re: ESP8266 Exception Decoding
Post by Visual Micro on 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.


Title: Re: ESP8266 Exception Decoding
Post by Kabron on Mar 6th, 2018 at 6:21am

Tim@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.

Title: Re: ESP8266 Exception Decoding
Post by Visual Micro 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?

Title: Re: ESP8266 Exception Decoding
Post by Kabron on Mar 6th, 2018 at 2:00pm

Tim@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![/code]

2.There is no such icon in the serial monitor in my case in the latest vmicro version.

Title: Re: ESP8266 Exception Decoding
Post by Visual Micro on 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


Title: Re: ESP8266 Exception Decoding
Post by Kabron on Mar 6th, 2018 at 4:10pm
1. I understand. I had no exception in monitor window.
2. mailed

Title: Re: ESP8266 Exception Decoding
Post by Visual Micro on 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




Title: Re: ESP8266 Exception Decoding
Post by Kabron on Mar 7th, 2018 at 6:03am

Tim@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.

Title: Re: ESP8266 Exception Decoding
Post by Kabron on Mar 7th, 2018 at 9:06am
Apropos, I do not see the exception icon when exception occured.

2018-03-07_115940.jpg ( 207 KB | 3 Downloads )

Title: Re: ESP8266 Exception Decoding
Post by Visual Micro on 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-Micro.aspx

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

Thanks

Title: Re: ESP8266 Exception Decoding
Post by Kabron on Mar 7th, 2018 at 1:14pm
Sorry, I did not noticed that.
Better, I create a special topic.

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.