RSSAmplifier

Blog

Dror Gluska

Software Development Consultant 
A blog about code anecdotes, a summary of past necessities and exploration

blog.drorgluska.comRSS feed ↗25 posts

Latest posts

Stop Running Your Development Team on One LLM Provider

A CTO's Playbook for Resilient AI Coding Infrastructure Your database has redundant replicas. Your servers fail over. Your Disaster Recovery Plan (DRP) is documented and tested. Yet your entire engineering team's productivity depends on a single vendor's infrastructure. That single point of failure (SPOF) is an architectural risk this playbook fixes. The Market Reality: No SLA, No Recourse When…

Stop Dumping Logs Into Chat! The Sequential Log Analysis Protocol (SLAP)

Introduction In the era of large language models boasting massive context windows, developers have fallen into a dangerous debugging pattern: dropping a 10,000-line raw execution log directly into a chat window alongside their source code. Once an error gets into a chat's memory, that memory becomes less and less useful. Sometimes a model can correct itself, but more often, it triggers a kind of…

Visualizing Embedded System Behavior with Perfetto

Segger SystemView and Percepio Tracealyzer have been the de-facto standard for visualizing embedded system behavior for the past few years, While Segger has been able to only visualize a single core, Percepio pricing is prohibitive to the hobbyist, last but not least is the toem Impulse which requires eclipse and some people have an aversion to that as well. Segger SystemView | Percepio…

ESP32 Performance Profiling

The ESP32 is very capable but even the most capable of devices can get overwhelmed when using it extensively, so how can we find out what is taking so long or which function should we optimize to make things even better? FreeRTOS Real Time Stats FreeRTOS has a function vTaskGetRunTimeStats which can get statistics for tasks runtime, however the API takes some performance away. So it needs to be…

Generic Gamepad for Toy Cars

Some kids love motorized toys, cars, trucks and basically anything that makes a noise or have a motor can be a child's toy. I've been searching for a quick, simple, cheap, generic option to replace the remote controls with something I can easily source without building a specialized PCB or costing too much and I think I've found that option. This is the battlebot I've been using it for, the…

Embedding Lua in your Projects

Lua is lighweight programing language designed for embedding, it was created in 1993 by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes. Lua even has a very fast LuaJIT which sadly I cannot use since I'm aiming for embedded MCU. Fortunately, Lua has great documentation and huge community, while the language needs some getting used it, it can do everything I need and more and…

Embedding QuickJS in your Projects

QuickJS is small and embeddable Javascript engine made by the famous Fabrice Bellard , it supports ES2020 specifications and made available under MIT license. You might have read about my porting of his TinyEMU to ESP32 which could boot linux. During my hunt for scripting engine that can be integrated into a new embedded product I've encountered MicroPython and QuickJS, while the documentation is…

Embedding Micropython in your Projects

MicroPython is a python implementation for microcontrollers and other low resource requirement implementation which can make it perfect for embedding without significantly increasing your delivered executable or firmware. The project was created by Damien George at 2013 and has since grown and improved and even earned its place at OBCP s and is planned to reach space on board Euclid at 2023 as…

Using the ILI9488

The ILITEK ILI9488 is one of the larger and cheaper SPI displays available to the maker community,, available in 3.5" and 4". However, there are a few workable issues that prevent this display from being great. Specifications What's called ILI9488 is actually the LCD controller with an optional touch panel, you can mostly find it with XPT2046 resistive touch controller. ILI9488 ( datasheet ): -…

LVGL ESP32 and Desktop Development Walkthrough

UI for Embedded is always a hassle, find the right MCU, find the right Display, connect the right wires and that's even before writing the first line of code that actually shows anything on the display, drivers, graphic libraries and input libraries can be a pain to use, not to mention a pain to write. Fortunately, we no longer live in a cave, we have PlatformIO, LVGL and drivers for many of the…

RISC-V Linux on ESP32

I've been playing with the idea of running linux on ESP32 since the first days I've met its more robust module, the WROVER-B, on paper it seem possible since its a dual core 240Mhz and has 16MB flash and 8MB RAM, compared to our antique machines that could run linux, it seems like a beast. Doing some research on it, I've understood that its MMU is insufficient for running Linux on it. during the…

ESP32 SD Card Optimization

Reading and writing SD Cards with ESP32 should be simple, however, the amount of moving parts in esp-idf makes that a complicated task, first to understand and then to optimize. Lets disect the stack: File Operations Working with files should not be new to you, however, there are some differences between ESP32 and working on a full pledged OS, these differences can affect how the product will…

PlatformIO Menu Configuration Integration

One of the hurdles when building a custom library or software is how to allow the user to configure it. We can have a header file with comments and tell the user how to configure it but if multiple defines start to have dependencies or the value is more than true or false, there's a chance the user will get this wrong and the a whole class of issues is going to be opened and time is going to be…

PlatformIO Dynamic Code Analysis and Coverage

Like static code analysis, dynamic code analysis provides another level of coding errors detection and can help diagnose memory access issues such as use-after-free or uninitialized read and even memory leaks and memory write overruns. source On top of that, we can write every line of code that has been used and later correlate that and say which lines were executed and which were not and that is…

PlatformIO Static Code Analysis

Source Writing code and testing it with unit and integration tests can provide high quality executable, however, it does not indicate if its a maintainable code, moreover code can have side effects when used outside its designed use, so in essence, tests pass, QA approved but then it gets in the field and crashes. One of the ways to make sure code is maintainable, understandable and quick to get…

Unit Testing with ESP32 and PlatformIO

Writing Quality Code and Tests usually goes hand in hand, some find it more productive to write code and then write tests for it and others, following TDD/BDD write tests before code. The benefits of each is out of scope for this article, what is in scope is how to reach the nirvana of software development by using tests. source Lets start with the basics. PlatformIO tests can be run on: Locally -…

USART with DMA on STM32

I've been working with many projects that use the USART and not one was like the other alghough hardware resources were pretty similar. So I've sat down and decided to make a boilerplate for USART with DMA implementation that uses binary semaphores to notify when data arrives and buffers the output to create as little delay as possible as well as leave as much CPU as possible for the rest of the…

Introduction to ESP32 Debugging

Note: This article is a prelude to a talk I'm having about ESP32 Unit Testing and Debugging on November 27th 2019. If you read any of my previous articles you could probably guess I'm not a big fan of debugging. I truly believe that production should not be debugged (with exceptions) and therefore, its better to change one's thought process and build beneficial logging abilities. But probably the…

Is ESP32 Ready for some AI?

IoT is a passion of mine for quite some time, so imagine how happy I was to receive a gift from Semix , the all new ESP-EYE v2.1! Semix specializes in representation and distribution of world leading manufacturers of Electronic Components, Modules and Integrated solutions in Israel, in this case Espressif and Manica . While the board looks like it was pretty thought out (ferrite beads all over…

A Million Times

A while ago someone at work approached me with an idea to build a replica of " A Million Times " by Humans Since 1982 , while the project did eventually die off as far as I know, the idea looked very interesting, many clocks, synchronized to display animation, text and time, what can be bad about it? or as the original creator wrote: "Metaphorically speaking, we liberated the clock from its sole…

ESP32 IoT Device Management using LWM2M

Device Management means to connect, configure, control, monitor and update devices, individually or collectively. The challenge can range from managing a single or multiple devices on the same location to managing thousands spread all over the world in other cases, to complicate things further, devices can connect in various ways, either through Ethernet, WiFi,Cellular, Lora, SMS and numerous…

Christopher Avery - The Responsibility Process®

I've had the honor of attending Christopher Avery 's The Responsibility Process® workshop on October 28-29th 2018. We all cringe when we hear excuses or blame but it eludes some of us that shame and obligation are not the nirvana of responsibility though they feel almost as bad. To some people shame and obligation IS responsible behavior. Christopher worked with all of the participants on…

Tiny Model for MNIST Dataset

The MNIST database is a database of handwritten digits, its used as an ideal beginner dataset for learning how to do simple image classification and as the dataset only contains 10 characters, its relatively easy to work with. It has 60000 tranining examples and 10000 testing examples and it is sufficiently large. as it has 60000 images of 28 x 28 grayscale images, it takes about 50MB, so it does…

Practical Sensing - RF

We, as humans, are so used to know who we are and where we are that we sometimes forget that it comes at a cost, a person sees where they are, they have an awareness (or general awareness) of their location in a room or on the street, they can also see a step (or feel if one is blind) and eventually know where obstacles are, get from a place to place and plan routes around obstacles.…

Practical Sensing - Physical

We, as humans, are so used to know who we are and where we are that we sometimes forget that it comes at a cost, a person sees where they are, they have an awareness (or general awareness) of their location in a room or on the street, they can also see a step (or feel if one is blind) and eventually know where obstacles are, get from a place to place and plan routes around obstacles.…