VS Arduino
>> >> EXCEPTION DURING DEBUG
https://www.visualmicro.com/forums/YaBB.pl?num=1566398772

Message started by MARCO_ITALY on Aug 21st, 2019 at 2:46pm

Title: EXCEPTION DURING DEBUG
Post by MARCO_ITALY on Aug 21st, 2019 at 2:46pm
Hi !
I have see this error that block in an infinite loop my debugger. Can you tell me something about this.
in attach a pic of my error.

This error occours inside the ethernet.h arduino library
Best
Marco

debug_005.png ( 623 KB | 2 Downloads )

Title: Re: EXCEPTION DURING DEBUG
Post by Visual Micro on Aug 21st, 2019 at 3:09pm
First I suggest you changed from "Default Optimization" to "No Project + Libraries"

That might help and usually is required. You can see the optimization setting is "default" in your picture

If that does not help then try to stop on a normal code line.

Title: Re: EXCEPTION DURING DEBUG
Post by MARCO_ITALY on Aug 21st, 2019 at 4:16pm
Thank you.
The error is no longer there, but now I no longer work a part of the program a library (FastLed) has stopped working. If I put the setting back in default, the error reoccurs but the fastled library works well.

:o :(

Title: Re: EXCEPTION DURING DEBUG
Post by Visual Micro on Aug 21st, 2019 at 5:32pm
That's GDB for you :) Try setting "No Project Optimization" instead of "No Project + Libraries" then your own code should debug fully but some library code will not debug fully.

Title: Re: EXCEPTION DURING DEBUG
Post by MARCO_ITALY on Aug 21st, 2019 at 5:39pm
Hello I tried with all configurations:
Default: FastLed works - Ethernet does not work
NO optimizations : FastLed does not work - Ethernet works
NO optimizations + libraries : FastLed does not work - Ethernet works

My goal is: FastLed + Ethernet working together.

:) :o

Title: Re: EXCEPTION DURING DEBUG
Post by Visual Micro on Aug 21st, 2019 at 5:44pm
It's interesting.

You mean you want to debug both FastLED and Ethernet at the same time?



Title: Re: EXCEPTION DURING DEBUG
Post by MARCO_ITALY on Aug 22nd, 2019 at 5:58am
Hi my goal is not to a library debugging. I want debug my code on my custom made board.
Unfortunately, during debugging I saw the error I reported to you, and the compiler output does not even run without an emulator. It seems that the compiler in some cases does not produce code correctly. Hence my need to activate debugging. Normally the library functions called by my code are not explored internally using the STEP-OVER debug option. Unfortunately the problem I reported only occurs within the libraries and to understand it I had to use the STEP-INTO function. That's it

You can help me understand, or suggest some solution. Here is a list of the libraries I use. If necessary, I can send you the source code.


#include <Ethernet.h>
#include <FreeRTOS_ARM.h>
#include <basic_io_arm.h>

/* For E2PROM emulation use Bank1 for e2prom emulation*/
#include <DueFlashStorage.h>
#include <efc.h>
#include <flash_efc.h>
/************RF2.4GHZ MODULE****************************/
#include <printf.h>
#include <RF24.h>
#include <RF24_config.h>
/************LED MANAGEMENT*****************************/
#include <FastLED.h>

:)

Title: Re: EXCEPTION DURING DEBUG
Post by Visual Micro on Aug 22nd, 2019 at 11:17am
Thanks, it sounds like we need a new feature that allows you to specify libraries that will not be subject to disabled optimization. It sounds like FastLED can not be debugged without optimization yet other libraries can only be debugged without optimization.

In this case future versions of visual micro might support a library.properties flag called something like "disable_optimzation=never" that you could add to fastLED

Make sense?



Title: Re: EXCEPTION DURING DEBUG
Post by MARCO_ITALY on Aug 23rd, 2019 at 9:49am
Hello!
Yes, it makes sense to me, too. Because the arduino platform, as you know, is open and therefore each person has developed the libraries with their own philosophy, so it is interesting the possibility of a compiler that fits better for each library. If you want I can be a tester. Let me know what you decide.
:) :D

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