Locale Icon
English
  • Forums

    Popular Forums

    • LTspice
    • RF and Microwave
    • Video
    • Power Management
    • Precision ADCs
    • FPGA Reference Designs
    • Linux Software Drivers

    Product Forums

    • Amplifiers
    • Microcontrollers
    • Clock and Timing
    • Data Converters
    • Direct Digital Synthesis (DDS)
    • Energy Monitoring and Metering
    • Interface and Isolation
    • MEMS Inertial Sensors
    • Power Management
    • Processors and DSP
    • Switches/Multiplexers
    • Temperature Sensors
    • Voltage References
    View All

    Application Forums

    • A2B
    • Audio
    • Automated Test Equipment (ATE)
    • Condition-Based Monitoring
    • Depth, Perception & Ranging Technologies
    • Embedded Vision Sensing Library
    • Motor Control Hardware Platforms
    • Precision Technology Signal Chains Library
    • Video
    • Wireless Sensor Networks Reference Library

    Design Center Forums

    • ACE Evaluation Software
    • ADEF System Platforms
    • Design Tools and Calculators
    • FPGA Reference Designs
    • Linux Software Drivers
    • Microcontroller no-OS Drivers
    • Power Studio Designer
    • Power Studio Planner
    • Reference Designs
    • Robot Operating System (ROS) SDK
    • Signal Chain Power (SCP)
    • Software Interface Tools
    • System Demonstration Platform (SDP) Support
  • Learn

    Highlighted Webinar

    Maximize Workflow: Analog Devices eShop New Upload Tools

    Join us for an exciting webinar where we will unveil and demonstrate our new bulk ordering and bulk quoting tools! Discover how you can streamline your...

    Places

    • ADI Academy
    • ADI Webinars
    • Video Annex
    • Virtual Classroom

    Libraries

    • 3D ToF Depth Sensing Library
    • Continuous-Wave CMOS Time of Flight (TOF) Library
    • Embedded Vision Sensing Library
    • Gigabit Multimedia Serial Link (GMSL) Library
    • Optical Sensing Library
    • Precision Technology Signal Chains Library
    • Software Modules and SDKs Library
    • Supervisory Circuits Library
    • Wireless Sensor Networks Library

    Latest Webinars

    • Power Management Fundamentals II Session 6: Key Layout Considerations for Power
    • Power Management Fundamentals II Session 5: Deeper Look into Power Protection
    • Power Management Fundamentals II Session 4: Isolated Converters Explained
    • Designing for Silence: EMC Testing and Reduction for Digital Isolators and DC-DC Converters
    • Maximize Workflow: Analog Devices eShop New Upload Tools
    View All Webinars
  • Community Hub

    Challenge Yourself!

      KCC's Quiz AQQ293 about finding the cat

      1. First, the quote of the week: " The best measure of a man's honesty isn't his income tax return. It's the zero adjust on his bathroom scale " - Unknown...

    View All

    What's Brewing

      Read a Blog, Take this Quiz for Another Chance to Win a Gift Card!

      Important: Read the blog first . The quiz questions are all based on the content from the blog: White Coats and Multi-Coloured Pens Ready to put...

    View All

    Places

    • Community Help
    • Logic Lounge
    • Super User Program
    • Analog Dialogue Quiz

    Resources

    • EZ Code of Conduct
    • EZ How To Help Articles
    • Getting Started Guide
    • ADI: Words Matter
    • Community Help Videos
    View All
  • Blogs

    Highlighted Blogs

    Powering the Future: Multiphase Buck-Boost Innovation for Telecom: Part 3 of 3

    How can we meet the growing power requirements of the future? 5G network deployments necessitate high-efficiency power conversion solutions capable of...

     

    Freedom from Interference: Control of Mixed ASIL Criticalities

    Interference, within the context of Functional Safety, refers to a situation in which a failure in a component of a system may propagate to other components...

    Latest Blogs

    • High-Tech Pro and Crafty Creator: Meet Iulia, Our Inspiring Super User!
    • Apples and Oranges: A Comparative Study of DCM and CCM: Part 6 of 6
    • Understanding AXI-Stream Interfaces for DSP Data Pipelines
    • Importing Op Amp Models in LTspice: When All Else Fails, Customize the Symbol: Part 3 of 3
    • Inside the Bits: Digging Deeper with Part-Specific Register Examples
    Read All Blogs

    ADI Blogs

    • EZ Spotlight
    • The Engineering Mind
  • ContentZone

    Visit ContentZone

    ContentZone

    Technical articles. Blogs. Videos. Your ADI content, all in one place.

    View ContentZone

    Featured Content

    Featured Content Title

    Blurb About Content

    View Content By Industry

    • Aerospace and Defense Systems
    • Automotive Solutions
    • Consumer Technology Solutions
    • Data Center Solutions
    • Energy Solutions
    • Healthcare Solutions
    • Industrial Automation Technology Solutions
    • Instrumentation and Measurement Solutions
    • Intelligent Building Solutions
    • Wireless Communication Solutions

    View Content By Technology

    • A2B Audio Bus
    • ADI OtoSense Predictive Maintenance Solutions
    • Dynamic Speaker Management
    • Gallium Nitride (GaN) Technology
    • Gigabit Multimedia Serial Link (GMSL)
    • Industrial Vision
    • Power Solutions
    • Precision Technology
    • RF
    • Sensor Interfaces
    • SmartMesh
EngineerZone
EngineerZone
Ultra Low Power Microcontrollers
  • Log In
  • User
  • Site
  • Search
OR
Ask a Question
Ultra Low Power Microcontrollers
  • Microcontrollers
Ultra Low Power Microcontrollers
Documents "Why does my application run in DEBUG mode but not in RELEASE mode?"
  • Forums
  • File Uploads
  • Docs/FAQs
  • Members
  • Tags
  • Cancel
  • +Documents
  • +ADuCM3029: FAQ
  • -ADUCM302x: FAQ
    • "What is the highest UART baud rate that can be used while ensuring reliable communication?"
    • "Where can I find documentation related to ADuCM302x or ADuCM4050 software drivers (DFP, BSP)?"
    • "Why does my application run in DEBUG mode but not in RELEASE mode?"
    • Can I disable HFOSC ?
    • Can the part enter Hibernate/Shutdown with HFXTAL as root clock source?
    • Handling CRC in an IAR project for ADuCM302x
  • +ADuCM4050: FAQ
  • +RX FIFO: FAQ
  • +ADuCM4x50: FAQ

"Why does my application run in DEBUG mode but not in RELEASE mode?"

Some application examples might work in debug mode but not in release mode. This means that when you reset the microcontroller and try to run without a debugger connected, the application code might not execute as expected. This might be due to certain debug specific options being used in the application project. This FAQ describes how to overcome the problem. 

 

Applications such as some example applications accompanying ADuCM302x and ADuCM4050 software packs that use the 'DEBUG_MESSAGE' or 'DEBUG_RESULT' macros in their code, can hang in release mode because these macros map to the sprintf function that is supported via semi-hosting by default. Semi-hosting means, that the macros get executed only when a debugger is connected.

 

A workaround for this issue exists, and comprises of modifying the common.h file that can be found in the Include directory of the device driver (DFP) installation (typical path in case of IAR as an example: 'C:\Users\<user-name>\AppData\Local\IAR Embedded Workbench\PackRepo\AnalogDevices\ADuCM4x50_DFP\3.1.1\Include\common.h'). The common.h file can also be modified within IAR workbench where it would be available under the '<project-name>\CMSIS-Pack\Device Examples Support' directory within the project hierarchy in the IAR source browser. 

 

In the common.h file, modify the definitions of the DEBUG_MESSAGE and DEBUG_RESULT macros such that they don't map to sprintf function calls in case the NDEBUG macro is set. A modified common.h file is attached for reference. 

 

 

The NDEBUG macro is set automatically when the 'Release' configuration is selected in the project workspace (see example IAR snapshot below where the 'Release Mode' is being selected). As a result of this workaround - the application example should now be able to run through completely, in release mode as well. 

 

 

Note: With BSP revision 3.1.x and earlier revisions, there is an additional issue with the button_press example. In button_press.c, the application waits for a default number of core clock cycles, before exiting. As a result, even with the workaround above - while the application will run through completely in release mode, it would most likely exit too quickly for a user to experiment with pressing the buttons. To resolve this, modify the button_press.c file to comment out the default while() loop, and add a while(1) loop instead, that ensures that the user can freely experiment with the example in release mode for as long as required. 

 

Attachments:
common.h.zip
Tags: microcontrollers aducm4050 aducm3029 embedded_software
  • Share
  • History
  • More
  • Cancel
 
Related Content
  • RE: aducm 4050 quickstart pusbutton example question
    ADIApproved
    Hi , Unfortunately, there is a known issue with ADuCM302x and ADuCM4050 software packs (DFP and BSP, revision 3.1.x and earlier revisions) that might result in some application examples working in debug...
  • The Ultimate Guide to the ADF5355 Microwave Wideband Synthesizer
    stephenv
    Since it's release in early 2015, this integrated VCO / PLL synthesizer has been designed into a wide variety of applications and by designers of all levels of expertise. This document attempts to address...
  • RE: Generating makefile from command line
    THarris716
    Look forward to it, tnx. Meanwhile, I am duplicating these attempts applied to a different project. This time, when doing a "release" build it fails to find an .h file in one of the built in functions...
 
Related Content
  • RE: aducm 4050 quickstart pusbutton example question
    ADIApproved
    Hi , Unfortunately, there is a known issue with ADuCM302x and ADuCM4050 software packs (DFP and BSP, revision 3.1.x and earlier revisions) that might result in some application examples working in debug...
  • The Ultimate Guide to the ADF5355 Microwave Wideband Synthesizer
    stephenv
    Since it's release in early 2015, this integrated VCO / PLL synthesizer has been designed into a wide variety of applications and by designers of all levels of expertise. This document attempts to address...
  • RE: Generating makefile from command line
    THarris716
    Look forward to it, tnx. Meanwhile, I am duplicating these attempts applied to a different project. This time, when doing a "release" build it fails to find an .h file in one of the built in functions...
analog-devices logo

About Analog Devices

  • Who We Are
  • Careers
  • Newsroom
  • What We Do (Signals+)
  • Investor RelationsExternalLink
  • Quality & Reliability
  • Sales and Distribution
  • What's New on Analog.com
  • Contact Us

Find Help

  • Support
  • Resources
  • WikiExternalLink
  • Analog Dialogue
  • ADI Developer PortalExternalLink

myAnalog

Interested in the latest news and articles about ADI products, design tools, training, and events?

Go to myAnalog
  • Instagram page
  • Twitter page
  • Linkedin page
  • Youtube page
  • Facebook
  • Legal and Risk
  • Accessibility
  • Privacy Policy
  • Privacy Settings
  • Cookie Settings

©2025 Analog Devices, Inc. All Rights Reserved

analog-devices

About Analog Devices

Down Up
  • Who We Are
  • Careers
  • Newsroom
  • What We Do (Signals+)
  • Investor RelationsExternalLink
  • Quality & Reliability
  • Sales and Distribution
  • What's New on Analog.com
  • Contact Us

Find Help

Down Up
  • Support
  • Resources
  • WikiExternalLink
  • Analog Dialogue
  • ADI Developer PortalExternalLink

myAnalog

Interested in the latest news and articles about ADI products, design tools, training, and events?

Go to myAnalog
Instagram page Facebook Twitter page Linkedin page Youtube page
  • Legal and Risk
  • Accessibility
  • Privacy Policy
  • Privacy Settings
  • Cookie Settings

©2025 Analog Devices, Inc. All Rights Reserved