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 Enable exception handling (Read 5603 times)
iain frew
Junior Member
**
Offline


Posts: 13
Joined: Nov 17th, 2017
Enable exception handling
Mar 6th, 2018 at 5:23pm
Print Post  
Downloaded latest esp32 core and during compilation now getting an error saying to enable exception handling using -fexceptions. Is this a Visual Micro or compiler setting? Anybody know how to do this? sdconfig.h file has #define CONFIG_CXX_EXCEPTIONS 1 already enabled but I still get this error..

-esp32-elf-g++" -DESP_PLATFORM -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DHAVE_CONFIG_H "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/config" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/bluedroid" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/app_trace" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/app_update" pport" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/bt" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/driver" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/esp32" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/esp_adc_cal" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/ethernet" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/fatfs" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/freertos" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/heap" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/jsmn" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/log" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/mdns" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/mbedtls"  "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/newlib" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/nvs_flash" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/openssl" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/spi_flash" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/sdmmc" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/spiffs" " "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/ulp" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/vfs" g" module" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/console" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/soc" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/newlib" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/coap" t" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/expat" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/json" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/nghttp" "-ID:\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/lwip" -std=gnu++11 -fno-exceptions -Os -g3 -Wpointer-arith -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -fno-rtti -MMD -c -DF_CPU=240000000L -DARDUINO=10801 -DARDUINO_Node32s -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD=\"Node32s\" -DESP32 -DCORE_DEBUG_LEVEL=3 -I"D:\Documents\Arduino\hardware\espressif\esp32\cores\esp32" -I"D:\Documents\Arduino\hardware\espressif\esp32\variants\node32s" -I"D:\Documents\Arduino\hardware\espressif\esp32\libraries\FS\src" -I"D:\Documents\Arduino\hardware\espressif\esp32\libraries\WiFi\src" -I"D:\Documents\Arduino\hardware\espressif\esp32\libraries\BLE\src" -I"D:\Documents\Arduino\hardware\espressif\esp32\libraries\Update\src" -I"D:\Documents\Arduino\hardware\espressif\esp32\libraries\SPI\src" -I"D:\Documents\Arduino\hardware\espressif\esp32\libraries\Preferences\src" -I"D:\Documents\Arduino\hardware\espressif\esp32\libraries\Wire\src" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\mjlfxd1j.24d\Micro Platforms\visualmicro\ide\libraries" -I"D:\Documents\Arduino\hardware\espressif\esp32\libraries" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\mjlfxd1j.24d\Micro Platforms\default\debuggers" -I"D:\Documents\Arduino\libraries" "D:\Documents\Arduino\hardware\espressif\esp32\libraries\BLE\src\BLEClient.cpp" -o Release\BLE\BLEClient.cpp.o"
BLEClient.cpp: In member function BLERemoteService* BLEClient::getService(BLEUUID)
 
BLEClient.cpp: 336:12: error: exception handling disabled, use -fexceptions to enable
   throw new BLEUuidNotFoundException
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Enable exception handling
Reply #1 - Mar 6th, 2018 at 5:26pm
Print Post  
Delete this folder D:\Documents\Arduino\hardware\espressif

All compiler settings are auto set from the board and platform.txt files in each tool chain / package

Restart the ide or click rescan after making changes.

Ensure the correct board is selected.
  
Back to top
IP Logged
 
iain frew
Junior Member
**
Offline


Posts: 13
Joined: Nov 17th, 2017
Re: Enable exception handling
Reply #2 - Mar 6th, 2018 at 6:28pm
Print Post  
Thank for the quick reply. If I delete the espressif folder that will delete my entire esp32 core installation set of files and libraries? Is that what you really meant me to do?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Enable exception handling
Reply #3 - Mar 7th, 2018 at 3:02pm
Print Post  
Yes now please use board manager to install an arduino package.

I suggest you use the arduino ide board manager so you can test your boards in both arduino and visual micro.

The .json files to be pasted into file>preferences>board support packages (comma sep list of json files)

Then the board manager will show you esp32 and/or esp8266 installable cores.

These visual micro pages give you a couple of .json file links

http://www.visualmicro.com/page/How-to-install-Esp32-for-Arduino-and-Visual-Micr...
http://www.visualmicro.com/page/esp8266.aspx
  
Back to top
IP Logged
 
iain frew
Junior Member
**
Offline


Posts: 13
Joined: Nov 17th, 2017
Re: Enable exception handling
Reply #4 - Mar 7th, 2018 at 5:22pm
Print Post  
Thanks! You pointed me in the right direction with the platform.txt file. I have been building on esp32 for over a year but the latest core I downloaded from GitHub for esp32 has in the platform.txt file -fno-exceptions and -fexceptions both flags set for the cpp compiler!. There is a comment in the GitHub about this. I just deleted the -fno-exceptions and restarted the ide and it works fine now. 

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


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Enable exception handling
Reply #5 - Mar 7th, 2018 at 9:15pm
Print Post  
Oh great.

I think I was confused in my prev latter answers. I have had a few different threads discussing esp exception handling recently but yours was different  Smiley

I am not sure the tool chain you are using will have addr2line which is useful for the new esp exception stack trace. The trace works on esp8266 so I am hoping also for esp32. Haven't had time to try it.
« Last Edit: Mar 7th, 2018 at 9:18pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint