
In an increasingly digitally connected 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.
Â
This articles is written by : Nermeen Nabil Khear Abdelmalak
All rights reserved to : USAGOLDMIES . www.usagoldmines.com
You can Enjoy surfing our website categories and read more content in many fields you may like .
Why USAGoldMines ?
USAGoldMines is a comprehensive website offering the latest in financial, crypto, and technical news. With specialized sections for each category, it provides readers with up-to-date market insights, investment trends, and technological advancements, making it a valuable resource for investors and enthusiasts in the fast-paced financial world.
