6
\$\begingroup\$

How can I easily start off professional development with the BeagleBoard XM?

  1. Which OS should I work with? .. my choices include:

    • Ubuntu
    • Android
    • MeeGo
    • WinCE
    • QNX
    • Angstrom (preinstalled)
    • Symbian
    • Gentoo
  2. How do I install an OS onto the board?

  3. Which IDE do I use?

  4. How do I debug or run my code on the target?

I bought a brand new Beagleboard XM to interface to a camera module, capture video and do some image processing. The camera uses an 8-bit parallel port interface to transfer images.

What do you recommend?

\$\endgroup\$
2
\$\begingroup\$

I tried Meego and Angstrom, and settled on Angstrom. It's far easier to make it work, and very stable. The Meego port for beagleboard, on the other hand, had many glitches. I didn't test the other OSes, but I'd say Angstrom seems to be the best choice for both community support and stability.

To install the OS is quite simple: you download an OS image to an SD card and make some changes in the bootloader to make it boot from the SD. There are some ready-made OS images at the Angstrom website, along with recipes to install it on the SD. Basically you'll create two partitions: a smaller FAT for the boot and kernel, and the other for the root filesystem containing everything else. Here's one site containing instructions for SD boot: http://www.xora.org.uk/2009/08/14/omap3-sd-booting/

You could also make it boot from the NAND flash, but I'd recommend to save this option for later when you're more comfortable with the device. Since the NAND is limited, you'll need to create a custom image using bitbake to make it fit, that's the kind of work you won't want to do right now.

About debugging, the best way is for you to buy an ethernet-to-usb interface + usb hub. Then you run gdbserver in your beagleboard and can use any gdb-compatible debugging IDE at your PC (I use Eclipse CDT).

For the camera interface, the easiest way would be to use the GPIO pins at the expansion connector; the drawback is that you may have a limited frame rate due to the bandwidth limitation, and also yo'll make the processor busy while transfering the image; on the other hand the GPIO is so flexible that you probably won't need any additional circuit to connect them - provided their voltage is compatible (the GPIO works at 1.8 V). There can be other ways if you want a higher frame rate and need the processor available for other parallel tasks, but I'd recommend to leave that for a second round of design.

\$\endgroup\$
  • \$\begingroup\$ I have the BeagleBoard XM, ver A3 and it doesn't have a Nand on it, so I would have to go with the SD card option. Regarding the camera interface any idea what is the bandwidth limitation. I would like to interface a 5MP camera and acquire full res @ 15fps. Also how do I locate the drivers for the cam, does Angstrom have built-in cam drivers? The cam module that I has an omnivision image sensor on it. \$\endgroup\$ – Kevin Boyd Dec 28 '10 at 6:53
  • 1
    \$\begingroup\$ Looks like someone just wrote a Linux driver: boundarydevices.com/blogs/… That's good news, but it's very likely that it's not in the Beagleboard kernel yet. Looks like the XM is using 2.6.35 at present. \$\endgroup\$ – pingswept Dec 28 '10 at 15:57
  • \$\begingroup\$ @Kevin: well, I made some tests and the highest frequency I got for flipping a bit was about 4 MHz in a simple loop. If you put some logic then it goest to 1 MHz. That would mean that a QVGA frame would take 320x200/1M = 64ms. That'd give you a maximum frame rate of 15 fps, if you can use the processor time exclusively for it. \$\endgroup\$ – fceconel Dec 28 '10 at 16:16
  • \$\begingroup\$ @Kevin #2: I should mention also that the tests I did were in C, and when I examined the generated assembly code I saw that it could be made a lot more efficient if written directly in assembly (for that particular case). I didn't try it, though, but maybe there's some hope to have better results. \$\endgroup\$ – fceconel Dec 28 '10 at 16:18
  • \$\begingroup\$ Did you try on the BB or the BBXM?, you see that BBXM has a dedicated camera interface port so it should have good throughput, shouldn't it? Also another point to note is Leopard imaging makes camera modules for the BBXM and these modules are upto 5MP in res, they also must have built the drivers for these, so I guess they might have got it working but I'm not sure what frame rate they support. \$\endgroup\$ – Kevin Boyd Dec 29 '10 at 4:39
2
\$\begingroup\$

I would start with Angstrom Linux, and then move to Ubuntu if you have to. I doubt that you will need to switch just to make the camera work.

I believe the OS for the Beagleboard XM is stored on the SD card, so if you decide you do need to switch to something else, you might get a second SD card, so you can leave the original OS intact. Depending on the OS, you can probably find a prebuilt SD card image that will allow the Beagleboard to boot.

For an IDE, I would recommend starting with a text editor that works over SSH. You might start with Nano, unless you've used Vim or Emacs before.

I'm not sure about debugging C++ on the Beagleboard, but you can start compiling in Angstrom with g++. You'll be able to execute code from the commandline.

\$\endgroup\$
  • \$\begingroup\$ if you can ssh, then you can use gdb for debugging code, or possibly foward the gdb traffic and use a graphical debugger on your computer \$\endgroup\$ – Earlz Dec 27 '10 at 0:55
  • \$\begingroup\$ I'm sorry but I'm new to this kind of development. Just to clarify would I be doing all my development on the BeagleBoard itself or would I need a PC + Beagleboard setup. I have a windows OS on the PC but I would mind setting up Linux if that's going to make development any easier. \$\endgroup\$ – Kevin Boyd Dec 28 '10 at 6:59
  • \$\begingroup\$ Sorry, I should have been more clear. The usual method is to use an SSH terminal on a local PC (could be Windows with Cygwin or Mingw, but Linux is a better fit). You SSH to the board and then run the editor on the board. You could also do the coding on your PC and copy the binaries over, but this means setting up an ARM compiler ("cross-compiling") on your PC, which can be a bit tricky. \$\endgroup\$ – pingswept Dec 28 '10 at 15:53
  • \$\begingroup\$ Just to add: Earlz and Johan are correct to recommend gdb and JTAG. It's kind of hard to set up, and the hardware can be expensive, but it's great once you get it going. I wouldn't think it was necessary to get started. \$\endgroup\$ – pingswept Dec 28 '10 at 15:54
  • \$\begingroup\$ I don't think you need a JTAG unless you intend to debug the kernel and/or drivers. For standard apps, using gdbserver in the board accessed by a gdb-compatible IDE in a PC is far easier. \$\endgroup\$ – fceconel Dec 29 '10 at 22:46
2
\$\begingroup\$

OS

It really depends on what you would like to do?

You have three options that is Linux kernel based:

  • Angstrom is a classic GNU/Linux distribution created for this type of devices.
  • MeeGo is the cool Nokia/Intel Qt based platform that will be used a lot in infotainments systems in cars (and in some Nokia phones).
  • Android the google phone OS, mostly Java

And some Desktop Linux distributions:

  • Ubuntu
  • Gentoo

And then some other OS:

  • Symbian that is a 99% phone OS (I would not recommend it)
  • QNX I think is has some real time stuff that could be fun to play with
  • WinCE And you have the classic looked down Windows platform.

And I would actually start to play with the stuff in this order

  1. Angstrom, since it seems to be easiest on the Beagleboard
  2. MeeGo since Qt is a really nice lib to work with
  3. Android since it is good to know
  4. QNX

But for the rest of this question I will only focus on the Linux based options.

Install OS

It depends, but most of them uses the SD card.

But in debug mode you can use a combination that loads the kernel over tftp and the the runs the root filesystem over nfs

IDE and debug

To play the kernel you need the command line, a good editor like vim/emacs. To debug the kernel you need a debugger to run over the jtag.

But for application development you could use the classical way (with a good editor and a lot of makefiles). Or maybe something like eclipse.

Application debugging is usually done with gdb.

On the linux based you could use a normal text editor or maybe Eclipse.

\$\endgroup\$
  • \$\begingroup\$ I would have to buy a usb or parallel port tool for debugging over jtag, right? What would you recommend for that? \$\endgroup\$ – Kevin Boyd Dec 28 '10 at 6:49
  • \$\begingroup\$ @Kevin: Í tried to use a affordable OpenOCD based jtag, but today that project has problem with internal caches on the Cortex A8 chip that the BeagleBoard is using.... However I know that the Expensive jtags from Lauterbach do work to debug the kernel. (They are good but expensive)... \$\endgroup\$ – Johan Dec 28 '10 at 6:57
  • \$\begingroup\$ Thanks! Any idea how to get hold of cam drivers, if I have to interface to a cam module? \$\endgroup\$ – Kevin Boyd Dec 28 '10 at 10:29
  • \$\begingroup\$ @Kevin: No idea, but it can't hurt to ask the maker of the cam? And have a look a video 4 linux, en.wikipedia.org/wiki/Video4Linux \$\endgroup\$ – Johan Dec 28 '10 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.