How the IAR Linker Resolves Function Calls Across Files in ARM Cortex-M

In embedded systems — especially with microcontrollers like the STM32H5 (Cortex-M33) — linking is not just a toolchain step. It represents the final integration point where independently compiled code modules, memory layout constraints, and hardware-specific expectations converge into a working binary. Yet, many engineers treat the linker as a black box — something that “just […]

How the IAR Linker Resolves Function Calls Across Files in ARM Cortex-M Read More »

How the ARM Function Call Stack Frame Works (With C & Assembly Examples)

When writing low-level embedded C code for ARM Cortex-M, understanding the ARM function call stack frame is essential for analyzing memory usage, optimizing performance, and debugging hard faults. This post dives deep into the ARM calling conventions, stack frame setup, and the distinction between caller-saved and callee-saved registers — all through practical examples. ARM Cortex-M

How the ARM Function Call Stack Frame Works (With C & Assembly Examples) Read More »

Common RTC Issues in Embedded Systems (STM32) and How to Solve Them

When integrating a Real-Time Clock (RTC) into embedded systems, especially in ultra-low-power or time-critical applications, some issues may not become apparent until after deployment. These issues can result in unexpected behavior, data loss, or inaccurate timekeeping. Below is a comprehensive list of real-world RTC challenges commonly faced by developers and product teams, particularly when working

Common RTC Issues in Embedded Systems (STM32) and How to Solve Them Read More »

How to Generate Clock Output (MCO1/MCO2) on STM32H573

In embedded systems, sharing clock signals externally is often essential for synchronizing peripherals or other microcontrollers. Most of the popular Microcontrollers often need to share their internal clock signals with external components. The STM32H573 supports this via Microcontroller Clock Outputs (MCO) on two GPIO pins: PA8 (MCO1) and PC9 (MCO2). Whether you’re debugging clock issues or

How to Generate Clock Output (MCO1/MCO2) on STM32H573 Read More »

How to Interface External Flash with QSPI Using Bit Banging: A Step-by-Step Guide

Interfacing an external flash memory with a microcontroller is a common task in embedded systems to minimize unnecessary access to the MCU’s internal flash. Embedded firmware developers often use external flash for data logging, firmware storage, and IoT applications. External flash memory often includes communication interfaces such as I2C, SPI, or QSPI. System architects ensure

How to Interface External Flash with QSPI Using Bit Banging: A Step-by-Step Guide Read More »

MCU Startup Code: What Happens Before main() Runs (ARM Cortex-M Example)

MCU Startup code is the first piece of code executed by a microcontroller (MCU) immediately after a Power-On Reset (POR). Its main responsibility is to prepare the MCU’s hardware so that the actual application can run smoothly. The main purpose of start-up code initializes critical components such as the stack, system memory, and configuration settings.

MCU Startup Code: What Happens Before main() Runs (ARM Cortex-M Example) Read More »

IAR Linker Script for STM32: Complete Guide (Basic to Advanced) 🛠️

Understanding the linker script (.icf file) is crucial for achieving precise control over the memory layout when working with STM32 microcontrollers in IAR Embedded Workbench. Whether you’re a beginner just trying to flash an LED or an advanced embedded developer optimizing bootloaders, this guide walks you through IAR linker scripts—from the basics to the advanced

IAR Linker Script for STM32: Complete Guide (Basic to Advanced) 🛠️ Read More »