Shaving 8–9 Minutes Off Each Test Cycle

A recent dialog reminded me why having a powerful — and fun — Ryzen 7950-based system is helpful.

I’m performing testing of hand-held radio units to see how mesh software, ostensibly Reticulum-based units, perform out in the field.  The magic of mesh networks is that it can extend the range limits between two radio units. See Simulating A Mesh Network For Reticulum Testing.  In order to test many units that within range of one another, e.g. like all being in the same room, or same building, I have to compile custom firmware for each specific unit, with ‘blockers’ that prevent it from considering transmissions from nearby units.  Simply put, if AMY determines a radio transmission comes from CY, DAN or ED, she ignores it as if it were never received.   So if I want to test 5 units named AMY, BOB, CY, DAN & ED, and simulate the topology that only any given two are within radio range of each other, then I have to build 5 different firmwares, each differing by its blocking rules, and load them.  Compiling can take time.

diagram of 5 nodes
5 units, 3 hops

The heart of the T-Beam SUPREME is a tiny but capable computer: the ESP32-S.  To load software in the T-Beam, you compile and then upload an entire operating system, much like  Dell computers do for the computer they sell.  The problem I have encountered using my 2012 Intel-based workstation is that to build a firmware for AMY takes over 1 minute.  If I change the code with one character, I have rebuild the entire firmware.  Since each unit has to have its own firmware, e.g AMY has to know to block BOB, CY, DAN & ED and BOB has to block CY, DAN & ED &etc., That means 5 compiles for a 5 unit test plus the time loading the firmware into each unit.

I found that my Ryzen server can compile the ESP32-S firmware about 10 times faster than my Intel workstation.  So I have built a toolchain where:

  • I modify my code on my Intel workstation,
  • I check it in to my source code repository on my Forgejo server1 and then
  • on my Ryzen machine, I check out the code and compile it 2.
  • download the relevant unit’s build, a file tree of about 157 MB, and perform an upload to the T-Beam.

I can upload on my workstation and other computers, including the $15 Raspberry Pi Zero 2 W connected to my network via wifi and with a T-Beam connected to it via USB, and perform uploads simultaneously.  So compiling on my Intel has to be done one by one, and if I try to compile all 7 images at once, it takes about 10 minutes on my Intel.  The Ryzen based server saves me 9 minutes.

Being the fickle person as I can be (thanks to classical piano training), I’m constantly testing and retesting until I get what I want.  That means a lot of iterations of changing the code, building, loading, and running a test from a couple of minutes to 15 minutes.  Radio signals being what they are, I find you have to allow the units to perform communication tests several times to account for anomalies that might affect the radio signals.  Hence, compiling on my Ryzen saves me about 9 minutes per test cycle.

  1. This is really helpful because it forces me to document each and every change and check it into source control.
  2. I can compile 7 different units in less than 1 minute. 

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *