Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 "Symbol unrecognized" bug in Visual Assist X
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

William Brown
Starting Member

USA
1 Posts

Posted - Jan 09 2014 :  5:42:02 PM  Show Profile  Reply with Quote
I use a rather strange method for defining globals in my embedded C code.
#define _SPI_DRV_GLOBALS is put at the top of the C file associated with these this header.

#ifdef _SPI_DRV_GLOBALS // Locally defined init vals possible
#define H_EXTERN_VARIABLE volatile
#define H_V_I(x) x
#else // defined as extern in other files
#define H_EXTERN_VARIABLE extern volatile
#define H_V_I(x)
#endif // end #ifdef _SPI_DRV_GLOBALS

H_EXTERN_VARIABLE U8 g_nLEDduration H_V_I( = 250 );

#undef H_EXTERN_VARIABLE

so the variable g_nLEDduration is global, and if any other C file includes this header it shows up defined as extern.

The issue i found is that the line:
H_EXTERN_VARIABLE U8 g_nLEDduration H_V_I( = 250 );
causes the VA X not to see the reference.
if I put a space in before the ; it works though

so:
H_EXTERN_VARIABLE U8 g_nLEDduration H_V_I( = 250 ) ;
is referenced just fine.

Bill

William Brown
Aerodyne Research Inc.

feline
Whole Tomato Software

United Kingdom
19025 Posts

Posted - Jan 11 2014 :  9:36:00 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description:

case=79527

This is quite unexpected, I would not have expected a space before the semi-colon to have such an effect. At least the solution is simple, which is good news.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000