Newbie questions on general complier usage with BBB

We have (3) three of the following for our testing…

  • Beagle Bone Black
  • Rev C.
  • Debian 7.5-2014-05-14
    and we have used the following on the BBB while experimenting with them…
  • BoneScript
  • Python
  • JavaScript
  • Cloud9 IDE
    We also have picked up a few books and read through and worked with many of the examples i.e. “Getting Started with BeagleBone” by Matt Richardson etc. All of this has worked very well for us, but it just seams a bit like a “toy” at this level.

I still feel very ignorant with the BBB. My background is 20+ years of Microchip. Complete layout of circuit boards built from the ground up. Complied program (with full debug IDE). We used MPLAB and programmers like an ICD to load and run the program on the Microchip.

We would like to take our product to the next level (15 year old design), and it appears a TI ARM is the way to go. And it appears a test board like BBB is a great starting point. Reading the TI AM335x Sitara Processor product data sheet over the AM335x can do (from a hardware level) most anything that we are accustom to with the Microchip series of products (Hardware Uart, SPI, Capture Inputs, PWM, Interrupts (hardware and software) etc.).

So the very ignorant questions…

  1. How do you load an image on a blank BBB?
  2. Are there stand alone compliers, where you can developed a program that will run natively on the Debian OS? Not an interpreted version of the program, but an actual complied to machine code language, one that can handle the hardware specific to the BBB?
  3. Can a complier handle tasks with functions like button de-bounce, or more complex functions like capture with the eCAP?
  4. Is the Code Composer Studio (CCS) what we need to be looking at? http://www.ti.com/tool/ccstudio-sitara Will this work on the BBB?

Thank you,

Confused, Rodney

Rodney:

A.) This is not your grandfather’s PIC.

B.) The BBB is intended/supported for a Linux environment. You really need to understand Linux, specifically embedded Linux to be successful.

C.) Yes, you can write code, C or Assembler, down on the metal, but then you are re-inventing and re-writing everything, which is missing the whole point of using Linux.

D.) If you buy into the Linux thing, then it usually involves using the GCC compiler, and an IDE like Eclipse, and all the associated tools, and writing programs to run in a Linux environment.

E.) You can do real time like things on the BBB, but the Linux supplied is not a Real Time OS. RT variants are available. Or, a lightly loaded Linux will probably do just fine.

F.) Yes, you can write things like button de-bouncers.

— Graham

How do you load an image on a blank BBB?

There are no blank BBB’s shipped that I’m aware of. However . . .

a) a boot medium is needed that recognizes the hardware. Usually requiring an sdcard. I’ve also heard of loading serially, but have not looked into it at all. Aside from reading a bit on it in the TRM a couple years ago.

b) A functional Linux image is needed for the standard tools needed to move files / directories where they need to be.

c) A bit of time to carry out a) and b)

Are there stand alone compliers, where you can developed a program that will run natively on the Debian OS? Not an interpreted version of the program, but an actual complied to machine code language, one that can handle the hardware specific to the BBB?

Yes, however, you would probably be best served by using a cross compiler. The GCC toolchain works in either case, and can be used with Eclipse, and code::blocks at minimum. Hell you can even use Visual Studio( cross compiling ) using make files - If you’re a glutton for punishment.

Can a complier handle tasks with functions like button de-bounce, or more complex functions like capture with the eCAP?

Compiler ? No. As a function of any programming language / skilled programmer ? Yes. I’ve seen de-bounce code written in a single line using a ternary operator. Typically though de-bouncing is best done using electronic components. At an added cost of course. . . So “best” is purely subjective. Each way has it’s attractions.

Is the Code Composer Studio (CCS) what we need to be looking at? http://www.ti.com/tool/ccstudio-sitara Will this work on the BBB?

As an embedded device developer, you should never stop looking into your options - Ever. The age old stagnation argument . . . With that said, yes you can use CCS, and you can also use “free” ( as in beer ) open source tools such as GCC. Me personally, I use GCC for a few reasons, but if you like all the bells and whistles that CCS offers perhaps that may serve you better ? Only you can answer that questions.

By the way, if you’re looking for speed. You’re probably wanting to use C. As a Programming language.

Rodney:

I highly recommend this book. The answers to all your questions with examples are either

answered in this book, or Derek Molloy’s website.

Exploring BeagleBone: Tools and Techniques for Building with Embedded Linux Paperback – December 31, 2014
by Derek Molloy (Author)

ISBN-13: 978-1118935125 ISBN-10: 1118935128

http://www.amazon.com/Exploring-BeagleBone-Techniques-Building-Embedded/dp/1118935128/ref=sr_1_1

— Graham

Thank you for the replies. We will look closer at the GCC compiler, and check out a copy of the “Exploring BeagleBone” - Rodney