Debugging Information with DEBUG Print in IAR

Debugging Information with DEBUG Print in IAR

#include “stdafx.h” #include<stdio.h> #include<stdlib.h> #include<string.h> // Whether to enable DEBUG mode //#define _DEBUG_ 0 // Not enabled #define _DEBUG_ 1 // Enabled #if _DEBUG_ #define PRINTF(…) printf(__VA_ARGS__) #else #define PRINTF(…) #endif int main() { int a, b, c; b = 1; c = 2; a = b + c; PRINTF(“a = %d\n”, a); getchar(); return … Read more

Using Noinit Section and Variable Allocation at Specified Addresses in IAR

Using Noinit Section and Variable Allocation at Specified Addresses in IAR

The noinit section is familiar to most of us developers working with microcontrollers. If this section is used, it will be automatically allocated by the compiler to a region in the chip’s SRAM (note that it is in the RAM area, not Flash). Variables defined in this section will not be re-initialized during any chip … Read more

Setting Up IAR Toolchain in CLion

Setting Up IAR Toolchain in CLion

Operating System: Windows (MinGW) / Linux Project Format: CMake When setting up a toolchain for your embedded project, you can use the IAR compiler. CLion recognizes it as a C/C++ compiler and collects compiler information. You can also open projects that use the IAR toolchain, which should load successfully. Currently, only CMake-based projects are supported. … Read more

Considerations for Using IAR Development Environment with AVR Microcontroller

Considerations for Using IAR Development Environment with AVR Microcontroller

Header File Meanings avr_macros.h includes simplified writing for reading and writing 16-bit registers, along with several bit manipulation functions. comp_a90.h provides brief writing for a large number of intrinsic functions. ina90.h includes the “inavr.h” and “comp_A90.h” files. intrinsics.h provides intrinsic functions that offer the simplest operations for handling the processor’s low-level features: sleep, watchdog, FLASH … Read more

Controlling LED Lights with Zigbee Protocol

Introduction From this article, we officially step into the Zigbee protocol. This article will start with the basic Zigbee protocol, without using any packaged protocol stack. The content is migrated from a basic protocol template to the project, and has been updated to the code repository. Repository address: https://gitee.com/jeady5/zigbee-emaple Based on today’s project, I will … Read more

Common Issues and Solutions in STM32 Debugging

Common Issues and Solutions in STM32 Debugging

Click the above “Chuangxue Electronics” to follow and easily learn electronic knowledge. Chuangxue Electronics Subscription Daily updates on technical articles in the electronics industry and the latest news on microcontrollers, allowing you to learn easily anytime, anywhere. In the debugging of STM32 microcontrollers, a series of issues may arise. This article mainly introduces the possible … Read more

How Does printf() Integrate with UART Driver Functions?

How Does printf() Integrate with UART Driver Functions?

This is definitely a good article. Printing with this function is sometimes more useful than any debugging tool, and the kernel’s prink is a true gem. But how does the printf function connect with the UART driver? This article will answer that for you. Like, share, and bookmark it for when you need it. Today, … Read more

How printf() Works with UART Peripheral Driver Functions

How printf() Works with UART Peripheral Driver Functions

Today, I will share with you the hardware UART peripheral debugging output mechanism under IAR. In the embedded world, outputting print information is a very common auxiliary debugging method. With the help of print information, we can easily locate and analyze program issues. There are many ways to implement print information output in embedded application … Read more

Choosing Between Keil and IAR for Microcontroller Development

Choosing Between Keil and IAR for Microcontroller Development

Comparing the installation time of the latest Keil MDK V5.39 and IAR EWARM V9.50.1. var __INLINE_SCRIPT__ = (function () { 'use strict'; function _arrayLikeToArray$2(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; … Read more