• WSL2 Disk Cleanup

    The WSL disk image has grown to fill the host C:/ drive due to too many large docker builds. The virtual partition needs to be shrunk, the process below can be used. Thanks to this comment on Github. The path to the virtual disk was found via WinDirStat: C:\Users\<User>\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\ext4.vhdx In...


  • Coding in C for MCUs: Sort Structs to Save Code Size

    This is also published on Medium. This post explores two things. Firstly, a handy way to save code size on ARM Cortex-M-based MCUs with limited resources. Secondly, it looks at the impact of the hardware architecture on meeting software requirements. In particular, it looks at memory rows and alignment. An...


  • Rust for Embedded Targets

    A few notes on compiling embedded targets with Rust. The rustup installer supports adding targets: https://rust-lang.github.io/rustup/ e.g. RUN rustup target add riscv32imac-unknown-none-elf There are many embedded targets: https://doc.rust-lang.org/nightly/rustc/platform-support.html e.g. riscv32imac-unknown-none-elf and thumbv6m-none-eabi are Tier 2 A bare-metal no_std “crate attribute” is defined: https://docs.rust-embedded.org/book/intro/no-std.html https://stackoverflow.com/questions/27454761/what-is-a-crate-attribute-and-where-do-i-add-it With no_std: A panic_handler is needed...


  • Not Scraping Real Estate.com.au

    I’d like to automate my monitoring of local real estate. Just a private resource, I’m not trying to re-create a site such as http://house.ksou.cn/. I’d like to implement a process to automate and do efficient market analysis, something like this: Scraping A few years ago was to easy to scrape...


  • KVM On WSL2

    Replacing VirtualBox with KVM inside of WSL2. Compile a new Kernel. KVM needs to be enabled in the WSL kernel variant. This post gives the details: https://boxofcables.dev/accelerated-kvm-guests-on-wsl-2/ A few key points: Microsoft’s kernel is here: https://github.com/microsoft/WSL2-Linux-Kernel/. The default config is in Microsoft/config-wsl You update the config to enable KVM and...