BeagleBone Black programming IDE C/C++

Hello,

I have since shortly the BBB and it works very nice, I have used the Cloud9 interface and installed the AdaFruit WebIDE. Both works nice, but i like to programming offline in an IDE, then compile it and send it to the BBB.

Since i’m very new in the Linux world I have searched the internet for this solution, I found several solutions using Eclipse and als Netbeans with the possibility to compile on the BBB itself. Several people gives the advise not to do that, because the app would be slower.

I use windows 7 32-bit as computer, but it is no problem to install Ubunutu on the computer, the BBB has the Angstrom distrubution on it.

Tips are welcome and when it work I will make an tutorial so anybody can use it.

Well,

There is already plenty of tutorial for that :stuck_out_tongue: =>

http://www.youtube.com/watch?v=vFv_-ykLppo
http://www.lvr.com/eclipse1.htm

enjoy,

Micka.

Thank you Micka, I will give it an try if this work with the BBB.

Is an Windows version also possible?

Well, if you find out how to cross Compile on a windows Machine, I’m open to any suggestion, but to my knowledge, I don’t know . ( And I would like ).

Micka,

In theory, you could do it with Cygwin. I have not even investigated this, so I don’t know if it’s actually possible. I know that years ago some people were cross-compiling some binaries on Cygwin but I have no idea what level of support exists.

It’s probably easier to create a live linux usb stick and just reboot into that to do your cross-compiling, if I were to hazard a guess.

If you have a “decent” multi-core x86 box/laptop, you may even be able to get virtual-box/ubuntu/other-linux going…

/venkat

Linaro has win32 binaries . . . and yes they do work. It also works well with code::blocks on Windows 7 x64. I have been compiling all my userland stuff thus far from Windows. Which is to say, not a whole lot.

I am not a gcc toolchain expert, but the applications I’ve compiled thus far will not run on Angstrom. They do work on RCN’s build of debian though, which is what I personally use. My understanding is that this has to do with the libc version/type used, as well as some ABI stuff. Again though, I am no expert with gcc so . . .

It is possible that one of the Aarch64 Linux cross-toolchains for Linux may work for Angstrom ( I am unsure ). Personally I am using the arm-linux-gnueabihf crosscompiler for Windows.

Passed that, I am possibly using less than optimal compiler / linker settings. Just using basic / std gcc arguments. Eventually I do plan on blogging on this, as what I have at this present point in time was not very hard to set up.

Thanks for you answer, I’m at this moment busy to use Ubunutu 12 with a VMplayer on a Windows machine, I will let you if it works.

Hi William,

Can you elaborate upon your settings.
Do you use Eclipse on Windows and configure this toolchain in Eclipse?
Only the userland can be programmed this way? Can i do kernel programming?
I have heard of DEVROCKET IDE from Montavista. It enables both kernel and userspace programming and debugging. Has somebody used it?

Regards,
Saket Sinha

Hello,

I have followed the tutorial witch Mickae give’s me a link to.

I used VMplayer, with Ubuntu 10.04, installed Eclipse with the C/C++ developments tools and compiled the hello world programm and transfer it to the BBB and ran the programm and it works.

Thanks al for you help!

What I like to do is just compile things on my local linux box (I don't
bother with a cross compiler), then I have a make target 'upbuild' which
upload to the bone and builds there. The nice thing about this approach
is you don't have to mess with a different cross compiler/IDE for
each different type of target system you work on. I use the same setup
for arduino (though you do have to use avr-gcc cross compiler there).

Britton

What I like to do is just compile things on my local linux box (I don't
bother with a cross compiler), then I have a make target 'upbuild' which
upload to the bone and builds there.

First you compile your programs on your Linux Box. So, if your programs use something that is only available on the target board, your programs will not run on the Linux Box. You are only "checking" the syntax.

After, you are compiling your programs on a machine that is much slower than your Linux Box, and you need to have there all the development tools installed...

The nice thing about this approach
is you don't have to mess with a different cross compiler/IDE for
each different type of target system you work on.

When you are cross-compiling for different targets, you need to change the cross compiler, but that is easy. You usually just change a variable on a makefile, or define an environment variable….

Why do you need to change the IDE? Last time I checked, all kinds of IDEs (from vim and Emacs to Eclipse and Xcode) support different compilers and different targets.

Yes, I am calling vim an IDE because: it has syntax high-lighting, and checks the syntax when saving a file, and that's what many people want (or use) in an IDE.

You need a full development environment installed on each type of target you work with.

This is possible on the BBOne, but for smaller boards, is impossible:

I use the same setup
for arduino (though you do have to use avr-gcc cross compiler there).

See my point?

Britton

My best regards

Paulo Ferreira

What I like to do is just compile things on my local linux box (I don't
bother with a cross compiler), then I have a make target 'upbuild' which
upload to the bone and builds there.

First you compile your programs on your Linux Box. So, if your programs use something that is only available on the target board, your programs will not run on the Linux Box. You are only "checking" the syntax.

Yes. Which is all you can check outside of an emulator. But emulators are
pointless if you have the device right next to you anyway.

After, you are compiling your programs on a machine that is much slower than your Linux Box, and you need to have there all the development tools installed...

The nice thing about this approach
is you don't have to mess with a different cross compiler/IDE for
each different type of target system you work on.

When you are cross-compiling for different targets, you need to change the cross compiler, but that is easy. You usually just change a variable on a makefile, or define an environment variable….

At least one of the posts earlier (if not the whole thread) was describing
this not working this simply, and in my experience it rarely does. Theory and
practice you know.

Why do you need to change the IDE? Last time I checked, all kinds of IDEs (from vim and Emacs to Eclipse and Xcode) support different compilers and different targets.

Yes, I am calling vim an IDE because: it has syntax high-lighting, and checks the syntax when saving a file, and that's what many people want (or use) in an IDE.

I agree that vim works fine.

You need a full development environment installed on each type of target you work with.

This is possible on the BBOne, but for smaller boards, is impossible:

I use the same setup
for arduino (though you do have to use avr-gcc cross compiler there).

See my point?

No. On tiny targets you need cross-compiler, but why torment yourself
dealing with one for targets that can self-host? I target more different
boards than just BB + arduino, most can self-host. You can put something like
this in make (the only real gotcha here is the fact that ssh will denude your
recursive make invocation of MAKEFLAGS in the environment, which is
make's normal mechanism for passing them along):

# WARNING: upload deletes the BID every time it runs.
.PHONY: upload
upload: perl_syntax_ok.stamp
  $(MAKE) -$(MAKEFLAGS) clean # Stop i86 binaries ending up on bone
  ssh $(BBL) rm -rf $(BID)
  scp -r $(shell pwd) $(BBL):
  test "$(BID)" = "$(PROJD)" || ssh $(BBL) mv $(PROJD) $(BID)

.PHONY: upbuild
upbuild: upload
        # NOTE: I think its ssh that's foiling make's normal strategy of
        # passing make flags to submakes through the environment, so we just
        # add them back in textually.
  ssh $(BBL) 'cd $(BID) ; $(MAKE) -$(MAKEFLAGS) clean default'

Britton

sir we need some basic tutorials on how to interface BBB and eclipse on linux platforms . so kindly guide me with the necessary tutorials and help us at the earliest sir. my mail id is ecofriendvenki@gmail.com
thank you.