Hi, i'm using the uvision Configuration Wizard and a board in different versions in HW. Is there a way to provide different settings by ConfWiz like following?
#define HW_Version 1 // // Timer clock value [Hz] // Defines the timer clock value. // Default: 12000000 (12MHz) #ifndef OS_CLOCK #if HW_Version == 1 #define OS_CLOCK 12000000 #elseif HW_Version == 2 #define OS_CLOCK 8000000 #endif #endif
Hi, i'm using the µvision Configuration Wizard and a board in different versions in HW. Is there a way to provide different settings by ConfWiz like following? #define HW_Version 1 // // (o) Timer clock value [Hz] // (i) Defines the timer clock value. // (i) Default: 12000000 (12MHz) #ifndef OS_CLOCK #if HW_Version == 1 #define OS_CLOCK 12000000 #elseif HW_Version == 2 #define OS_CLOCK 8000000 #endif #endif The Problem in upper code is, the ConfWiz is using (changing/editing) the next following value in the text even disabled by präprozessor (here 12000000).
The Configuration Wizard is just a way of viewing & editing a standard 'C' header file which is written in a specific format. It does not add any magic functionality that can't be done with any header file and a "normal" editor. The format is documented here: www.keil.com/.../configWizard.html
Another way to support project "variants" - nothing to do with the Configuration Wizard - is to use different Project Targets: www.keil.com/.../uv4_ca_projtargfilegr.htm
See: http://www.keil.com/forum/64420/#/msg212671
So you could try re-posting to see if it comes out legibly this time. (as a reply here - not a new thread)
Do pay attention to the instructions for posting source code.