Development setup

Hi all,

Does someone know if there is any information available to setup a development environment (IDE) running under MS Windows or Ubuntu (in virtual machine under windows) to develop C/C++ code for the BBB

Thanks
Rob

Eclipse, Code Composer Studio (CCSV6) and ARM DS5 all do a pretty decent job.

Regards,
John

Thanks John!

Do you know if there’s a dedicated C/C++ library available to access the GPIO/SPI/I2C

Thanks, Rob

https://msdn.microsoft.com/en-us/commandline/wsl/about

This isn’t ready yet, but might be useful for you windows developers…

Regards,

From user space or kernel module?

Regards,
John

Not 100%, from the blog and videos, it looks like a user space with kernel hooks.

RE: From user space or kernel module?

Sorry i am real new to linux. My intention is to create an executable that access low level IO. I assume this is user space. In any case not a device driver or so…

I would recommend getting Derek Molloy’s book which covers everything you need. Search Google for Derek Molloy who has a nice website that also covers several of these topics. His youtube video’s are excellent.

Regards,
John

Thanks John, i will :slight_smile: I am bare metal embbeded developer for 30+ years but getting started with (embedded) linux is not really self explaining :wink:

Then you are where I was probably 10 years ago. Fortunately there are good references around that will make your life much easier. Also, you have chosen one of the best platforms to work on and this user group has alway been really helpful. Best advice, is to always explain what you are trying to do, what results you see and most important, always list your kernel version and Debian version.

Regards,
John

I’m exactly the same in experience . If you wrote an app for bare metal you would have the advantage of understanding every thing below it with your background . Writing a Linux app for myself that access the lowest level without understanding the underlying complexity is something I’m unwilling to do. If your just writing a Linux app you probably less apt to experience pain using a make file. You didn’t mention why an IDE ?

Thanks John, i will :slight_smile: I am bare metal embbeded developer for 30+ years but getting started with (embedded) linux is not really self explaining :wink:

are you familiar with gcc at all ? I’d actually learn gcc, make, autotools etc, and use an NFS share, with a local( to Windows ) text editor. That is if I undestand your situation correctly. You’re using Windows as your main workstation OS ?

Anyway, once you understand the basics of the gcc toolchain, and all that you can pretty much pick any IDE you want, if one is really required. I’ve been programming many years myself ( since the early 90’s ) and actually find my self using command line tools more, and more often. Maybe you’re in the same boat, maybe not . . .

Rob:

I would read the Molloy book/Website/Videos.

He explains in detail how to set up Eclipse + gcc cross-compile toolchain. under Windows.
I have also done the same thing on a VM running Ubuntu under windows, or directly on a PC running Ubuntu.

Molloy, unfortunately does all of his C I/O examples via the Linux pseudo-file I/O method, which is very slow.

If you are looking for a low level, public domain, C I/O package for GPIO, SPI and I2C, try:
https://github.com/VegetableAvenger/BBBIOlib

If you find a better one, please report back. There are not many out there.

I have had good luck with it running GPIO, high speed SPI transfers, lots of I2C etc.

In a tight ON/OFF loop, the fastest I can toggle a GPIO pin using Linux pseudo-file I/O is about 6 kHz.

Using BBBIOlib, I can toggle a GPIO pin at about 2.4 MHz, almost a three orders of magnitude improvement.

— Graham

Rob:

I would read the Molloy book/Website/Videos.

He explains in detail how to set up Eclipse + gcc cross-compile toolchain. under Windows.
I have also done the same thing on a VM running Ubuntu under windows, or directly on a PC running Ubuntu.

Molloy, unfortunately does all of his C I/O examples via the Linux pseudo-file I/O method, which is very slow.

If you are looking for a low level, public domain, C I/O package for GPIO, SPI and I2C, try:
https://github.com/VegetableAvenger/BBBIOlib

If you find a better one, please report back. There are not many out there.

I have had good luck with it running GPIO, high speed SPI transfers, lots of I2C etc.

In a tight ON/OFF loop, the fastest I can toggle a GPIO pin using Linux pseudo-file I/O is about 6 kHz.

Using BBBIOlib, I can toggle a GPIO pin at about 2.4 MHz, almost a three orders of magnitude improvement.

I will agree that the Derek Molloy book (exploring beaglebone )is a fairly good start into the tools, and techniques used for the software used with the hardware. But it is by no means an exhaustive resource when it comes to many things.

BBBIOlib is also no longer maintained*.* which means it could have issues working with the newer kernels*.* The good news however is the it basically looks like an abstraction for /dev/mem/ and mmap(). Which surely if Rob has had 30 years embedded programing experience he’ll have zero problems twiddling around directly with the device registers.

Another take on GPIO problem, not as well documented, but handling for
the user all the conversions between bits and GPIO pins. Also
implements support for I2C and SPI: https://github.com/piranha32/IOoo

Jacek.

Thanks all for the valuable information. This should give me a quick start. I am familiar with GCC and played around with Qt Creator on Linux…
I will download the IO libs and see if i can talk to some connected io devices.

A lot of reading ahead of me :wink:

Thanks!!