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

How to turn on DEBUG flag on SES

Hello.

Please teach me how to turn on DEBUG flag on Segger Embeddid Studio.

Environment:
SDK 15.2.0 and
SEGGER Embedded Studio Release 4.10a Build 2018110203.37618 Linux x64

In the

devzone.nordicsemi.com/.../app_error_fault_handler-sdk-v15-0-0-nrf52832-custom-board-id-0x00004001-blinky-example-impossible-to-connect

says:

> and define DEBUG for your project (if you use SES, just select Debug build instead of Release).

But It seems not turn on in Debug build.

Ex:
1. I open project from examples/ble_peripheral/ble_app_uart .
2. I select menu on SES as "Build" > "Build and Debug".

3. But DEBUG define is turned off in app_error_weak.c (see attachment image).

Any help?

Parents
  • Hi,

    DEBUG will be set when you choose Debug build (as opposed to Release build.) It is not related to whether you run a debug session or not.

    Regards,
    Terje

  • Thank you for the reply. Oops, stupidly I missed that selector.

    So I changed the selector to "Debug". After that, I did the following work.

    1. [Build] -> [Clean Solution]

    2. [Build] -> [Build and Debug]

    However, it still remains DEBUG define is turned off. (see attachment image).

    In the "ble_app_uart_pca10056_s140.emProject" file, Configuration is as follows.

    <configuration Name="Release"
    c_preprocessor_definitions="NDEBUG"
    gcc_optimization_level="Optimize For Size" />
    <configuration Name="Debug"
    c_preprocessor_definitions="DEBUG; DEBUG_NRF"
    gcc_optimization_level="None"/>

     Anything help?

  • Hi,

    I think this is only a visual glitch in the SES text editor. I noticed that if I opened the file app_error_weak.c in the normal (non-debug) window, then changed over to Debug, then the graying out did not change. When I closed the app_error_weak.c tab and reopened the file, however, the graying out was correct. Can you try the same?

    Regards,
    Terje

Reply Children
Related