We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
The following sequence worked in previous versions; what is the correct syntax now? #ifndef SYS_HW error: SYS_HW must be defined !! #endif
What version do you use? There were some strange things in C166 V4.22 because of the integration with the C++ tools. These have been corrected in C166 V4.23. Refer to http://www.keil.com/update for the latest updates. If you're using C166 V4.23, then please contact technical support to report this problem. Jon
I am using version 4.11
Hmm... I always thought that in ANSI C a preprocessor directive is used to generate compilation error:
#ifndef SYS_HW #error SYS_HW must be defined !! #endif
#ifndef SYS_HW error: SYS_HW must be defined !! #endif
#ifndef SYS_HW # error SYS_HW must be defined! #endif
Well, I tried this in C166 V4.23 and the following works as expected:
#ifndef SYS_HW #error: SYS_HW must be defined !! #endif
Jon, try error without the '#'. Of course this is a syntax error but that's what The Chrysler Corporation seems to have done.
Jon, try error without the '#'. Of course this is a syntax error but that's what The Chrysler Corporation seems to have done. Yep. I did that and it generates all kinds of error messages. But, in reality, that's probably OK. The only time that line gets processed is when the SFR is not defined. The goal, then, is to halt execution and this does that. The error messages just don't indicate the REAL reason. Jon