Hi,
Using SDK 2.0, I wish to not use the debug console and instead write my own handling for serial ports...
The problem is that the driver file fsl_common.c includes "fsl_debug_console.h". fsl_debug_console.h defines SDK_DEBUGCONSOLE which in turn defines PRINTF as DbgConsole_Printf. fsc_common.c calls PRINTF in its assert handler. So, if DbgConsole_Printf does not exist (ie dont include fsl_debug_console.c in the build), the SDK drivers can not compile.
Any ideas?
Thanks
Ashley
Thanks for your feedback...
Ideally I don't want to mess with the SDK files to turn this off. I cannot guarantee that someone wont replace these files with a newer SDK version in the future etc.
I think it would make more sense if it was a feature that needed to be turned on, rather than one that can not be turned off....
I would like to leave NDEBUG not defined as I would like to keep the assert functions in.
Ashley,
If you want to disable this in your project without modification to the source files, you can use a pre-processor directive with your compiler to set SDK_DEBUGCONSOLE to 0 during compilation. Since the #define of SDK_DEBUGCONSOLE is wrapped in an #ifndef, it will only set SDK_DEBUGCONSOLE to 1 if you haven't defined the value elsewhere.
https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html - Review the -D option for gcc.
Regards,
Jason
OK, good point. Thanks...