On-Demand Development Boards With Remote Access Methods

In an increasingly digitally connected world, it can be easy to forget sometimes how much work still relies on specific pieces of hardware, especially in the field of hardware development. Regardless of whether you’re an embedded software developer who needs to run some code on a specific platform, or a hardware developer who’d really like to test out a feature in some specific IC, access to hardware is always needed.

In lieu of just buying everything and awaiting delivery, what if a buddy of yours happened to have that one development board right there on their desk, yet they didn’t exactly live around the corner? Here it would be perfect if said pal could hook up a testing harness and give you access to this board via the Information Super-Highway, AKA the Internet.

While remote access to server systems is fairly common, things get a lot more interesting when it comes to the wider area of development boards, and their plethora of physical features and fascinating world of errata and silicon-specific bugs. So how does one get easy access to such a remote board?

What’s Available

This concept of remotely using development boards is hardly a new idea, of course. Back in 2019, for example, Erich Styger wrote an article about a method to use USB-based debug probes via the very handy gdbserver that provides a remote server for clients. GDB is the GNU Debugger that comes as part of the GCC toolchain, with the remote server component doing what it says on the tin: being able to run GDB on a different system than on which the application that is being debugged is running.

With that one simple trick you can already turn any development board that is connected to a system running gdbserver into a remotely accessible board. Even if you balk at the idea of having an entire PC dedicated to that server task, you got projects like the Farpatch project for ESP32 MCUs that uses the well-known Blackmagic project to create a Wi-Fi accessible gdbserver instance right on top of a target board’s JTAG and SWD interfaces.

So that’s it then, right? Simply use any of these options involving gdbserver or similar, connect to it remotely from gdb or similar and you’re done, right? Unfortunately there are a few more questions and firewall-shaped elephants to address first here.

Flashing Time

The most pertinent question here is what happens next after your best friend in the world has just hooked up your target development board to the remote debug server with all requisite wiring in place. Unless you want to really push this friendship to its limits and have them also flash every iteration of your firmware image to the board for you, you need to be able to also handle such basic tasks.

This requires a bit of digging into how exactly your typical programming method can be adapted to this gdbserver link. Fortunately tools like OpenOCD would seem to happily work with the remote server’s protocol, including programming tasks, though you are welcome to erase and write the Flash using basic GDB commands too, with the Black Magic Probe documentation for example covering some methods.

Using a tool that automates as much of this as possible does make a lot of sense, of course. If your IDE of choice already integrates remote GDB and OpenOCD support, then it should be fairly straightforward. Otherwise you may have to get down into the weeds with fun OpenOCD server configuration settings, specifically GDB flash_program support.

Overall this doesn’t seem to be a very hard problem once you have figured out a configuration that works for your project.

Safe Remote Access

Perhaps the most annoying part about using remote development boards is when you venture outside the bounds of a LAN, and there’s no preexisting virtual LAN (VLAN) or port-forwarding setup already in place. In the Segger J-Link-based article by Eric Styger on this particular issue this is solved by using the J-Link Remote Server service. This uses tunneling via their server to connect to both users on different networks via the internet.

This option is only available for J-Link customers, of course, but it provides one example of how to safely provide such remote access, featuring password protection and point-to-point connections.

Although you can technically still do a general port-forwarding on a router as well, this has become increasingly less convenient in an era of carrier-grade NAT (CG-NAT) nuking IPv4 from orbit, not to mention the potential security concerns of having something like a server process directly exposed to the worst that the modern Internet has to offer in terms of exploits. Here using something like OpenVPN to set up a virtual private network (VPN) that can be secured with passwords as well as self-signed certificates.

While so far I have not had to set up such a remote GDB server solution yet, I have used such VPN solutions in commercial settings to access corporate LANs securely, so this might be the easiest solution here. Even if not as refined as the direct-to-IDE solution of the J-Link service, it might be a good start, especially if you can set up a separate virtual LAN (VLAN) for remote-dev-board VPN connections or so.

Feel free to sound off in the comments on what solution would be most preferable to you here.

Remote Boards Limitations

As useful as such a cobbled-together solution would be, it does of course still have some limitations. The most pertinent is of course the lack of direct physical access to the board you’re using. This means that someone or something on the remote side has to manage wiring up the board, debugging wiring and magic smoke issues, and generally monitor the physical hardware.

For basic GDB usage such remote access should generally be fine, but if you need to get an oscilloscope on some DAC pins, or attach any other external hardware, this would again have to lean heavily into how good your friendship with this remote friend is.

Having a remote webcam to monitor LEDs, displays and other board elements is something that can be added fairly easily, but in lieu of having a robotic arm near the remote board much of what you’ll be able to do is just watch and interact via the gdbserver instance that’s your main link with the hardware.

Real Life Experiences

Looking at a couple of projects, documentation and articles on a subject is one thing, of course. The real question is whether you, our esteemed reader, have experiences with such a remote development board setup, or happen to know people who do.

If so, what kind of setup does this use, and what are the overall experiences? Does it at all match the (mostly) theory and assumptions that one would reach after doing that deep-dive into the cited references, or is there a much better way to go about all this?

I can imagine that at least some hardware and firmware developers out there really do not feel like driving over to the office on those rare work-from-home days – never mind to put out a fire during a vacation – when you can just tippity-tap into a remote debug session and resolve in minutes what would otherwise ruin the day. As a luxury that’s mostly reserved to us software developers, I would love to see this extended to our hardware developer friends.

10 thoughts on “On-Demand Development Boards With Remote Access Methods”

  1. I wouldn’t recommend OpenVPN anymore. It buys you nothing against the more modern wireguard, but adds a bunch of extra complexity and attack surface.

    So I would recommend wireguard if your router is reachable from the outside, and Tailscale/Headscale for the cases when it isn’t.

  2. What I typically do is to open a Platformio project from a remote folder via SSH (and Wireguard VPN) in VSCodium/VSCode. Then the compilation happens on the remote machine and also if you command the IDE to flash the binary, it does it on the remote host (which years ago come to me as s huge surprise!)

    I use it when I have something on bench at work, come home with a head full of thoughts what to do next and want to try it before finally falling asleep in the early moning B-)

  3. Esteemed reader with real world experiences here. Spent most of my professional career writing firmware for microcontrollers.

    I’ve seen a number of microcontroller simulators over the years and I have the same observation with them as I have with this article: it’s not the microcontroller, or even the chip that’s important, it’s the ensemble system.

    This sort of virtualization is fine as a learning tool, but unless it has the exact peripherals you are using, sometimes even the exact I/O configuration (as in, which I/O lines go to the keypad), then it’s of very little use to the developer.

    If it’s a commodity chip, such as a microcontroller, then you won’t have the configuration you need to test. Supposing, for example, that it has built-in hardware switch debounce… how do you test that remotely? And how do you know that the specific switches you use don’t have some sort of issue that needs correcting?

    If it’s a specialized chip it’s probably an I/O interface. How do you know your photodetector detects red blood cells correctly? How do you know the audio output works at ultrasonic frequencies, as it should?

    Every professional job I’ve had plots the same course: you try to design the hardware based on specs, then once the hardware is in you find and implement work-arounds to fix the inevitable surprises.

    One question I always ask at the interview is: “How are you planning on testing it?” It’s meant to shine a light on how organized and how much they’ve thought the project through.

    Dev boards are good for proof of concept, get them in house and connect them. See if the results match your predicted results.

    But I don’t think remote access to dev boards will be of much use to a developer.

    If by “dev board” you mean the entire ensemble, the full project with all the peripherals, then by all means put the GDB beacon into it so you can set breakpoints and view results. Or use JTAG for the same purpose.

    But I’ve never worked on a system that didn’t also require software to test and detect an error condition and trigger an I/O output that can be seen on a scope, or specific human interaction such as “pressing the button within 1/2 second of the event”.

    Having the dev board within easy reach is a pretty-hard requirement.

    1. @Peter Walsh agreed, the chip itself is rarely the trouble. The bugs that bite usually come from the peripherals, bus timing and power around it. A hardware-in-the-loop bench with the real board and a simulator closing the loop lets you cut power halfway through a firmware update on purpose, which no virtual board shows. Write-up: https://www.perfsol-software.com/blog/hardware-in-the-loop-testing/?utm_source=hackaday&utm_medium=comment&utm_campaign=community202611 (I work at Perfsol)

  4. “…As a luxury that’s mostly reserved to us software developers, I would love to see this extended to our hardware developer friends.”

    Right here, in an elegantly-phrased…and very simplistic…nutshell is demonstrated the impossible-to-cross bridge which exists between those who have expended the effort to learn how to solve electronics problems by designing the hardware first and then writing the software to make the hardware solution work; and those who think that all electronics problems can be solved by the simple expedient of writing software.

    Sorry, all you soffware ‘engineers’, but the (design) world has never worked that way, and it never will.
    The Boeing 737 MAX is an outstanding example, because of its visibility and the thoroughly terrible consequences, of what one gets when one turns the ‘I can solve anything with software’ “engineers” loose on an unquestionably (as well as historically) hardware-design problem.

    If the only tool in your design toolbox is software, you’re not an engineer.

    “Software Engineering is Programming when you can’t.”

    —Edsger Dijkstra

  5. I once did a remote debugging of an API we wrote that crashed the application of a customer without leaving a trace and could not be reproduced on our PCs.

    Using MS remote debugging tools and Hamachi (vpn.net), which creates a network tunnel without complicated setup did the trick.

  6. IoT security is a cesspit. AI agents rewrite their own rules and libraries to escape sandboxes. Every executive thinks ‘network’ equals a license for rent-seeking and collection of personal telemetry, with as much respect for the rule of law as a Tijuana hooker.

    So hey! Let’s dive into that ankles deep/nose down to save a few bucks on a dev board.

    “They’re so excited about being able to do it that they never ask if they should do it” starts at home.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.