Embedded

Embedded system: Circuit, MCU, and PCB

Computer

Computer project: High-level programming

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.

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.

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.

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.

RP2040 UART in Baremetal

In this article, we will discuss how to use the UART on RP2040 in a bare metal application.

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.

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.

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.

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.

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.

RP2040 UART in Baremetal

In this article, we will discuss how to use the UART on RP2040 in a bare metal application.

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.

Keywords