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 Intellisense vs #define macros (Read 3327 times)
swordfishBob
Newbies
*
Offline


Posts: 9
Joined: Oct 24th, 2011
Intellisense vs #define macros
Jun 12th, 2013 at 2:31am
Print Post  
I find a bunch of underlined "errors" which actually compile fine.

e.g. in 

#include <avr/eeprom.h>
#define eeprom_read_to(dst_p, eeprom_field, dst_size) eeprom_read_block(dst_p, (void *)offsetof(__eeprom_data, eeprom_field), MIN(dst_size, sizeof((__eeprom_data*)0)->eeprom_field))
struct __eeprom_data {
    uint16_t magic;
    uint16_t version;
};

void setup()
{
    uint16_t magic;
    uint16_t version;
    eeprom_read(magic, magic);
    eeprom_read(version, version);
}


Also, 

FastSerialPort(Serial,0);
...
Serial.print(F("!IYMO Config found\r\n"));
Serial.printf_P(F("!Version %04X\r\n"), version);
« Last Edit: Jun 12th, 2013 at 2:34am by swordfishBob »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12137
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense vs #define macros
Reply #1 - Jun 12th, 2013 at 1:21pm
Print Post  
Hi,

Yes intellisense isn't perfect but what happens if you click "Project>Show all arduino files"? Does that improve things?

Which version of VS or Atmel?

Thanks
« Last Edit: Jun 12th, 2013 at 1:22pm by Tim@Visual Micro »  
Back to top
IP Logged
 
swordfishBob
Newbies
*
Offline


Posts: 9
Joined: Oct 24th, 2011
Re: Intellisense vs #define macros
Reply #2 - Jun 12th, 2013 at 11:36pm
Print Post  
Squiggles disappeared, reappeared, a few times... then I noticed the status line said 13 of 100.  A couple of minutes later, all the libraries are showing in the project.

eeprom_read is now good, eeprom_write still underlined. (These are similar and located in same header).

Serial.print(F("Something")) is good in some places but not others, 
Serial.printf_P(F("Something %ld"), myLong) is not.

I'm using VS2012.
« Last Edit: Jun 12th, 2013 at 11:38pm by swordfishBob »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint