Fun Network Embedded Tools

Most of my embedded system work is on little bitty CPUs and often don't have any "official" operating system, much less networking and user interfaces. But occasionally I do work on things with more horsepower -- and it seems like the bar is lower for that then ever. Little boards that would have been significant desktop machines just a few years ago are now cheap enough to embed. Recently I've been working with some Mini2440 boards. These are ARM computers that can run Linux (my choice) or Windows CE. They have LCD drivers for touchscreens, networking, serial, audio, USB... they are basically tiny little low-powered PCs. Getting these boards running can be a bit of a challenge -- there are several gyrations you have to go through and the same board with different amounts of flash require slightly different procedures. But once you are done with the initial setup, the development processes is pretty easy since you have a network connection to the target machine. I was talking to a colleague about using these and I discovered I had a few tricks that might not be immediately obvious and would work with most any Linux-based development board. Transferring files to a board like this is probably done via FTP (or maybe SSH). However, there are FUSE file systems for both of these mechanisms. Using these, I can mount the board's file system on my desktop and then just copy files in and out as much as I want. I usually keep a subdirectory called "target" that will be the embedded board. The issues a command on your workstation like:

curlftpfs -o user=plg mini2440 target
You'd need sshfs if your board supports ssh instead of FTP. Now moving files over to the target is as simple as using cp or (ugh) your favorite graphical file utility. Another trick I like to use is during debugging. A lot of embedded boards have tool chains that don't support Insight (gdb's graphical debugger). As much as I don't like GUI file managers, I do like a debugger that gives me a better view of what's going on. If you can't get Insight working, but gdb works, don't worry. You can use the ddd debugger (which has many interesting features for visualizing data). It lets you specify a gdb executable to use and it isn't that picky. On the mini2440, I start the gdbserver on the target with a free network port and the program name. for example:
./gdbserver :3333 atest
Then I start ddd on the workstation like this:
ddd --debugger arm-linux-gdb atest
Where arm-linux-gdb is the correct gdb for your target system and atest is the executable image you want to debug. You can access gdb directly using the ddd console window if you need to issue special commands. For example, you have to connect to the target with something like:
target remote mini2440:3333
Speaking of which, if you need to run commands like that or otherwise prepare your debugging session, don't forget that gdb will read a startup file named .gdbinit if it exists in the current directory on your workstation. None of these tips are particularly oriented to the mini2440. You could use them with any Linux-based embedded system.


October 16, 2010
URL:http://www.drdobbs.com/embedded-systems/fun-network-embedded-tools/228700273

Terms of Service | Privacy Statement | Copyright © 2024 UBM Tech, All rights reserved.