This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

setting DEBUG flag in eclipse

I am trying to track down a fatal error and want to use the Error module as documented below, to get the line number and file name.

Using eclipse, where should DEBUG be set. So far I have tried sdk_config.h file with the following addition:

#ifndef DEBUG 

#define DEBUG 1

#endif

However this is only giving me the PC and I am not getting through to app_error_save_and_stop where the line number and filename should be determined. Is this the correct way to set the DEBUG flag?

If the DEBUG flag is set:

When app_error_fault_handler is invoked, the error info (for example the function parameters: error code, line number, and file name) are copied to global memory, interrupts are disabled, and the application enters an infinite loop.

Related