AI 资讯
Buildroot for Embedded Linux — Part 1: Your First Buildroot Root Filesystem
Buildroot builds a cross-compiler, a Linux kernel and a complete root filesystem from source, driven by one Kconfig-style configuration file. Starting from the qemu_arm_vexpress_defconfig that ships with Buildroot 2026.05.1, two commands produce a bootable ARM system you can run under QEMU. The images you ship are the ones in output/images/ ; output/target/ looks like a root filesystem but must never be copied to a device. This post starts a new hands-on series on Buildroot for embedded Linux. By the end of this part you will have built a working Buildroot root filesystem for an ARM target, booted it under QEMU, and understood which generated directories are safe to ship. Later parts add your own packages, a BR2_EXTERNAL tree, kernel and bootloader integration, and reproducible image output. If the choice between build systems is still open, our earlier Yocto vs Buildroot comparison covers it; this series assumes the decision is made. What you need A Linux host, several gigabytes of free disk space, and a network connection. No development board is needed for this part; QEMU stands in for the hardware. On a Debian or Ubuntu host, this covers the mandatory packages the manual lists, plus the ncurses development files that menuconfig needs: raghu@techveda.org:~$ sudo apt install build-essential diffutils patch gzip bzip2 perl tar cpio unzip rsync file bc findutils gawk wget libncurses-dev One rule from the manual is worth stating plainly: build everything as a normal user. Buildroot never needs root, and running it as root exposes your host to any package that misbehaves during installation. The command above is the only one in this post that uses sudo . Getting Buildroot and choosing a target Download and unpack the current stable release — 2026.05.1 at the time of writing — from buildroot.org/downloads , and work from that directory. Buildroot ships ready-made configurations for many boards and emulated machines, one file each in configs/ , and make list-defconfigs
AI 资讯
LighthouseReckoning: A Lightweight LoRa Mesh Network for Arduino, ESP32 and RP2040
LighthouseReckoning LighthouseReckoning is a lightweight LoRa mesh networking library for Arduino-compatible microcontrollers, currently tested on ESP32 and RP2040 with SX126x LoRa radios. What is LighthouseReckoning? The goal is simple: Sensor → Relay → Relay → Home One node acts as the Home node . Other nodes automatically determine a path toward it. A node does not need to know the entire network topology. Instead, nodes exchange information about their distance to Home and select a suitable neighboring node as their next hop. For example: Sensor | v Sensor → Relay → Relay → Home ^ | Sensor This allows nodes to communicate over multiple hops without manually configuring routes. How does routing work? Each node keeps track of information about its neighbors and their distance to Home. For example: Node Distance Home 0 hops Relay A 1 hop Relay B 2 hops Sensor C 3 hops Sensor C can therefore forward its data toward Relay B, which forwards it toward Home. When the network changes, nodes can update their routing information and select a different path. Hop-by-hop reliability LighthouseReckoning uses hop-by-hop confirmation instead of requiring one end-to-end acknowledgment. Sensor C → Relay A → Relay B → Home Sensor C only needs confirmation that Relay A received its packet. Relay A then handles the next hop independently. This allows each node to deal with retries locally instead of requiring Home to maintain the state of every route in the network. Using the library A basic node can be initialized with: #include <RadioLib.h> #include <LighthouseReckoning.h> LighthouseReckoning lhr ; void setup () { // Initialize your LoRa radio here lhr . beginAsNode ( & radio , 0xA1B2C3D4 ); } void loop () { lhr . update (); uint8_t payload [] = { 0x01 , 0x02 , 0x03 }; // Send application data when needed lhr . sendData ( payload , sizeof ( payload )); } The Home node uses beginAsHome() and can receive application data through the library's callback mechanism. The library is design
AI 资讯
How to Use the SH-C30L USB-to-CAN Adapter with Arduino UNO and MCP2515
Controller Area Network (CAN) is one of those technologies that quietly powers a huge number of embedded systems. It is commonly found in cars, EVs, industrial controllers, robotics, and other distributed systems where multiple devices need to exchange data reliably over a shared bus. For development and debugging, it is useful to connect that CAN network to a computer. The problem is that a standard computer communicates through USB, while CAN uses a dedicated differential bus. A USB-to-CAN interface solves this problem by translating between the two. In this project, we will explore the DSD TECH SH-C30L USB-to-CAN adapter , learn how its different firmware modes work, connect it to a PC, and then use an Arduino UNO with an MCP2515 CAN module to create a simple bidirectional CAN communication setup. The goal is not just to make the hardware work, but also to understand what happens between the Arduino, CAN bus, USB adapter, and computer. SH-C30L USB-to-CAN Adapter Overview The SH-C30L is a compact USB-to-CAN interface designed to connect a computer directly to a CAN network. It is based on an STM32F072C8T6 microcontroller, which contains an integrated CAN controller. This allows the adapter to handle CAN protocol processing without requiring a separate external CAN controller. The microcontroller communicates with the computer through USB, while a dedicated CAN transceiver handles the physical CAN interface. The transceiver converts the controller's logic-level signals into the differential CAN_H and CAN_L signals used on a CAN network. One of the interesting aspects of the SH-C30L is its firmware flexibility. The adapter can work with Candlelight firmware , which allows it to operate with Linux SocketCAN and compatible CAN applications, or with SLCAN firmware , where it behaves more like a serial CAN interface. This makes the same hardware useful with different operating systems and software environments. The adapter supports both CAN 2.0A and CAN 2.0B frames, wit
AI 资讯
Reverse-Engineering SWIO: Why Existing CH32V003 Programmers Fail and How I Built One That Works
I wanted to see if an ESP32-S3 could be used as a programmer for the WCH CH32V003 instead of using a dedicated WCH-Link. The final setup is: PC → ESP32-S3 → SWIO → CH32V003 The ESP32-S3 handles the timing-sensitive SWIO communication and the CH32 debug/DMI interface. On top of that I implemented target detection, memory access, flash unlock, page erase, programming, read-back verification and reset/run. Hardware ESP32-S3 N8R2 CH32V003A4M6 (SOP-16) 4.7kΩ–10kΩ SWIO pull-up CP6208 motor driver Small DC motor 3.7V Li-ion battery Breadboard Important connections: ESP32-S3 GPIO10 → CH32V003 SWIO ESP32-S3 3.3V → CH32V003 VDD Common GND External pull-up on SWIO CH32V003 PC4 → CP6208 control input The software stack The programmer is split into several layers: text PC │ │ Python host tool ▼ ESP32-S3 │ │ SWIO ▼ WCH DMI │ ▼ CH32V003 debug module │ ▼ Abstract commands / program buffer │ ▼ Flash controller The ESP32-S3 is doing the SWIO timing directly rather than relying on a separate programmer IC. I used existing open-source CH32/SWIO implementations as references, particularly CNLohr's CH32V003 work and BlueSyncLine's SWIO implementation. Getting SWIO working The first versions did not work. One of the early failures was: SWIO sync: FAILED DMCFGR = 0xFFFFFFFF I had to work through the SWIO startup sequence, timing, receive behavior and physical wiring before getting reliable target responses. Once it was working, the programmer reported: SWIO sync: OK DMI communication: OK Target detect: OK CH32 ID = 0x0713BB91 Target memory read: OK That gave me a stable base for the flash implementation. Flash programming I then added the flash controller operations: flash unlock 64-byte page erase fast page programming read-back verification target reset/run One useful milestone was observing the flash lock transition: FLASH_CTLR before unlock: 0x00008080 FLASH_CTLR after unlock: 0x00000200 After that I tested programming and verification using deterministic data. The programmer was able
AI 资讯
Choosing a Root Filesystem Format for Embedded Linux
Your storage hardware narrows the choice first: raw NAND requires UBIFS on UBI; ext4 and f2fs are not candidates there. On managed flash such as eMMC, our default is a read-only squashfs root plus a writable data partition, which pairs cleanly with A/B updates and integrity verification. Choose a plain ext4 root instead when your product needs a writable root and your team values familiar recovery tooling over immutability. Every embedded Linux product ships a root filesystem, and its format is often chosen by default — the vendor BSP generated ext4, so the product ships ext4. It is a real decision with long-term consequences for updates, power-cut behaviour and flash wear. This article works through the root filesystem format decision for the four realistic candidates: ext4, f2fs, squashfs with overlayfs, and UBIFS. The context The root filesystem format decision arises early, usually when the build system asks for it — Yocto through IMAGE_FSTYPES , Buildroot through its Filesystem images menu. Both can generate all four formats, so the build system does not constrain you. Five forces do. Storage technology. Raw NAND attached through the kernel's MTD layer exposes eraseblocks that wear out and can go bad; the filesystem stack must manage wear levelling and bad blocks itself. Managed flash — eMMC, SD, UFS — hides all of that behind an internal controller (an FTL) and presents an ordinary block device. Block filesystems such as ext4, f2fs and squashfs require a block device; UBIFS requires UBI on MTD. The hardware choice between raw NAND and managed flash removes half the candidates before any software argument starts. Update strategy. With image-based A/B updates — the model we recommended in Choosing an A/B Update Layout for Your Product — the root filesystem is replaced as one complete image, so a read-only format fits naturally. Package-based updates on the device require a writable root. Power-cut behaviour. Embedded devices lose power without warning. A never-w
AI 资讯
The Mindset Behind Hard Debugging
Hard debugging is rarely defeated by a lack of tools. It is defeated by three quiet habits: assuming the fault is where the symptom appears, clinging to the first explanation, and hoping a tool will do the thinking. A difficult fault is usually lost to those habits before you read a line of code. The engineers who resolve hard faults are the ones who notice these defaults and replace them with a patient, evidence-first mindset. Most hard bugs are lost before we touch them, in the attitude we bring to the session. When something breaks, the average person rushes in with three quiet habits: they assume the fault lives exactly where it shows up, they cling to the first explanation their mind offers, and they hope a tool or a smarter person will tell them what to do next. Those habits feel natural, but on hard faults they are exactly what keep us stuck. Put two engineers on the same failing board. One finds a way through in an afternoon; the other is still going three days later. The difference is rarely raw intelligence or how many commands they know. It is the mental posture each brings to the work before the first step. Handling a hard debug session is less about knowing every tool and more about managing your own assumptions, reactions, and impatience. A tough problem is usually lost in your mindset before it is lost in your methods. Habit one: starting too narrow The first habit is to fix on the most visible symptom and refuse to look anywhere else. Something breaks, so we stare at the last thing we changed, and we return to it because it is familiar and close at hand. When the answer is not there, we look harder in the same place instead of stepping back. Here is what that looks like on real hardware. A device keeps dropping off the bus. You are a kernel person, so you open the driver and read it, carefully, for three days: the probe path, the error handling, the power-management callbacks. Every line is correct, and the device still fails. The fault was a layer b
AI 资讯
Crypto-Agility Without a Redesign: The "Soft-Fade-Out" Pattern for Legacy IoT Silicon
Most conversations about CRA, DORA, and NIS2 compliance for IoT hardware boil down to one uncomfortable binary: redesign the board around newer, security-capable silicon, or accept that your existing product line falls out of compliance on a fixed deadline. For a product with years left in its lifecycle and a BOM that took months to qualify, "just redesign it" is rarely a real answer. There's a third option that gets far less attention than it deserves: pair the legacy chip with a modern security co-chip that absorbs the cryptographic boundary, while the legacy part keeps doing exactly what it already does well - application logic, peripherals, display, sensor polling. Call it a soft fade-out. The old silicon stays in service until its natural end-of-life; the compliance gap gets closed by a second, much cheaper part sitting next to it, not by replacing it. The Three Gaps a Legacy Chip Has - and Why a Co-Chip Fixes Them The regulatory pressure driving all of this isn't abstract. NIST finalized its post-quantum cryptography standards in 2024, and IR 8547 sets real dates: ECDSA and RSA are deprecated after 2030, disallowed after 2035. Germany's BSI has gone further - TR-02102-1 (2026 edition) sets a stricter 2030 deadline for high-protection-need data, and treats the migration as "alternativlos" (without alternative) rather than a recommendation. Older embedded silicon typically lacks three things simultaneously: a hardware-isolated key store (TEE/APM), side-channel countermeasures (DPA protection) strong enough for physical-access threat models, and enough RAM/compute headroom to run lattice-based PQC algorithms in software without starving the rest of the firmware. Redesigning the whole board to fix all three at once is expensive and slow. But none of those three gaps require touching the part that's already doing its job - they're all boundary problems. A second, purpose-built chip can own the boundary. Three concrete pairings Using the ESP32 family as a worked exa
AI 资讯
Architecting Mainline-Friendly Products
Mainline-friendly products are designed so their board support lives in upstream Linux, U-Boot, and standard build systems instead of a vendor fork. The decision is architectural, not aspirational: it is made when you choose the SoC, design the add-on connectors, and write the device tree — not when the product is already shipping. This article gives the strategic case, the product design rules that follow from current kernel work on hot-pluggable add-on boards, a vendor checklist for tech leads, and the concrete steps to upstream your own board support. We have covered why silicon vendors are moving to upstream-first BSPs . This article covers the product team's side of that shift: what you should do about it. Building mainline-friendly products means making a set of design decisions — SoC selection, connector design, device tree structure, and an upstreaming plan — so that mainline Linux and U-Boot treat your board as a normally supported board rather than as a permanent private port. Each section below turns one of those decisions into rules you can apply on your next board. Why mainline-friendly products are a strategic decision The cost of a vendor-fork BSP is not paid at bring-up; it is paid for the life of the product. Every kernel upgrade becomes a forward-port of private patches. Every security fix arrives on the vendor's schedule, not the kernel's — and for devices in scope of regulations such as the EU Cyber Resilience Act, patch latency is now a compliance question, not just an engineering one. Hiring is harder, because engineers must learn your fork before they can touch it, and the knowledge they build does not transfer in either direction. Board support that lives in mainline inverts each of these. New kernels are more likely to boot your board without forward-porting private support patches, because your board is part of the kernel's own build-and-test surface; LTS security fixes are easier to consume because the code paths you depend on are already
产品设计
The First Computer Bug Was a Real Moth
If you have ever stared at a misbehaving circuit at two in the morning, muttering about the "bug" you cannot find, you are part of a lineage that runs back to a very literal insect. On September 9, 1947, engineers working on Harvard's Mark II computer opened up the machine, found a moth wedged inside a relay, and taped it into their logbook. The note beside it reads: "First actual case of bug being found." It is one of the most charming artifacts in the history of computing, and it carries a surprisingly practical lesson for anyone who builds connected hardware today. What actually happened in 1947 The Mark II was an electromechanical monster: a room-sized calculator built from thousands of relays, switches that physically clacked open and closed to represent ones and zeros. On that September day the machine was producing errors, and the operators -- part of the U.S. Navy computing effort that Grace Hopper worked in -- traced the fault to Relay #70 in Panel F. Inside was a moth, its wings shorting across the contacts. They removed it, taped it into the logbook at 15:45, and recorded the now-famous line. That page, moth still attached, lives today in the Smithsonian's National Museum of American History. Hopper loved telling the story for the rest of her career, which is why her name is forever attached to it. She is often credited with coining "bug" and "debugging" because of that moth, but the honest history is a little different, and the difference is the interesting part. The word "bug" was already old Engineers had been calling faults "bugs" for decades before 1947. Thomas Edison used the term in an 1878 letter to describe the little glitches and "difficulties" that show up when a new invention meets the real world. By the early twentieth century "bug" was common shop-floor slang among electrical and telephone engineers. So the moth did not invent the word. What made the logbook entry so memorable is the joke buried in it: "first actual case of bug being found"
AI 资讯
Tesla Built the First Wireless Remote Control
In 1898, years before radio broadcasting existed and decades before anyone used the word "electronics," Nikola Tesla stood in front of a crowd at Madison Square Garden and did something that looked like magic. In a large pool of water sat a small iron-hulled boat. With no wires connecting them, Tesla sent commands through the air and the boat obeyed, turning, stopping, and blinking its lights on demand. Spectators were so unprepared for the idea that some accused him of hiding a trained monkey inside the hull, or of controlling it with his mind. What Tesla had actually built was the first wireless remote control, and it is the direct ancestor of every connected device we make today. A machine that took commands through the air Tesla called his invention a "teleautomaton," from the Greek for "remote" and "self-acting." The boat carried a radio receiver, a set of relays, and a battery driving its motor and rudder. From a control box on the side of the pool, Tesla transmitted radio signals that the receiver decoded into physical actions. Press a control, and a coherer-based circuit closed a relay, which in turn stepped the boat's steering and switching mechanism to a new position. The patent behind the demonstration, US Patent 613,809, "Method of and Apparatus for Controlling Mechanism of Moving Vessels or Vehicles," was granted in November 1898. Read today, it is startling how modern the thinking is. Tesla was not just wiggling a boat around a pool for show; he was describing a general system for sending control signals to a remote machine and having that machine act on them without a human physically present. That is the exact problem statement behind modern IoT , just with vacuum-era hardware. Why nobody knew what to do with it Tesla saw enormous potential. He imagined remotely piloted vessels, automated vehicles, and machines that could carry out instructions from miles away. He even pitched the concept to the US military as a radio-controlled torpedo. The receptio
开发者
Fleet-Scale Robotics: Reliable USB Device Binding on NVIDIA Jetson Orin
If you have ever built an autonomous mobile robot, you have likely run into the dreaded "Shuffled USB Port" problem. You boot up your robot, fire up your ROS 2 launch files, and... crash. Your LiDAR driver is trying to parse data from your IMU, and your IMU node is screaming about invalid serial frames. Because Linux assigns virtual serial paths like /dev/ttyUSB0 and /dev/ttyUSB1 based purely on which device initialized milliseconds faster, relying on default OS paths is a recipe for system instability. When you are scaling up to dozens of Jetson Orin nodes —each equipped with an RPLIDAR C1 and a Yahboom 10-axis IMU —manually hardcoding paths or writing rigid scripts on every individual machine isn't viable. Here is how production-grade robotics fleets handle plug-and-play USB binding dynamically using configuration-driven udev rules. The Core Concept: Vendor ID vs. Physical Port vs. Serials Linux's udev (device manager) allows us to dynamically create stable symbolic links (symlinks) like /dev/rplidar and /dev/imu when hardware is plugged in. How we identify those devices determines our fleet's flexibility: USB Serials: Unique to each individual chip. Highly secure, but requires registering every single replacement sensor in your codebase. Physical USB Ports ( KERNELS ): Tied to a physical slot on the carrier board. Great if you have identical sensors, but forces technicians to plug cables into highly specific, undocumented ports. Vendor ID (VID) & Product ID (PID): Identifies the USB-to-serial converter chip on the sensor board. Because the RPLIDAR C1 uses a Silicon Labs CP210x chip ( 10c4:ea60 ) and the Yahboom IMU uses a QinHeng CH340 chip ( 1a86:7523 ), they use completely distinct silicon. This means we can map them dynamically and reliably using just their VID/PID —allowing field technicians to plug them into any USB port on the Jetson without breaking the system. Step 1: The Configuration-Driven File ( devices.conf ) Hardcoding vendor rules inside shell scri
AI 资讯
Why ARM Chips Power Nearly Every IoT Device
Look inside almost any modern connected device -- a smartphone, a smartwatch, a Wi-Fi thermostat, a battery-powered sensor node -- and you will find a processor core designed by ARM. It is one of the most successful engineering ideas in computing history. And here is the strange part: ARM has never manufactured a single one of those chips. It does not own a factory. It sells blueprints. A three-person project in Cambridge The story starts at Acorn Computers in Cambridge, England, in the early 1980s. Acorn had built the BBC Micro, a hugely popular educational computer in the UK, and it needed a faster processor for its next machine. The commercial chips available at the time were disappointing, so a tiny team decided to design their own. The acronym everyone knows today originally stood for Acorn RISC Machine . Sophie Wilson designed the instruction set and wrote the simulator; Steve Furber led the physical chip design. RISC -- Reduced Instruction Set Computing -- was the key bet. Instead of piling on complex instructions, they kept the instruction set small and simple, which made the chip easier to build, cheaper, and remarkably power-efficient. The first silicon, the ARM1, was fabricated by VLSI Technology and delivered to Acorn on 26 April 1985. When the team powered it on, it simply worked -- first try. For anyone who has designed hardware, that is almost unheard of; new processors normally need several rounds of revisions to shake out design errors. A famous piece of Acorn lore is that the early ARM chips drew so little current they could keep running on leakage alone after the power was disconnected. From a British computer to the whole world Acorn the computer company faded, but the processor design did not. In 1990 the ARM team was spun out into a separate joint venture, and the acronym was quietly re-expanded to Advanced RISC Machines . The new company made a decision that defined its future: it would not build chips. It would license the designs and let oth
AI 资讯
The First Microcontroller Was the TI TMS1000 (1974)
Ask most people to name the chip that started modern electronics and they will say the microprocessor. But there is a quieter hero inside almost everything you own that beeps, blinks, or connects to the internet: the microcontroller. And the first one you could actually buy shipped in 1974 as the Texas Instruments TMS1000. Microprocessor vs. microcontroller The distinction matters. A microprocessor, like Intel's famous 4004, is just the processing core. To build anything useful with it you still have to wire up separate memory chips, input/output controllers, and support logic on a circuit board. A microcontroller collapses all of that onto a single piece of silicon: the CPU, the ROM that holds your program, the RAM that holds your data, and the I/O pins that talk to the outside world, all in one package. That is exactly what the TMS1000 did. Designed by Texas Instruments engineers Gary Boone and Michael Cochran, it was a 4-bit device using a Harvard architecture, meaning it kept program memory and data memory in separate spaces so it could fetch an instruction and read data at the same time. One chip in, one chip out, and you had a complete tiny computer dedicated to a single job. Cheap enough to put in everything The genius of the TMS1000 was not raw power, it was economics. In 1974 you could buy the chips in volume for around two dollars each. By 1979, Texas Instruments was selling roughly 26 million of them every year. That price point changed what engineers could build. Suddenly it made sense to drop a small, programmable brain into products that never would have justified a full computer. You have almost certainly held one. The TMS1000 family ran the Speak & Spell, the Big Trak programmable toy vehicle, and the electronic memory game Simon, along with countless calculators, microwave ovens, and appliances. Each one was doing the same fundamental thing an IoT node does today: read some inputs, run a fixed program, drive some outputs. Why this still matters for
AI 资讯
Why Is It Called the Raspberry Pi?
If you have ever wired a sensor to a Raspberry Pi or run your first Python script on one, you have used a device whose name hides two small jokes and one very deliberate design decision. Why is it called the Raspberry Pi? The short answer: "Raspberry" is a nod to a decades-old tradition of naming computers after fruit, and "Pi" is short for Python, the programming language the board was originally built to run. Both halves say something about where the machine came from, and why it went on to become a staple of IoT and embedded development. The fruit tradition behind "Raspberry" The "Raspberry" is not random. In the early decades of personal computing, a surprising number of companies named themselves after fruit. Apple is the obvious one, but there was also Acorn Computers (the British firm whose ARM architecture now sits inside nearly every phone and microcontroller on Earth), Apricot Computers, and Tangerine. When Eben Upton and his collaborators at the University of Cambridge set out to build a cheap computer to teach kids to code, choosing a fruit name placed the project squarely in that lineage. Upton has also cheerfully admitted the name is a bit of a pun, a wink at "blowing a raspberry" and at raspberry pie the dessert. Why "Pi" stands for Python The "Pi" is the part that reveals the machine's original purpose. As Upton has explained in interviews, the plan was to produce a computer that could really only run one thing well: Python. So the "Pi" in the name is a compressed reference to Python . It doubles neatly as a nerdy nod to the mathematical constant, but Python was the driving idea. That original intent matters because it explains the board's whole philosophy. The Raspberry Pi was never meant to be a powerhouse. It was meant to be cheap enough that a student could own one, simple enough that a beginner could learn on it, and open enough that it ran a full Linux operating system with Python ready to go. During development the design grew more capable tha
AI 资讯
The First Digital Camera Was Built in 1975
Every camera-equipped connected device you build today, from a smart doorbell to an ESP32-CAM streaming frames over Wi-Fi to a factory machine-vision rig, is a descendant of one clunky, toaster-sized prototype: the first digital camera , built at Eastman Kodak in December 1975. It weighed about 8 pounds, took 23 seconds to capture a single 0.01-megapixel black-and-white image, and recorded that image to a cassette tape. It looked like a science-fair project, but it proved a radical idea that underpins the entire IoT sensing industry: an image could be captured, digitized, and stored as data with no film at all. An engineer, a side project, and a CCD The camera was built by a 24-year-old Kodak engineer named Steven Sasson . His manager had handed him a loose assignment: could the newly invented charge-coupled device (CCD) image sensor be used to build a camera with no moving film? The CCD, developed at Bell Labs in 1969, converts light falling on an array of tiny capacitors into electrical charge, pixel by pixel. Sasson took a Fairchild 100-by-100-pixel CCD, bolted it to a lens from a Super 8 movie camera, added a digitizer, and wired the output to a portable cassette recorder. The result captured just 0.01 megapixels, a grid of 10,000 pixels. To view a photo, Sasson's team built a custom playback rig that read the tape and painted the image onto a television screen. That first image, a Kodak lab technician, took 23 seconds to write to tape and several more to display. Crude, yes, but it was the first fully electronic, filmless photograph. Why Kodak shelved the future Here is the twist that every embedded engineer should remember. Kodak owned the patent on the first digital camera, but the company made its money selling film, chemicals, and photo paper. Executives saw a filmless camera as a threat to that business, so the project was quietly set aside. Kodak did file the patent in 1978 and collected licensing revenue for decades, but it never led the digital transiti
AI 资讯
Python vs C++ for Embedded Systems: When to Use Each
When you first step into the world of embedded systems, one of the earliest and most consequential decisions you will face is choosing a programming language. Two names come up more than any others: Python and C++. Both are powerful, both have passionate communities, and both are genuinely useful — but for very different reasons and in very different contexts. This article is not about declaring a winner. It is about understanding why each language exists in this space, what trade-offs you are actually making, and how to make a confident, informed decision for your next project. Understanding the Fundamental Difference Before comparing features, it helps to understand why these two languages feel so different at a deeper level. C++ is a compiled, statically-typed, systems-level language . When you write C++, you are writing code that gets translated directly into machine instructions. You manage memory manually. You control exactly when objects are created and destroyed. The hardware does precisely what you tell it to, nothing more and nothing less. This directness is both its superpower and its source of complexity. Python, by contrast, is an interpreted, dynamically-typed, high-level language . A Python runtime sits between your code and the hardware, managing memory automatically through garbage collection, resolving types at runtime, and handling a lot of bookkeeping so you don't have to. This makes Python wonderfully expressive and fast to write, but it introduces overhead that matters enormously on constrained hardware. The mental model to hold onto is this: C++ gives you control, Python gives you speed of development . Both are valuable. The question is which one your project needs more. Where C++ Shines in Embedded Systems 1. Bare-Metal and Resource-Constrained Environments If you are programming a microcontroller like an STM32, an AVR ATmega, or an ESP32 running its native SDK, C++ is almost always your primary language. These devices often have kilobytes —
开发者
How a Hollywood Star Helped Invent Wi-Fi
One of the most important ideas in modern wireless communication did not come out of a corporate research lab or a defense contractor. It was patented in 1942 by one of the most famous movie stars of the era, working alongside an avant-garde composer. The actress was Hedy Lamarr, and the technique she helped invent, frequency hopping , is a direct ancestor of the Wi-Fi, Bluetooth, and GPS signals your devices rely on every day. The patent Hollywood forgot At the height of her Hollywood fame, Hedy Lamarr was also a self-taught inventor who tinkered between film shoots. Early in World War II she became fixed on a hard problem: radio-controlled torpedoes were easy to jam, because an enemy who found the single control frequency could simply drown it in noise and send the weapon off course. Working with composer George Antheil, she designed a system where the transmitter and receiver would rapidly and secretly switch together across many different frequencies. Antheil, who had once synchronized sixteen player pianos for a concert piece, suggested using a slotted paper roll like a player piano to keep both ends hopping in step across 88 frequencies , the same number as the keys on a piano. On August 11, 1942, they received U.S. Patent 2,292,387 for a "Secret Communication System." The U.S. Navy filed the idea away and did not use it during the war. For decades the patent sat largely forgotten, and Lamarr received no money and little recognition for it in her lifetime. She was finally inducted into the National Inventors Hall of Fame in 2014, years after her death. What frequency hopping actually does The core insight is deceptively simple. Instead of putting a signal on one fixed frequency, you spread it across many frequencies in a pattern that only the sender and receiver know. Both ends "hop" in perfect synchronization, dwelling on each frequency for only a fraction of a second before jumping to the next. This buys you two enormous advantages. It is very hard to jam, b
产品设计
Why IoT Modules Still Use 1981 AT Commands
If you have ever wired up a cellular modem, a WiFi module, or a Bluetooth radio and typed something like AT+CGMR into a serial terminal, you have used a command language that is older than most of the engineers using it. The humble AT command set that still configures a huge share of today's connected hardware was born in 1981 , with a device called the Hayes Smartmodem. Four decades and billions of devices later, it refuses to die, and that longevity has a lesson in it for anyone building embedded systems. What AT actually stands for When Dennis Hayes and his company released the Hayes Smartmodem 300 in 1981, they faced a small but real design problem: how does a computer tell a modem the difference between a command to the modem and data to be sent down the phone line ? Their answer was an attention sequence. Every command line began with the two letters AT , short for attention , which told the modem to wake up and listen to what followed. ATD dialled a number, ATH hung up, and so on. It was readable, it was easy to implement on the microcontrollers of the day, and crucially you could type it by hand to debug a link. That simplicity is exactly why it spread. Competing modem makers cloned the Hayes command set to stay compatible, it became a de facto industry standard, and later it was formally captured in telecom standards. A convention that started as one company's pragmatic shortcut turned into the lingua franca of getting a device onto a network. From phone lines to the Internet of Things Here is the part that surprises people. The AT command set never retired when dial-up modems did. It quietly migrated into the components that make modern IoT possible. Cellular modules that put a device on a 4G or LTE network, from vendors like Quectel, SIMCom, and u-blox, are almost universally driven by AT commands. Classic Bluetooth and many WiFi modules expose an AT interface too. Even the ESP8266 and ESP32, the microcontrollers behind an enormous number of hobby and com
AI 资讯
Memory Chips
Memory Chips Supply chain strategy from electronics production engineering, 500–50k units/year Introduction "Order from Digi-Key" is a prototyping strategy, not a production strategy. The 2020–2023 IC shortage demonstrated that supply chain resilience must be designed in — not improvised when lead times hit 52 weeks. The Sourcing Tier Structure Tier Examples MOQ Price Premium Lead Time Risk Authorized dist. Digi-Key, Mouser, Newark 1 pc +25–40% 1–3 days (stock) Lowest Franchise dist. Arrow, Avnet, TTI 100–1k Baseline 2–8 weeks Low Manufacturer direct TI, Infineon, ST portals 1k–10k+ −10 to −30% 8–20 weeks Low Regional aggregators IC-Online, local dist. Mixed Variable Variable Medium Spot market Brokers, eBay 1 pc +50 to +500% Days High Never use spot market for ICs without incoming inspection. Counterfeit STM32, ESP32, and common analog ICs are well-documented. Volume Pricing Reality Illustrative for a $2.50 MCU: Volume Digi-Key Arrow/Avnet Manufacturer Direct 100 $3.10 $2.65 N/A 1,000 $2.75 $2.15 $1.85 10,000 $2.40 $1.70 $1.25 50,000 $2.10 $1.40 $0.90 The franchise/direct savings are material at 1k+ units. Establishing Arrow or Avnet relationships pays for the admin overhead within 2 production cycles. BOM Resilience Framework For each critical component, document: Primary source : authorized distribution or direct Secondary distributor : alternative channel for same part Alternate part : functionally equivalent, different manufacturer, validated Buffer stock : target weeks at production rate Lead time worst-case : historical peak, not current During normal periods: 4-week buffer, one secondary source, one qualified alternate. For 5+ year product lifecycles: qualify the alternate before you need it. Practical Sourcing Mix: 500–5k Units/Year Component Type Primary Secondary Notes Commodity passives Digi-Key/Mouser + Yageo/Walsin Arrow Annual pricing agreements MCUs < $3 Arrow direct IC-Online for gap fills 90-day POs, buffer stock MCUs $3–$10 Manufacturer direct + A
AI 资讯
Firmware Black Box: diagnosing embedded resets in the field
A device that resets in the field is not always the hardest problem. The harder problem is a device that resets, comes back online, and leaves no evidence about what happened before the reboot. That is where a firmware black box becomes useful. This is the DEV.to edition of a Silicon LogiX technical article. The canonical English source is linked at the end. What a firmware black box is A firmware black box is a small diagnostic subsystem inside the firmware. Its job is to preserve enough information to support post-mortem analysis after a reset, watchdog event, HardFault, panic or unexpected reboot. It does not need to record everything. It needs to record the data that helps answer the first diagnostic questions: why did the device reset? how long had it been running? which firmware build was installed? what state was the application in? which task was active? did the watchdog fire? did memory, stack or heap margins collapse? did the network, modem, BLE, Wi-Fi or OTA flow fail just before the reboot? Without that data, every field reset deletes most of the evidence. Why sporadic resets are expensive Rare embedded bugs are often more expensive than obvious failures. A crash that happens every time in the same function can usually be analyzed with a debugger, logs and a repeatable test. A reset that appears once every ten days on a customer device is different. The cause may depend on a combination of: temperature unstable power brown-out cable length enclosure heating network drops modem state memory fragmentation stack exhaustion long uptime race conditions a peripheral that stops responding an OTA edge case In the lab, the product may look clean. In the field, the environment changes. The customer report often becomes: "it rebooted", "it stopped communicating", or "we had to power-cycle it". That is not enough for firmware diagnosis. What to capture A good first version does not need to be large. Start with a compact structure that survives the next boot: reset r