Tim@Visual Micro wrote on Sep 29
th, 2019 at 2:55pm:
This is useful it is a difficult area that changes for the different hardware
I would be useful to know what hardware (board/platform) you are using and what you removed or changed from the standard vsarduino.h
Thanks very much
I am using my own design board with an Atmega169PA and Optiboot bootloader.
I did not alter vsarduino.h but here is my vs-intellisense-fix.h
#if defined(_VMICRO_INTELLISENSE)
#define pgm_read_byte_near(address_short) uint8_t()
#define __GNUC__ 5
#define __GNUC_MINOR__ 4
#define __GNUC_PATCHLEVEL__ 0
#endif
This keeps Intellisense happy.
In my program I just use the predefined macros and they just work, eg.
ConsoleMsg(INFO, PSTR("Compiled: " __DATE__ " at " __TIME__ ", GCC v%d.%d.%d"), __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
I also tried defining the following and it worked fine too;
#define GCC_VERSION ((__GNUC__*10000)+(__GNUC_MINOR__*100)+__GNUC_PATCHLEVEL__))
but as I wrote in the earlier post I could not find this definition anywhere in my GCC installation, so I had to define it myself. If it is not defined anywhere then it probably does not belong in vsarduino.h