Building a load-balanced production infrastructure in AWS
My notes from building a scalable and production-ready infrastructure in AWS. This post covers the basics of setting up a load-balanced infrastructure using EC2 instances, Elastic Load Balancer, and Auto Scaling Groups.
Accessing Complex C Data Structures from Python
Explore advanced techniques for interfacing complex C data structures with Python using ctypes and SWIG. Learn how to seamlessly pass complex data structures between C and Python, perform operations on them, and package the Python infrastructure as a shared library or package for streamlined distribution.
Setting up a development environment for RISCV-FreeRTOS on QEMU
In this post, we will explore how to setup a development environment for FreeRTOS on RISCV using QEMU. this includes setting up the RISCV toolchain, QEMU, and building and executing FreeRTOS examples. We will also explore some techniques to debug FreeRTOS applications running on QEMU.
Bridging the Gap - Why I Share My Engineering Journey Through Blogging
I recently had a discussion about the importance of writing about what you learn. This post delves into why this practice is essential and how it has personally benefited me and why I think you should do it too.
Harnessing Devicetree for Bare-Metal Embedded Systems - A Non-Linux Approach
Device trees are typically used in Linux systems to describe the hardware components of a system. However, device trees can be used in bare-metal systems, offering great interoperability and portability. This article describes how to use device trees in bare-metal systems.
Building Bespoke Debian Distros for RISC-V
In this article we will go over the steps to build a bespoke Debian distro for RISC-V. We will use QEMU to emulate the RISC-V architecture and build a Debian distro for it.
Guts of Git - A deep dive into the internals of the Git version control system
Recently, I experienced a workplace Git incident that compelled me to refresh my understanding of Git internals and learn numerous new aspects about the system. This article is a product of that learning experience, with the hope that even my worst adversaries will never have to endure such pain. I hope you find this article useful and acquire new insights into Git.
A Hands-On Guide to Sharing Files and Folders between Host and RISC-V QEMU Machine
Transferring files between your host and RISC-V QEMU machine is often a daunting task. typical solutions include using the 9P FS which requires host kernel level modifications, which might not always be practical. In this hands-on guide, I'll go through the steps to configure Buildroot and Linux for RSIC-V to use seamless ssh based filesystem mounts. Say goodbye to the inefficiencies of manual file transfers and hello to a more streamlined workflow with this step-by-step guide.
Uncovering the Mysteries of Linux Boot on RISC-V QEMU Machines - A Deep Dive into the Boot Process
Get ready to dive into the intricacies of Linux boot on a RISC-V machine! This comprehensive guide will walk you through the process of compiling QEMU, the Linux kernel, and the root filesystem from scratch. By the end of this journey, you'll have a deep understanding of the Linux boot flow and be equipped with the knowledge to write your own Linux bootloaders for RISC-V. So buckle up, grab your coffee, and let's get started!
Understanding RISC-V semihosting
Semihosting lets embedded systems talk to a host computer through a debugger interface to perform tasks such as file I/O, and printing to the console. This article explains how to use semihosting in QEMU to print to the console and perform file I/O operations with a RISC-V machine model.
Using Jenkins with BitBucket Webhooks on AWS
Bitbucket lets you trigger webhooks for git events that are interesting to your build and test infrastructure. In the past, I have played around with it using ngrok and python flask “servers.” This article summarizes my experience trying it out on Jenkins in AWS.
Adding Custom Packages to Buildroot
This article talks about adding a custom package into buildroot for creating your own Linux distribution for embedded and emulation targets.
Docker 101 for embedded systems Dev and DevOps
I started using docker back in 2016 and ever since, I have been using it in the context of embedded systems DevOps. This article condenses the learning so that someone starting afresh can get to speed quickly. You can read my article on bring-up a buildroot image on docker in the article https://embeddedinn.xyz/articles/tutorial/docker-scratching-an-itch-to-build-from-ground-up/.
Building a barebones web-push server
We use push notifications from web-sites on a daily basis. This article is about building one from the ground-up in order to understand how the whole system pipeline works.
Exploring virtualization in RISC-V machines
“RISC-V is classically virtualizable” – We come across this statement very often when we read about the merits of the RISC-V ISA. This article looks at what this statement means and how practical virtualization works with the RISC-V architectures.
Adding a custom peripheral to QEMU RISC-V machine emulation & interacting with it using bare-metal C code
QEMU is an excellent platform to emulate hardware platforms. But, we often end up using ready-made platforms without thinking twice about how QEMU emulates them. This article dives into the depth of how a new peripheral can be added to an existing QEMU machine and how to interact with it using bare-metal C code. Ultimately, we will build a RISC-V machine that has our custom peripheral and driver for that peripheral.
Linux & Python on RISC-V using QEMU from scratch
This article explores how to set up RISC-V on QEMU, boot a simple application on it using the PK kernel, and boot a cross-compiled Linux on the emulation platform. We top it by booting a standard Linux distro with python support.
Analyzing size of ELF sections and symbols to generate a modular report.
If you are working on any serious embedded systems project, you will come across the need to optimize the memory footprint of your code sooner or later. When the crude methods like high levels of compiler optimization and the standard tips and tricks wont cut it any more, you will have to break out your work boots and the hardhat and get to digging.
Setting up a Github Actions based CI system for embedded development using PIC32
GitHub Actions is a workflow automation offering from GitHub. While there are a lot of tutorials out there talking about using GitHub Actions on your web/software project, there are not many on using it for CI/CD workflows for embedded firmware development. In this article, we will go through the steps involved in creating a build test environment for a PIC32 based projects hosted in GitHub.
Decrypting embedded TLS communication
While developing cloud connected products, one of the major challenges is debugging application layer errors within a TLS connection. This article describes a scalable method to decrypt application level communication within a TLS connection even when it happens with a cloud based server.
Understanding JSON Web Tokens
JSON Web Tokens (JWT) are becoming popular even outside the traditional web authentication use-cases with the advent of IoT and connected devices. This article gives you a concise overview of JWT and and all that is need to get started with using them
Secure firmware upgrade for embedded systems
General principles, architecture, guidelines and good practices for secure over the air (OTA) and over the host (OTH) firmware upgrade for an embedded device
JTAG basics and usage in microcontroller debugging
JTAG is omnipresent in the microcontroller and FPGA world in the form of programmers and debuggers. Let us peek under the hood and understand how JTAG works and understand how IDE based debug works with microcontrollers.
Understanding X.509 Certificate Structure
An insight into the format and technologies used to pack a X.509 certificate. This tutorial introduces the concepts and parses through a TLS certificate to bring the concepts together.
Introduction to digital certificates
Introduction to digital certificates and the basic concepts of hashes and cryptographic algorithms that are used to build trust based secure systems
Building an E2E IoT system with Raspberry Pi
My experiences with building an end to end IoT system using a Raspberry Pi, an Arduino and a MPU6050. The post describes the details of how to compile and setup a minimal kernel with networking and web server support and developing a minimal websocket server to get real time data into the web page based user interface.
Buildroot and Raspberry Pi
Steps to compile and bring up a minimalist kernel for Raspberry Pi using Buildroot
Writing Linux Device Drivers - Part 1
This tutorial gives a quick introduction to writing Linux device drivers. It will not make you device driver experts, but will give you a starting point to start learning about Linux device drivers.
Adding new menu item to PuTTY
I came across a requirement to add a new easy access menu item to the putty terminal window for Windows. This article explains how I did it.
Advanced Shell Scripting
A collection of advanced tips and tricks to create wonderful shell scripts
Test coverage analysis with GCOV
A quick tutorial on using GCOV for test coverage analysis. This will get you started to run analysis on your complex test cases.
UPnP Device Architecture
An article that provides an in-depth understanding about the UPNP protocol and its foundational technologies like HTTP, XML, SOAP etc
USB-3.0
An introduction to the core concepts and building blocks of USB 3.0 device side protocol for those who are aware of USB 2.0
USB-2.0
An in-depth tutorial introducing the USB2.0 device side protocol with detailed illustrations on how transactions happen.
PIC microcontrollers
A tutorial on 8 bit PIC Microcontroller architecture and development tools