Hilo Semiconductor (Xuzhou) Co., Ltd.
Tech Blog
Tech Blog
A Must-Read for Beginners: A Complete Guide to IC Programming and the Full Program Download Process
April 9, 2026
Share:

When first getting started with embedded development, it can feel somewhat mysterious to see engineers connect a small box to a IC, tap a screen a few times, and watch the IC “come to life.” Some call it “programming,” some “downloading,” and others “burning.” In essence, all these terms refer to the same action: writing program code into the non‑volatile memory of a IC.

The Essence of Programming: Inscribing Zeros and Ones

Don’t be fooled by the word “burning.” No fire is involved — only electricity. Digital circuits recognize only two states: high and low logic levels, corresponding to binary 1 and 0. After compilation, the written program code generates a binary file (usually in .hex or .bin format) consisting of countless zeros and ones.

The essence of programming is to send voltage signals corresponding to these 0s and 1s into the Flash or OTP memory cells of the IC through dedicated pins, following strict timing requirements. The process is far more complex than file copying: it involves protocol matching, electrical specification verification, data integrity checks, and more, all of which must be performed precisely.

To use an analogy: a blank IC is like a blank sheet of paper, and the programmer is a precision pen that writes the logic designed by engineers onto it. Only when the IC is powered on and reads these instructions does it truly “come alive.”

Programming Methods: Offline and Online

Based on the physical location of the IC during programming, mainstream methods fall into two categories:

Offline programming, also known as pre‑programming, involves removing the IC from the circuit board, placing it into a programming socket to write the code, then soldering it back onto the board. This method is stable, reliable, and unaffected by peripheral circuits, making it suitable for small‑batch production and programming‑before‑mounting scenarios. Its drawback is the extra soldering step, resulting in lower efficiency.

Online programming (ICP) is the mainstream method for mass production today. The IC is already soldered onto the board, and the code is written directly through reserved debug interfaces, eliminating the need for desoldering. However, it imposes higher requirements on board‑level design — debug interfaces such as SWD or JTAG must be reserved during circuit design, otherwise later programming will be difficult.

Three Mainstream Programming Technologies: ICP, ISP, and IAP

In embedded development, programming technologies have matured into three systems, each suited for different stages and scenarios.

ICP (In‑Circuit Programming) is the most direct method. It manipulates the Flash memory directly through JTAG or SWD debug interfaces without relying on the IC’s built‑in bootloader. Taking ST‑Link as an example, the debugger sends commands to the IC via the SWDIO and SWCLK signals to erase and write Flash cells directly. ICP offers fast speed and supports single‑step debugging and real‑time register monitoring. For the STM32F7 series, a J‑Link debugger can achieve programming speeds of up to 2MB/s, over 10 times faster than ISP. The obvious downside is the need for an external dedicated debugger (costing hundreds to thousands of yuan), and it is less efficient for large‑scale mass production.

ISP (In‑System Programming) is more flexible. It uses the bootloader pre‑installed in the IC’s system memory to receive external firmware through standard interfaces such as UART or SPI, then writes it into the main memory area. A typical procedure is to set the IC into bootloader mode via the BOOT0 and BOOT1 pins, then send the binary file using a serial tool. ISP requires no board disassembly and is suitable for on‑site batch updates, but is limited by serial baud rates (typically ≤ 115200bps), resulting in slower programming speeds than ICP. The pre‑installed bootloader also occupies approximately 8KB of Flash space.

IAP (In‑Application Programming) is an upgrade solution for the IoT era. It divides Flash into a bootloader area and a user application area. When the MCU starts, it first runs the bootloader, which checks whether new firmware needs to be obtained remotely via UART, Wi‑Fi, or Bluetooth and written into memory. IAP requires no external tools and enables wireless remote updates, but its design and implementation are more complex and it occupies additional Flash space.

The Programming Process: From Erasure to Verification

A standard programming process consists of three indispensable steps.

Step 1: Erase. Clear existing data from the IC’s Flash. Most IC support full IC erase or sector‑by‑sector erase.

Step 2: Program. Also known as writing. The programmer sends the binary file byte by byte to the Flash memory cells at specified addresses using a specific protocol. This step has extremely high requirements for voltage accuracy and timing.

Step 3: Verify. After programming, read back the written data and compare it byte by byte with the original file. Only a successful verification confirms a complete programming operation. This is critical for quality assurance and must never be skipped.

The Three Essentials of Programming

Successful programming relies on three basic components.

The programmer is the core device, responsible for translating program files on a computer into electrical signals understood by the IC, while providing precise voltage and timing. Devices range from simple USB‑to‑serial adapters to high‑efficiency automatic mass‑production programmers, but their core functions are the same.

Programming software is the operating interface running on a computer. Engineers select the IC model, open program files, configure parameters, and control the entire process. Typical examples include Keil MDK, J‑Flash, and ST‑Link Utility.

Programming sockets or adapters serve as the physical bridge between the programmer and the IC. IC come in various packages — DIP, SOP, QFP, BGA — each requiring a socket with a matching pin layout to ensure reliable electrical connection. Online programming connects directly to the circuit board through reserved debug interfaces.

Final Notes

Programming may seem like a minor step in embedded development, but it bridges software design and hardware implementation. Understanding its principles and methods helps avoid common pitfalls such as unstable power supplies, poor contact, and incorrect algorithm selection.

HiloMax IC programming operation diagram, embedded IC program writing site
Copyright © HiloMax Semiconductor (Xuzhou) Co., Ltd.. All rights reserved Powered by Bomin