Loading the .out file (executable file) on to BBB and running

Hi,

I am using beagle bone black board in Linux Ubuntu distribution…my requirement is i need to write simple code on terminal(filename.c) using processor SDK i need to compile it and need to create .out file for the code and after that i need to load that .out(binary file-executable ) file on to beagle bone black board and make it to work on board and get output on terminal…

I am not getting how to do it… how to create . out file and load into board…

please help me to resolve it??? i am new to this board…

On Sun, 7 Jul 2019 21:09:23 -0700 (PDT), Megha Bhirade
<meghsbhirade@gmail.com> declaimed the
following:

Hi,

I am using beagle bone black board in Linux Ubuntu distribution..my
requirement is i need to write simple code on terminal(filename.c) using
processor SDK i need to compile it and need to create .out file for the
code and after that i need to load that .out(binary file-executable ) file
on to beagle bone black board and make it to work on board and get output
on terminal...

I am not getting how to do it... how to create . out file and load into
board...

please help me to resolve it??? i am new to this board..

  For simple stuff, you would probably find it faster to actually do the
building ON the BBB, using the ARM native GCC.

Dennis,

I’m afraid I’m taking this a bit off topic, but part of your answer tantalized me:

…I also should see about setting up Buster (Debian 10) in VirtualBox first; I do have Stretch in VirtualBox already…

I’m pretty sure you don’t mean what I hope you mean, but do you have a Beaglebone VM environment set up? Or are you just referring to having the current version of x86/64/standard desktop Debian VM running under Virtualbox?

I know there have been efforts in the past to emulate the old beagleboard devices under qemu but I would be thrilled to be able to run a modern emulated am335x in any desktop environment. I looked into bringing that back up to date but it was about 3 steps outside of the actual tasks I need to work on and simply not worthwhile to do so.

Back on topic, as to Megha’s question, there are some details about cross-compiling here which have been useful to me in the past, though now to ensure all the pieces end up in the correct places I have stayed with compiling directly on the machine.
http://gnutoolchains.com/beaglebone
https://jumpnowtek.com/beaglebone/BeagleBone-Systems-with-Yocto.html

Best regards,

Jim

On Mon, 8 Jul 2019 13:21:43 -0400, Jim F
<jimfriel@gmail.com> declaimed the following:

I'm pretty sure you don't mean what I hope you mean, but do you have a
Beaglebone VM environment set up? Or are you just referring to having the
current version of x86/64/standard desktop Debian VM running under
Virtualbox?

  No -- just the Intel compatible OS.

  And I'm afraid Molloy 2nd Ed may already be dated -- I'm not finding
the cross-build toolchain in Debian Stretch. No idea if the section on
setting up QEMU is still valid either.

wulfraed@stretch:~$ apt-cache search cross-build-essential
wulfraed@stretch:~$ apt-cache search crossbuild-essential
wulfraed@stretch:~$ apt-cache search armhf
wulfraed@stretch:~$

o/~ talking to myself in public o/~

On Mon, 08 Jul 2019 14:07:15 -0400, Dennis Lee Bieber
<wlfraed@ix.netcom.com> declaimed the following:

And I'm afraid Molloy 2nd Ed may already be dated -- I'm not finding
the cross-build toolchain in Debian Stretch. No idea if the section on
setting up QEMU is still valid either.

wulfraed@stretch:~$ apt-cache search cross-build-essential
wulfraed@stretch:~$ apt-cache search crossbuild-essential
wulfraed@stretch:~$ apt-cache search armhf
wulfraed@stretch:~$

  Mea culpa...

  Appears, since I'd installed Stretch from DVDs, it had never looked at
the online "main" repository. Just added that to the source list and after
an apt-get update the cross build stuff is showing up in a search.

  So I am proceeding on the basis that Molloy 2nd Ed IS VALID.

On Mon, 08 Jul 2019 14:07:15 -0400, Dennis Lee Bieber
<wlfraed@ix.netcom.com> declaimed the following:

  And... success...

Hi jim,

from the processer SDK i can get GCC compiler only, can i compile the simple code printing hello word on terminal using GCC compiler and execute the file ??

Ex : vi test.c(simple hello world program).
gcc test.c -o test.o
./test.o
like this once i login to beagle bone black???