Recent Updates
Sysinfo Logging
This article shows my approach to periodically record my server load with minimum overhead. A system timer executes a C program writes the system information into a page and cluster aligned file. The file is then downloaded from server to client and rendered using Javascript in HTML-SVG.
System information, sysinfo, CPU load, RAM, Swap, System call, Record, Memory page, Disk cluster, File map, C language, Javascript, SVG, Systemd-timer
ESP-32 Fast Memory Copy
This article demonstrates how to copy memory fast on Xtensa (ESP-32). It analyzes the Xtensa CPU architecture, the memory layout, and instruction support. Benchmarking shows the custom fast copy routine for aligned data copy in Assembly is about 10% faster than stdlib provided in ROM.
ESP-32, ESP-IDF, Xtensa, Memory, RAM, ROM, Flash, Cache, ISA, Instruction Set Architecture, memcpy, Alignment, Benchmarking
String Comparison Micro-optimization on X86, ARM and Xtensa
This article discusses the difference in GCC generated machine code between comparing a string character by character, as a whole multi-byte data unit, and using memcmp() function on X86, ARM and Xtensa for both aligned and misaligned strings. It analyzes the machine code generated by GCC, shows the code size, operation count and memory usage in different senorials.
C language, Assembly language, GCC, Optimization, X86, ARM, Xtensa, memcmp, stack
ESP-32 TCP Baremetal HTTP server
This article demonstrates how to use the low-level TCP/IP socket to build a HTTP server for static or fixed-length response and minimum HTTP response header on ESP-32 in ESP-IDF, without using the HTTP library. It also discusses how lwIP works for TCP/IP network socket send, shutdown and close.
ESP-32, ESP-IDF, TCP/IP, HTTP Server, lwIP, network socket, send, shutdown, close
RP2040 UART in Baremetal
In this article, we will discuss how to use the UART on RP2040 in a bare metal application.
Paspberry Pi Pico, RP2040, ARM, Cortex M0+, Baremetal, UART, Serial communication, MCU
Compare RP2040 Executable Memory Regions and Load Program From Flash into SRAM
Compare RP2040 executable memory regions (flash XIP space, striped SRAM and banked SRAM). Discuss memory strategies, data hazard and structural hazard. Load program from flash into SRAM then execute from SRAM.
Paspberry Pi Pico, RP2040, ARM, Cortex M0+, Assembly, Baremetal, Memory, Memory structural hazard, Linker script, Virtual memory address, Load memory address, MCU
Keywords
Assembly (8), ARM (7), MCU (7), Paspberry Pi Pico (6), RP2040 (6), Baremetal (6), AVR (6), Cortex M0+ (5), C language (4), RAM (3), Flash (3), ISA (3), Instruction Set Architecture (3), Bootloader (3), Embedded system (3), ESP-32 (2), ESP-IDF (2), Xtensa (2), Memory (2), Assembly language (2), GCC (2), UART (2), Linker script (2), XIP (2), AVR-GCC (2), disassembly (2), compiler (2), ABI (2), Application Binary Interface (2), object file (2), embedded (2), Stack (2), PDF (2), Web app (2), ATtiny (2), PCB (2), System information (1), sysinfo (1), CPU load (1), Swap (1), System call (1), Record (1), Memory page (1), Disk cluster (1), File map (1), Javascript (1), SVG (1), Systemd-timer (1), ROM (1), Cache (1), memcpy (1), Alignment (1), Benchmarking (1), Optimization (1), X86 (1), memcmp (1), stack (1), TCP/IP (1), HTTP Server (1), lwIP (1), network socket (1), send (1), shutdown (1), close (1), Serial communication (1), Memory structural hazard (1), Virtual memory address (1), Load memory address (1), Clock source (1), Clock tree (1), ROSC (1), Ring oscillator (1), XOSC (1), crystal oscillator (1), PLL (1), Phase locked loop (1), Dualcore (1), Multi-processor (1), W25Q (1), SSI (1), SDK (1), uf2 (1), Bearweb (1), PHP (1), Memory usage (1), Memory optimization (1), File size (1), OOM (1), Out of memory (1), Output buffer (1), stream (1), Web dev (1), Multilingual (1), Accept-Language (1), Navigator.language (1), Alternative language (1), SEO (1), HTML (1), lang (1), hreflang (1), Custome HTML Element (1), HTML dataset (1), AVR-AS (1), AVR-LD (1), linker (1), Bare metal (1), Memory layout (1), Static variable (1), local variable (1), optimization (1), Tiling (1), Enlarge (1), Divide large file (1), WS2812 (1), LED (1), LED stripe (1), Segment design (1), Parallel signal (1), CH340 (1), CH340E (1), USB (1), Interface IC (1), ATtiny25 (1), ATtiny24 (1), ATtiny441 (1), ATtiny261 (1), ATtiny2313 (1), ATtiny48 (1), Function frame (1), SP (1), Stack pointer (1), FP (1), Frame pointer (1), Engineering drawing (1), titleblock (1), 68hc11 (1), 6800 (1), microprocessor (1), ASCII (1), string (1), memory structure (1), printf (1), C (1), ISR (1), interrupt service routine (1), ISR_NAKED (1), avr-asm (1), CNC (1), KiCad (1), FlatCAM (1), PCB prototyping (1), Gerber (1), Level shifter (1), voltage (1), NMOS (1), diode (1), 2N7002 (1), LL4148 (1), circuit design (1), PCB layout (1), MODBUS (1), MODBUS RTU (1), PLC (1), serial (1), industry control (1), CRC (1), MSC-51 (1), 89C52 (1), Micro controller (1), Nixie tube (1), Clock (1),