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 No debugging/output if inheritance is used (Read 1844 times)
tobias
Newbies
*
Offline


Posts: 3
Joined: May 30th, 2018
No debugging/output if inheritance is used
May 30th, 2018 at 7:05am
Print Post  
Hi, 

I wrote an application for using it with an Arduino Ethernet. 

If I used the following inheritance from an abstract class, the application is still working with Arduino IDE 1.8.5. 

But VS2015 with VMicro 1805.25.0 shows the following behavior:
- no syntax errors
- no compiler errors
- application can be build and loaded
- connection to COM11 is established
-! No stopps or output from breakpoints
-! No serial output
(remember: Arduino IDE still works including serial outputs)

Is this an error of VMicro?


The 'important" lines of code:
sketch.ino

Code (C++)
Select All
#include "prog1.h"
//...
prog1* mp1 = new prog1();

void setup() {
Serial.begin(115200);
//...
Serial.println("setup");
}

void loop()
{
//...
Serial.println("setup");
delay(1000);
}
 



 

progr1.cpp

Code (C++)
Select All
#include "prog1.h"

prog1::prog1(){}

prog1::~prog1(){}

void prog1::initP(struct CRGB* sled, logging_utils* slogs){}
 

 




progr1.h

Code (C++)
Select All
#ifndef g_prog1
#define g_prog1

#include "aled_prog.h"
class prog1 :	public aled_prog
{
public:
	prog1();
	~prog1();
	void initP(struct CRGB* sled, logging_utils* slogs);
};

#endif
 

 




aled_prog.h


Code (C++)
Select All
#include "logging_utils.h"
#include "utils.h"

class aled_prog
{
public:
	aled_prog();
	~aled_prog();
	virtual void initP(struct CRGB* sled, logging_utils* slogs) = 0;
};
  




aled_prog.h


Code (C++)
Select All
#include "aled_prog.h"

aled_prog::aled_prog(){}

aled_prog::~aled_prog(){}
 

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: No debugging/output if inheritance is used
Reply #1 - May 30th, 2018 at 12:46pm
Print Post  
Hi,

Quote:
If I used the following inheritance from an abstract class, the application is still working with Arduino IDE 1.8.5.


I am a little confused by this report. 

Can we please take it one step at a time. For direct comparison to the arduino ide then please switch the toolbar in Visual Micro from Debug to Release and then upload.

Does this work okay?
  
Back to top
WWW  
IP Logged
 
tobias
Newbies
*
Offline


Posts: 3
Joined: May 30th, 2018
Re: No debugging/output if inheritance is used
Reply #2 - May 30th, 2018 at 6:11pm
Print Post  
Due to holidays, I did a retest on an other PC at home (both PC has an comparable hardware). This PC has also the same software installed Win10, VS2015, VMicro 1805.25.0- just the Arduino version differs a little bit (I think 1.8.0).

On this second PC, the exactly same code works! Everything is wonderful! Even the compilation is about 5 times faster! 

Next week, I'll do a retest on the first PC again. I will investigate this behavior and compare the settings. Perhaps I find the problem.

Thanks 
Tobias

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: No debugging/output if inheritance is used
Reply #3 - May 31st, 2018 at 12:20pm
Print Post  
The speed of the toolchains in the arduino ide is widely different so make sure you use the same version for comparison.

The virus checkers can cause slow compile.

You have not said which board you are using or which USB driver shows in device manager when the board is connected.

If you are using the silicon labs cp210 usb driver then make sure it is the latest v6.7 and not the v10 which does not work properly with windows c# apps. Windows 10 update can install the wrong version.
« Last Edit: May 31st, 2018 at 12:20pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
tobias
Newbies
*
Offline


Posts: 3
Joined: May 30th, 2018
Re: No debugging/output if inheritance is used
Reply #4 - Jun 4th, 2018 at 11:17am
Print Post  
I'm using a genuine Arduino Ethernet with the driver (Arduino LLC, 24.11.2015, 1.2.3.0)
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint