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.
Does anyone know how to test that the "DEBUG" compiler option (active when "Debug Information" is checked on the Target Options Output tab) is enabled? I would like a simple test such as
#ifdef DEBUG
Could you turn the problem around? Instead of enabling the compiler debug info in the uVision options, you define (or not) a preprocessor symbol, and then use that in your source files to determine whether or not to enable debug features; eg,
#ifdef DEBUG_MODE #pragma db //Debug mode - TRACE causes printf output #include <stdio.h> #define TRACE(params) printf params; #else //Release mode - TRACE expands to nothing! #define TRACE(params) #endif
I have found so many things I need done that uVision can not do (file replacement/renaming - debug mode - many builds from same group of files) so I have reverted to commandline operation. I do this by regular .bat files and if if you want to know how, let me know. Erik