[SOLVED] Conditional compilation for debug / release

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Conditional compilation for debug / release

    Hi All,

    I am using SES v5.60 for nRF development. I need to use #ifdef / #ifndef macro in combination with some environment variable that defines Debug or Release compilation and that is set by the SES IDE (switched in the Project explorer).

    Any advise is appreciated.

    Thanx.
    Best regards,
    peter
  • Hi Peter,

    Thank you for your inquiry.
    What exactly is the question here?

    General documentation about public and private build configs in ES can be found here:
    wiki.segger.com/Embedded_Studio#Project_Configuration

    Per default in ES in the debug config preprocessor define DEBUG is used. For the release config it is NDEBUG.
    These can be used to e.g. encapsulate debug code with the #ifdef blocks.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.