Robots

PC-Based, Linux Robots

Posted 8 Jan 2004 at 19:35 UTC by steve Share This

Dafydd Walters has written the first of a series of articles for mobilerobotics.org on the challenges of building a PC-based robot that runs Linux. His first article includes an introduction explaining the project and a few of the goals. He also presents a list of interesting hardware that could be used for PC-based robots and links to a lot of related web sites. Dafydd is also responsible for the Open Automaton Project which we've covered in previous articles.

I am still extremely Skeptical of Linux, posted 8 Jan 2004 at 20:58 UTC by earlwb » (Master)

I see that they are only going to have a "Static" display at the next big Robot contest. Apparently, they still have to develop or write a lot of code to get it to work.
I still have problems using Linux on a robot.
First you have to find a compiler for some kind of MCU that you can run on Linux (specifically the version you have, the compilers always seem to be for a version you don't have) that actually works.
Next you have to find software and or drivers that will allow you you download the program to the MCU.
Next you have to have (actually find) some sort of serial or Ethernet or something that lets your Linux communicate with the MCU.
If your successful, then you can use some sort of a GNUC++, Java compiler or program like Perl or Python to develop your program with to have the robot do something.
So far I only see promising bits and pieces of incomplete systems. It's like everyone is doing something but they are still waiting for or developing some code to get it to work.
So far the closest to success I can get, is to use Linux with an ISOPOD over a RS232 connection to do something. At least I can write and download code to the ISOPOD using a terminal program on the Linux system.
But if you want to use some other MCU your in real trouble here.
Then using one of the new USB I/O adapters is a problem, as I haven't been able to get them to work under my version of Linux yet.
So far it seems the only "real" Linux mobile robots have something like 20-30 undergraduates all writing code for them, and they still aren;t doing anything with them yet.

Linux , posted 10 Jan 2004 at 03:30 UTC by steve » (Master)

You can compile Linux with gcc and gcc will compile code for just about anything from an 8051 to a supercomputer - I don't think the Linux kernel will quite fit on the 8051 yet thought! ;-). You can also use gcc to build a cross-compiler if needed, so you can compile from your PC and move the binaries to the robot.

If the robot's got an Intel or Arm processor, you can find plenty of Linux distros that offer pre-compiled binaries to get you started. I expect to see more once the 2.6 kernel starts being adapted as it includes a lot of the stuff that used be extra patches for running without an MMU and doing low-latency/real-time programming.

What sort of USB I/O adapter have you got? I'll check around and see if anyone's got drivers for it. Shouldn't be to hard to adapt an existing USB driver if there are specs available on the I/O adapter.

Well that maybe true but..., posted 12 Jan 2004 at 12:51 UTC by earlwb » (Master)

I've got a ARM2106 board and although I can get the Philips serial ISP utility to communicate with it. Compiling a C program for it still eludes me. All you get from the various groups and other people are bits and pieces.
I got a couple of these to use on my Mini-ITX board
http://www.dontronics.com/u401.html
Well that maybe true but... For example:
arm-uclibc-gcc -mcpu=arm7tdmi -mthumb -O2 -g -c main_led.c
arm-uclibc-gcc -mcpu=arm7tdmi -mthumb -o main_led main_led.o -lc
Comes close for me, but I get a few warnings about it. So maybe I have the wrong library or option setting still.
So someone suggested that something like this might work:
arm-uclibc-gcc -Wl,-Ttext,0x40000100 -mthumb -o main_led main_led.o
This will place the text segment at 0x40000100 (SRAM) and all other sections behind the text.
Then you still maybe need to make a file for downloading like so:
arm-uclibc-objcopy --output-target srec main_led main_led.srec
arm-uclibc-objcopy --output-target ihex main_led main_led.hex
arm-uclibc-objcopy --output-target binary main_led main_led.bin
Then of course maybe I am using the wrong Cygnus GCC compiler, maybe I need to use some other version than the one that I have. I got it from Kiel Softwares website. That's what's drove me crazy, trying to get the compiler to compile something seems to elude me.

It would be nice if someone had posted the entire command line(s) sequences needed to compile something simple like a Hello World or LED blinker program. But all they do is offer up little bits and pieces. It makes me wonder if anyone has really done it or not.

Oops sorry about that, posted 12 Jan 2004 at 14:47 UTC by earlwb » (Master)

I saw that going overboard early in the morning without enough coffee yet can mess up what one writes. Here it is in a more orderly fashjon.
I got a couple of these USB I/O devices to use on my Mini-ITX board
http://www.dontronics.com/u401.html
Windows and Visual Basic don't seem to have any problems with them at all.

Hey Steve! Are going to be there at the RBNO this Tuesday? If you think you could get it to work, I could bring my laptop and the ARM 2106 board and the software that I have. Maybe we could get it to compile and download something to run off the board there at RBNO.

I've got a ARM2106 board and although I can get the Philips serial ISP utility to communicate with it. Compiling a C program for it still eludes me. All you get from the various groups and other people are bits and pieces.
Well that maybe true but... For example:
arm-uclibc-gcc -mcpu=arm7tdmi -mthumb -O2 -g -c main_led.c
arm-uclibc-gcc -mcpu=arm7tdmi -mthumb -o main_led main_led.o -lc
Comes close for me, but I get a few warnings about it. So maybe I have the wrong library or option setting still.
So someone suggested that something like this might work:
arm-uclibc-gcc -Wl,-Ttext,0x40000100 -mthumb -o main_led main_led.o
This will place the text segment at 0x40000100 (SRAM) and all other sections behind the text.
Then you still maybe need to make a file for downloading like so:
arm-uclibc-objcopy --output-target srec main_led main_led.srec
arm-uclibc-objcopy --output-target ihex main_led main_led.hex
arm-uclibc-objcopy --output-target binary main_led main_led.bin
Then of course maybe I am using the wrong Cygnus GCC compiler, maybe I need to use some other version than the one that I have. I got it from Kiel Softwares website.It looks to be a 3.3.1 release.
That's what's drove me crazy, trying to get the compiler to compile something seems to elude me.
It would be nice if someone had posted the entire command line(s) sequences needed to compile something simple like a Hello World or LED blinker program. But all they do is offer up little bits and pieces. It makes me wonder if anyone has really done it or not.
Then everyone seems to rename the executables to make it even more inetersting.
Next there seems to be many varieties of MAKE file too. Thus even if you get a makefile script it doesn't work on your system, as they used a different one.

ARM board, posted 12 Jan 2004 at 14:49 UTC by steve » (Master)

Is this one of the Philips LCP201x evaluation boards? If you can find me a URL with some specs on your board, I'll see what I can do. ARM is a common enough Linux platform that it should may possible to find a precompiled binary distribution without having to cross-compile it yourself.

here's what I have at present, posted 12 Jan 2004 at 16:15 UTC by earlwb » (Master)

I got this current 2106 board from a guy in Hong Kong at http://arm.web7days.com They have a little "ARM" link to their board at that URL. It's interesting that they can get the chip before we can here in the USA. I used to have a Atmel ARM and a older Philips ARM board, but I had given up and sold them off a while back. I got this one as the 2106 looked to be a lot more useful robotics-wise. Having everything on a single MCU makes it nice to use. Keeps it all pretty sinple. But then I get back into that frustrating GCC compiler cross compiling problem again, that I haven't figured out yet.

http://www.lpc2100.com/ Philips LPC210x web page is: http://www.semiconductors.philips.com/pip/LPC2106.html

http://www.keilsoftware.com/dd/chip/3483.htm stated that they supported the 2106 chip, so I downloaded their eval software and it was the Cygnus GCC compiler, with their customized debug tools tossed in on top of that. I didn't try their debug tools as that has the time limit on it.

The board itself came with CD with a GCC compiler on it but it looked to be more generic than Keil's was.

Thanks Steve

Not an answer but maybe some help, posted 12 Jan 2004 at 17:17 UTC by steve » (Master)

>> http://arm.web7days.com

I checked out the site. I don't think Linux has been ported to the Philip LPC210x variant of the ARM yet. You can find a list of specific ARM CPUs and boards that are known to be supported on the ARM Linux site here:

http://www.arm.linux.org.uk/developer/machines/

The same site maintains an ARM-Linux related mailing list where you might be able to find an expert on if and when they'll be a Linux port for that board. It may not be possible with the amount of memory on the board to load the kernel.

Using gcc to compile code to run directly on the board should be possible (but, as you've found, it's not always obvious how to compile and link the code so that it will actually run). I noticed the board-maker refers to a gcc port offered by this company as the recommended one for the board:

http://www.ocdemon.com/

Or you could build your own cross-compiler. There's a How-To on building the gcc cross-compiler and tool chain for the ARM here:

http://www.ailis.de/~k/knowledge/crosscompiling/

And some links to other info on using gcc with ARM can be found here:

http://sed.inf.u-szeged.hu/gcc-arm/links.php

You'll probably need to make some specific tweaks either in your source code or in the command line for the compiler/linker for the 2106. Hopefully, Philips has some application notes that would help or, the easy way, is look for a mailing list or discussion group on the web where someone has already done and get them to give you the secret. ;-)

Seems to be a conspiracy, posted 12 Jan 2004 at 20:40 UTC by earlwb » (Master)

Well thanks Steve.

I've been to the groups about this and they all pretty much assume everyone knows all about it and how to make it work. Thus all you get is bits and pieces and hints. They do love to go into all the nitty gritty custom options to set though.

I'll try the GCC from the website above and see what it does.

See more of the latest robot news!

Recent blogs

15 Nov 2014 mwaibel (Master)
14 Nov 2014 Sergey Popov (Apprentice)
14 Nov 2014 wedesoft (Master)
5 Nov 2014 shimniok (Journeyer)
5 Aug 2014 svo (Master)
20 Jul 2014 Flanneltron (Journeyer)
3 Jul 2014 jmhenry (Journeyer)
3 Jul 2014 steve (Master)
2 Jul 2014 Petar.Kormushev (Master)
10 Jun 2014 robotvibes (Master)
X
Share this page