go away spammer

Author Topic: Single board computers  (Read 7982 times)

0 Members and 1 Guest are viewing this topic.

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 830
  • Helpful? 0
Single board computers
« on: June 15, 2008, 03:32:46 AM »
I have always used microcontrollers to build circuits , specially robot brains
recently i got interested in SBCs as they provide too much processing power could be fairly enough to implement big algorithms
with sufficient memorys to store large data and little execution time(500 mhz).
googeling SBCs i found most of em is based on the ARM processors, are those microcontrollers or microprocessors?
with no expierience in SBCs at all i would like to know how this stuff is programmed ???

its stated that you can run an Operating system on it , Linux mostly
is it only a kernel? or with a distro?
how would you use it when there is no monitor?

thanks already for answers
good ol' BeNNy

Offline emmannuel

  • Full Member
  • ***
  • Posts: 87
  • Helpful? 0
Re: Single board computers
« Reply #1 on: June 15, 2008, 06:17:03 AM »
I have always used microcontrollers to build circuits , specially robot brains
recently i got interested in SBCs as they provide too much processing power could be fairly enough to implement big algorithms
with sufficient memorys to store large data and little execution time(500 mhz).
googeling SBCs i found most of em is based on the ARM processors, are those microcontrollers or microprocessors?
with no expierience in SBCs at all i would like to know how this stuff is programmed ???

its stated that you can run an Operating system on it , Linux mostly
is it only a kernel? or with a distro?
how would you use it when there is no monitor?

thanks already for answers


I believe they are considered microprocessors.  They go above and beyond what a microcontroller does and are ment to actually run a OS.

My brother used a gumstix.com SBC it was very interesting it ran Linux.
What version/distro? the one manufacturer provides.  I imagine its the same with every SBC since they have to write all the drivers for it.
Most Linux distros are for x86 hardware and depending on the SBC that code won't run on it.  ARM achitecture is very different from x86.

My brother got the LCD display for it so he can just turn it on and plug the keyboard to it like if he was at the computer.
I imagine like most Linux sistems without the monitor you could connect to it via telnet or ssh if you have a network connection.

BTW it took my bro a while to figuire out how to install linux on his gumstix.

Messing around I found some nice tech videos from india http://www.youtube.com/watch?v=4VRtujwa_b8 about the ARM processor.

Offline kf6snj

  • Jr. Member
  • **
  • Posts: 17
  • Helpful? 0
Re: Single board computers
« Reply #2 on: June 15, 2008, 08:07:06 AM »
I've been using Linux since 2002. Such being the case, I've noticed that things have changed over the years. Yes, it is true that Linux was originally for x86 hardware. However, that is no longer the case. Most distributions are now such that they already have a generic kernel driver available for most of the hardware that is out there. This even includes digital cameras that use propriety drivers and most non-intel/AMD boards. With regards to the ARM processors, I would suggest using Ubuntu, which has the most amount of open source software available for robotics applications. Still, there are other Linux versions that also work very well with ARM processors and if you don't mind compiling from source code in the command line, you will find that your distribution will then be configured more specifically for your SBC and robotics hardware.

I would suggest though, that before using Linux, read up a little on it. I say that as many people I know who try to jump from M$ windoze to Linux usually struggle because they don't realize that Linux does things differently than M$ does.

Still, if you are thinking of using an ARM processor and using Linux as your OS platform, it should work nicely.

Offline momo

  • Jr. Member
  • **
  • Posts: 7
  • Helpful? 0
Re: Single board computers
« Reply #3 on: June 15, 2008, 10:35:43 AM »
check out gumstix for your robotics needs :)  i think they are a little light on the i/o

I made the switch from windows to linux years ago. and I'm glad.  I've been clean for years and haven't looked back.

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 830
  • Helpful? 0
Re: Single board computers
« Reply #4 on: June 15, 2008, 12:44:53 PM »
thanks guys for replies,

Quote
I say that as many people I know who try to jump from M$ windoze to Linux usually struggle because they don't realize that Linux does things differently than M$ does.
very true

Quote
I imagine like most Linux sistems without the monitor you could connect to it via telnet or ssh if you have a network connection.
these are the only ways?
good ol' BeNNy

Offline JesseWelling

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 707
  • Helpful? 0
  • Only You Can Build A Robot!
Re: Single board computers
« Reply #5 on: June 15, 2008, 01:00:47 PM »
I made the switch to Linux around 2003 and haven't looked back.
One thing that will help you if you are thinking about using a Linux based SBC is to get a cheep computer (or just an old hand me down) and run Linux on it to get used to the environment, because it will be easier to use Linux to work on your project that it will be to use your Windows computer. If you don't want to install Linux your self there are places that sell pre-installed Linux like Dell, Lenovo, and System76, but generally if you aren't going to be using a laptop or extremely new hardware, installing Linux shouldn't be too hard for any one who has enough technical proficiency to build a robot  ;)

As for programming user applications generally you use a cross-compilation tool chain similar to how you use WinAVR, or if you are using gcc on a linux box you just set up your makefile to cross compile it.

As for connecting to the gumstix and most other Linux SBCs, you generally provide a comand line interface on a serial port if there is no ethernet available. I mostly use TCP/IP over BlueTooth though. That way I don't have to hook up any wires if I need to reprogram something on the chip, and I can log into more than one session, which comes in handy for looking at output and reprograming.

As for being light on I/O, that's what the Robostix is for. and if that's not enough you could also hook up an Axon with an i2c boot loader to the Gumstix so you could remotely reprogram it too.

As for compiling the Linux kernel and various Libraries/Deamons, There are cross-compilation tool chains that can help you do that, the most notable are BuildRoot and OpenEmbedded.
« Last Edit: June 22, 2008, 05:34:40 PM by JesseWelling »

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 830
  • Helpful? 0
Re: Single board computers
« Reply #6 on: June 15, 2008, 01:43:43 PM »
thanks jesse

Quote
One thing that will help you if you are thinking about using a Linux based SBC is to get a cheep computer (or just an old hand me down) and run Linux on it to get used to the environment, because it will be easier to use Linux to work on your project that it will be to use your Windows computer.
if i will install it on my pc then i would need the desktop version of linux, would that help me learn about the distros i want to use in sbcs?

Quote
but generally if you aren't going to be using a laptop or extremely new hardware, installing Linux shouldn't be too hard for any one who has enough technical proficiency to build a robot 

lol , its not that , its just the same as i mentioned above

i actually did look for the ubuntu distro,there is the desktop version and the server version
,i suppose its the server version to use in an embedded system(SBC)?
even though if it is it says it needs 128 mb of RAM, which is not available on many,,

by the way ifound this source of free ebooks that talks linux for anyone interested
http://www.tldp.org/guides.html
good ol' BeNNy

Offline JesseWelling

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 707
  • Helpful? 0
  • Only You Can Build A Robot!
Re: Single board computers
« Reply #7 on: June 15, 2008, 01:56:53 PM »
When you use Linux on an SBC you don't 'use' a distribution so much as make your own. With the right tools  it's not so hard just more involved.

Offline emmannuel

  • Full Member
  • ***
  • Posts: 87
  • Helpful? 0
Re: Single board computers
« Reply #8 on: June 15, 2008, 02:26:30 PM »
Yeah with the gumstix one I believe you used their tool, selected what linux modules/apps you wanted in the OS and it would build you the proper binary.

Most forms of embedded linux are actually pretty different user experience than what you'd expect from using any GUI OS.  I recommend you pick up a Linux/Unix tutorial and get comfortable on how to use shells.  Shells are the command line interface for Unix like systems.  Similar to Windows command prompt but more powerful.  I wouldn't bother installing any Linux distro when you can use this http://www.red-pill.eu/freeunix.shtml and get exactly what you need :D

PS: because they are giving you access to some pretty powerful stuff for free they usually have incredibly tight security so you may not be able to do everything you'd like :P

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 830
  • Helpful? 0
Re: Single board computers
« Reply #9 on: June 15, 2008, 03:05:39 PM »
well lets put it this way
its a linux kernel that comes already in the board, like linux 2.6 (olimex boards)
and you have to make a distro , well is this distro the thing goin to control the bot?

in mcus the program would be written in c on pc,then compiled into hex file then downloaded into an mcu and runs there
what is the sequence in sbcs?

thanks
good ol' BeNNy

Offline Fredrik Andersson

  • Robot Overlord
  • ****
  • Posts: 216
  • Helpful? 0
Re: Single board computers
« Reply #10 on: June 15, 2008, 04:16:20 PM »
well lets put it this way
its a linux kernel that comes already in the board, like linux 2.6 (olimex boards)
and you have to make a distro , well is this distro the thing goin to control the bot?

in mcus the program would be written in c on pc,then compiled into hex file then downloaded into an mcu and runs there
what is the sequence in sbcs?

thanks
Thanks for creating this thread. There is tons of useful information as im also in the beginning of learning about SBC's.

Yes, in a way the distro will control the robot. The distro is the collection of all applications and libraries in your system. This includes the programs that makes your robots AI. The kernel isn't going to control the robot really, it rather takes care of low level processes like managing I/O ports, drivers, interupts and such tasks.

What is your favourite way of sending files between two computers? Maybe you like to use a usb stick memory or prefer sending files through the network. These two are ways you could use for sending your programs to your SBC. You don't 'program' it as you do with mcu's. Instead you compile executable files, just like the files you run on a PC but compatible with the SBC's processor (ARM for example). Then you just transfer it to the SBC's memory (could for example be an onboard flash memory, or a usb stick memory connected to one of it's USB ports, if it now has any USB port).
Current project: Pirrh - Portable Intelligent Round Rolling Hexapod

Offline emmannuel

  • Full Member
  • ***
  • Posts: 87
  • Helpful? 0
Re: Single board computers
« Reply #11 on: June 15, 2008, 06:10:57 PM »
I also really appreciate this thread because one of my goals is to learn hardware/software at the level where I can make a ARM/Linux based robot :D

I know enough high level stuff in Linux that I don't feel thats a problem but I'd love to know how to do low level stuff like drivers and controlling hardware through Linux.  I don't know much hardware at all though :P

One thing I think you're getting confused on benji is what Linux is.  It started as just a kernel for the GNU OS. Very few people call it GNU/Linux like its supposed to be called, everyone just calls it Linux OS.

With Linux installed you just have to rewrite your C application that runs on Linux then transfer it to the SBC, overriding the previous one, you don't have to reinstall Linux.

paulstreats

  • Guest
Re: Single board computers
« Reply #12 on: June 15, 2008, 07:02:49 PM »
theres been a lot of talk at work about SBC's just lately, im trying to steer the direction to actually getting some to develop with.

Our directors are talking about wanting us to develop our own sbc's to go inline with a new range of microcontroller boards and to replace older electronics hardware as upgrades to some of the nearly antique industrial machines, does anybody have any experience in this field? - im still trying to get some existing SBC's to work with and learn from though....

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 830
  • Helpful? 0
Re: Single board computers
« Reply #13 on: June 16, 2008, 11:15:20 AM »
Quote
You don't 'program' it as you do with mcu's. Instead you compile executable files, just like the files you run on a PC but compatible with the SBC's processor (ARM for example). Then you just transfer it to the SBC's memory (could for example be an onboard flash memory, or a usb stick memory connected to one of it's USB ports, if it now has any USB port).
thanks a lot for saying these stuff ,made me start to understand ;D

Quote
When you use Linux on an SBC you don't 'use' a distribution so much as make your own. With the right tools  it's not so hard just more involved.
Quote
With Linux installed you just have to rewrite your C application that runs on Linux then transfer it to the SBC, overriding the previous one, you don't have to reinstall Linux.
thats interesting, so what are the tools ?
is it somthin like visual c++  (i use this when i program in c++) ?


Quote
Thanks for creating this thread. There is tons of useful information as im also in the beginning of learning about SBC's.
Quote
I also really appreciate this thread because one of my goals is to learn hardware/software at the level where I can make a ARM/Linux based robot
i was wondering no body braught up the subject before, i think AI robots badly need these boards if they wanna go totally autonomous
« Last Edit: June 16, 2008, 11:16:15 AM by benji »
good ol' BeNNy

Offline emmannuel

  • Full Member
  • ***
  • Posts: 87
  • Helpful? 0
Re: Single board computers
« Reply #14 on: June 16, 2008, 11:31:29 AM »
thats interesting, so what are the tools ?
is it somthin like visual c++  (i use this when i program in c++) ?

For Linux you use gcc (GNU C Compiler) for ARM.

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 830
  • Helpful? 0
Re: Single board computers
« Reply #15 on: June 16, 2008, 11:35:48 AM »
Quote
For Linux you use gcc (GNU C Compiler) for ARM.
thanks ,,ther words im lookin for  :)
good ol' BeNNy

Offline Nyx

  • Robot Overlord
  • ****
  • Posts: 204
  • Helpful? 0
Re: Single board computers
« Reply #16 on: June 16, 2008, 12:17:50 PM »
There's a tool called sftpdrive (http://www.sftpdrive.com/) that allows you to mount a remote linux filesystem as a windows drive. All you need is an ssh login into the server. I don't know if there's a free clone of this around, but it's extremely practical as you can just have one ssh window open to compile and run your code, and another one for looking at files... This way you can remotely edit your code in your favorite editor on your windows machine, including visual c++, and compile it in gcc/g++ in the ssh window.

Offline izua

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
    • izua electronics
Re: Single board computers
« Reply #17 on: June 16, 2008, 07:42:03 PM »
or you could ssh into that machine and edit your code in a Vim running on the robot. I think that's still valid with "your favourite editor" since Vim is my favourite editor :P
Check out my homepage for in depth tutorials on microcontrollers and electronics.

Offline emmannuel

  • Full Member
  • ***
  • Posts: 87
  • Helpful? 0
Re: Single board computers
« Reply #18 on: June 16, 2008, 08:47:33 PM »
or you could ssh into that machine and edit your code in a Vim running on the robot. I think that's still valid with "your favourite editor" since Vim is my favourite editor :P

Vim4life :D

But I do love my Netbeans :D

Offline JesseWelling

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 707
  • Helpful? 0
  • Only You Can Build A Robot!
Re: Single board computers
« Reply #19 on: June 16, 2008, 09:39:30 PM »
Vim!  :-*

Offline Fredrik Andersson

  • Robot Overlord
  • ****
  • Posts: 216
  • Helpful? 0
Re: Single board computers
« Reply #20 on: June 17, 2008, 01:36:47 AM »
or you could ssh into that machine and edit your code in a Vim running on the robot. I think that's still valid with "your favourite editor" since Vim is my favourite editor :P

Or maybe connecting to a CVS server? And making it compile the new code automatically. So if you're away from home you could still work on your robot easily as long as it has power connected to it and is connected to Ethernet.
Current project: Pirrh - Portable Intelligent Round Rolling Hexapod

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 830
  • Helpful? 0
Re: Single board computers
« Reply #21 on: June 17, 2008, 03:40:06 AM »
supposing i did write a program in c++ for the ARM micrprocessor then i save it on a flash usb memory,
then ill plug it into the sbc
, how do i make the sbc then read it?


Quote
For Linux you use gcc (GNU C Compiler) for ARM.
does this compiler run over windows?
good ol' BeNNy

Offline Fredrik Andersson

  • Robot Overlord
  • ****
  • Posts: 216
  • Helpful? 0
Re: Single board computers
« Reply #22 on: June 17, 2008, 08:18:55 AM »
supposing i did write a program in c++ for the ARM micrprocessor then i save it on a flash usb memory,
then ill plug it into the sbc
, how do i make the sbc then read it?


Quote
For Linux you use gcc (GNU C Compiler) for ARM.
does this compiler run over windows?

I assume that you have Linux installed to the integrated flash memory, that the usb memory only contains the memory, not the distribution itself.

In the shell, type:
Code: [Select]
fdisk -lAll connected storage devices should be now be listed (except the built in flash i think) starting with "sda1". sda means it is the first storage device and "1" means it's the first partition on the device.
Find which one is your usb memory and mount it. First you create a new directory in "/media/" which is where storage devices normally is mounted. When you mount the memory you makes it ready for using and installs it to a directory. This is what you type in the shell (assuming the device is sda1 of course):
Code: [Select]
mkdir /media/usbmemory
mount /dev/sda1 /media/usbmemory
Then you can traverse to the mounted usb memory's directory and run whatever program you've created (which in this case is "helloworld". You run a program by typing it's name):
Code: [Select]
cd /media/usbmemory
helloworld

Hope this isn't over-explanatory, i just wanted to make sure you understand everything when you do it.
« Last Edit: June 17, 2008, 08:20:15 AM by Fredrik Andersson »
Current project: Pirrh - Portable Intelligent Round Rolling Hexapod

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 830
  • Helpful? 0
Re: Single board computers
« Reply #23 on: June 17, 2008, 09:09:20 AM »
thnx freddy
good ol' BeNNy

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
    • dunk's robot
Re: Single board computers
« Reply #24 on: June 17, 2008, 09:34:52 AM »
hey Benji,
not sure if this will clear things up or just confuse you more....

Linux is an operating system in the same way that windows-xp on a PC, windows-ce on an embedded platform or Mac-OS on a Mac are all operating systems.

an operating system on it's own will not control your robot.
the operating system will allow you to run your robot control program.

so why have an operating system?
well it does a lot of the hard work for you.
rather than having to write drivers for network cards and storage devices the Operating System will look after that layer for you so your robot control program will be able to offload this work to the OS.
an OS is not required on smaller CPUs but unless you want to write your own TCP/IP stack and USB-Host drivers etc you are going to need one on any CPU that is connected to a lot of modern IO devices.
an OS also looks after threads, enabling you to run more than one program at once.

so let's presume this clears up what an OS is and why you want one.

what is a Linux distro?
the simplest way to explain this is that a distro (distribution) it the Linux kernel and all necessary programs and install scripts needed to make it run on a particular architecture.
the most common distros run on x86 PC hardware. ubuntu.com is a good one to try if you have an old PC sitting around.

there are distros that will run on hardware platforms other than x86 but it is often a lot of extra work trying to get them working for your self.
i would *strongly* recommend purchasing an embedded system that comes with it's own supported distro. this way you can start learning about Linux from a known working platform.

while your questions on how to do specific tasks are valid most of the answers won't really make much sense until you try using Linux.
most people use the GCC compiler for C and C++. you can cross compile on a windows machine and then transfer the compiled binary to your embedded platform but all this should be explained in the documentation for the embedded platform.

if i were you i'd find an old PC and install Ubuntu on it.
alternatively, there are distros that can run from a CD-ROM and don't need installed to hard disk at all.


dunk.

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 830
  • Helpful? 0
Re: Single board computers
« Reply #25 on: June 17, 2008, 04:33:53 PM »
thanks a lot dunk for this explanation,
i know the first thing for me to do is to install linux and see it

the problem i was facing is that i dont understand how an OS would run on an embedded system without monitoring and control
good ol' BeNNy

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Single board computers
« Reply #26 on: June 19, 2008, 09:01:22 AM »
ARMlib:
http://hubbard.engr.scu.edu/embedded/arm/armlib/index.html

I've considered using an ARM in the past because of the nice processing power it offers . . . but they are more limited in I/O so I changed my mind . . .

 


Get Your Ad Here

data_list