
Split Flash Into Bootloader and Application With Two Linker Scripts
Write two GNU linker scripts that share one flash layout file, split flash between bootloader and application, and fail the build when either region overflows.
Tag
362 posts

Write two GNU linker scripts that share one flash layout file, split flash between bootloader and application, and fail the build when either region overflows.

getauxval reads the kernel's auxiliary vector: page size, CPU features, secure-mode flag, random bytes and the executable name, without parsing /proc.

Update ESP32 firmware over HTTPS with esp_https_ota: partition table, certificate, the one-call and advanced APIs, and testing with a local server.

The global environ is the NULL-terminated array behind getenv. Loop over it to list every NAME=value entry, split entries safely and avoid the stale envp trap.

Pass parameters to a Linux kernel module with module_param: types, permissions, MODULE_PARM_DESC, insmod and modprobe.d usage, and /sys/module values.

Hand control from a bootloader to a Cortex-M application safely: validate the vector table, quiesce peripherals, set VTOR and MSP, and avoid the usual crashes.

The kernel copies argc and argv onto the new process's stack on execve, then startup code hands them to main. See the layout and measure it with a program.

Write, build and load your first Linux kernel module in C: the init and exit functions, MODULE_LICENSE, a Makefile and insmod, with the exact dmesg output.

Install the Optiboot bootloader on an ATmega328P with an ISP programmer once, set the boot fuses, then upload sketches over a serial cable with avrdude.

setenv copies its arguments and honors an overwrite flag, unsetenv removes a name, and putenv stores your pointer. Learn the rules and what children inherit.

Use the STM32 built-in system bootloader to program firmware over a USB serial adapter, with BOOT0 wiring, the handshake bytes and CubeProgrammer commands.

getenv returns a pointer to a variable's value, or NULL when it is unset. Check for NULL, tell empty from unset, copy what you keep and parse numbers safely.