
Preemptive vs Cooperative Scheduling in Embedded Systems
Preemptive schedulers take the CPU away on their own, cooperative ones wait for a task to yield. Compare latency, safety and code cost with FreeRTOS examples.
Everything you need to level up your coding skills.

Preemptive schedulers take the CPU away on their own, cooperative ones wait for a task to yield. Compare latency, safety and code cost with FreeRTOS examples.

Compare Linux IPC options for beginners: pipes, FIFOs, Unix sockets, shared memory, message queues, semaphores and signals, and which fits which job.

Use HAL_I2C_Mem_Read and HAL_I2C_Mem_Write on STM32 for sensor and EEPROM registers: shifted address, memory address size, timeouts and errors.

The kernel returns -errno in the result register, and the C library turns values from -4095 to -1 into errno and a return of -1. See the raw path and the rules.

Learn the HLASM instructions that move data between registers and storage, L, ST, LR, LA, STM and LM, with a traced example showing every register value.

Wrap per-thread atomics in crossbeam_utils::CachePadded to keep each on its own cache line in Rust, with size checks, scoped threads and a repr(align) option.

Read a Linux binary's CPU architecture, bit width, float ABI and loader with file, readelf -h, readelf -A and xxd, before you copy it to a board.

Learn the 6502 addressing modes: immediate, zero page, absolute, indexed with X and Y, indirect indexed and indexed indirect, with traced examples.

Follow a FreeRTOS context switch on Cortex-M4F from the yield request to the PendSV handler, and see which registers hardware stacks and which software saves.

Get memory aligned to 32, 64 or 4096 bytes with posix_memalign or C11 aligned_alloc, learn their rules and error codes, and pick the right one for SIMD or DMA.

Create an I2C bus with i2c_new_master_bus, attach a device with i2c_master_bus_add_device, and read registers with i2c_master_transmit_receive in ESP-IDF 5.3.

Run a program under strace, read each line as name, arguments and result, then filter, follow child processes and write the trace to a file to find real faults.
We send one email when a new post is published. No spam.