Hi and thanks for your great plugin.
Preliminary:
Arduino 1.6.8 installation
VS 2015 Community installation
VMicro plugin
I installed it yesterday and made a small program for my Leonardo. It compiled and everything was fine. However at some point in time suddenly it started to give compiler error messages!
I tried altering my code to find where I made a mistake. I could not find any. After a while I ended up with a blank file and still I got the compilation error.
I then created a new solution from the Blink code template and this solution TOO had the same compilation error.
I did NOT alter any settings in VsMicro. Just to make sure I uninstalled the plugin and reinstalled the plugin. I still got the same error (full trace log is attached as file, here just the error):
CDC.cpp:In file included from
USBAPI.h:152:16: error: cannot declare variable 'Serial' to be of abstract type 'Serial_
:extern Serial_ Serial
USBAPI.h:because the following virtual functions are pure within 'Serial_
class Serial_ *:public Stream
Stream.h:In file included from
HardwareSerial.h:from
Arduino.h:from
USBAPI.h:from
CDC.cpp:from
Print.h:write(uint8_t)
:virtual size_t write(uint8_t) = 0
CDC.cpp:193:8: error: prototype for 'size_t Serial_::write(uint8_t)' does not match any in class 'Serial_
size_t Serial_*:write(uint8_t c)
Stream.h:In file included from
HardwareSerial.h:from
Arduino.h:from
USBAPI.h:from
CDC.cpp:from
Print.h:48:20: error: candidates are: virtual size_t Print::write(uint8_t)
:virtual size_t write(uint8_t) = 0
Print.h:49:12: error: size_t Print::write(const char*)
:size_t write(const char *str) {
Print.h:54:12: error: size_t Print::write(const char*, size_t)
:size_t write(const char *buffer, size_t size) {
CDC.cpp:In file included from
USBAPI.h:104:17: error: virtual size_t Serial_::write(const uint8_t*, size_t)
:virtual size_t write(const uint8_t*, size_t)
CDC.cpp:277:9: error: cannot declare variable 'Serial' to be of abstract type 'Serial_
:Serial_ Serial
CDC.cpp:In file included from
USBAPI.h:note since type 'Serial_' has pure virtual functions
class Serial_ *:public Stream
Error compiling core
Funny thing is, that in my old project I was working with Serial, but the Blink1 code has no references to Serial etc.
I thought that perhaps I accidentally altered any .h or .cpp files from my Arduino installation. So I compared the original .ZIP content with my extracted files and they were the same...
I tried clean building, deleting the TEMP directories etc. but no avail. In my desperation I tried to switch to another board. I randomly choose the "Arduino Nano w/ ATmega328" and bingo ... it worked! ... suddenly the Blink example compiles again (compile trace is also attached). Switching back to Leonardo caused the problem again. I then tried various boards and many worked and some did not (failed with the same compilation error).
So I guess it might be some precompile variables or definitions!? ... Anyway, what strikes me is that it WAS working for the Leonardo and I have NO clue why suddenly it stopped (I really did not alter any vMicro settings or anything).
I got it to work again by doing the following:
1) Uninstall the VMicro Plugin
2) Restart the IDE
2) Delete my Arduino Installation
3) Install the VMicro Plugin
4) Restart the IDE
5) Create a new Blink example solution
6) VMicro does NOT ask me where to find the Arduino sources (like normal after first installation). Instead it displays an "Invalid path" error in the Arduino version window. When I open the configuration dialog manually I see that it still looks for the old folder (so some settings survive the uninstallation of the Plugin!? but where!?).
7) Unzip the Arduino Sources into a NEW directory
8) Choose the new directory in the VMicro config
9) Compile ... -> WORKS!
I also see that choosing the new directory VMicro starts parsing the .H files anew ... it did not do this when I kept my old Arduino directory.
So I guess somewhere there is a cache and the cache somehow got corrupted and this might have caused the compilation error?
I also see that VMicro remembers a lot of things between installs ... like all the checkbox settings in the VMicro Menu, Arduino files location, etc ... why is this kept even after the plugin is uninstalled. And where is it kept?
Well it works for now ... I will make sure to keep you up to date. I just wanted to know if anyone has an idea what happened here.
Thanks and kind regards,
Mike