Run with Plain C/C++

Hi All!

Anyone could show us how to run OMAP by only using plain C/C++?
(including running the DSP).

Thanks you!



Dieng wrote:

Hi All!

Anyone could show us how to run OMAP by only using plain C/C++?
(including running the DSP).

it will not work, the OMAP and the DSP only run plain assembly code.

Um… don’t compilers turn C/C++ into assembly/machine code?


What I meant is: running the OMAP without Linux



Your question is very open-ended so we don’t know if you’re wondering where the compiler toolchain is, how to use it, how to get your code into flash, how to get a bootloader to start your code, etc.

You can certainly go without an OS if you desire, but your question is so open-ended that it would require no small essay to address all of the steps you would have to take. I think that’s why you haven’t gotten many replies. Try to be more specific.


I was also waiting for some answers :slight_smile:
what I am looking for is some plain C code that runs on the beagleboard and that are opensource.
I could then adapt them to my needs. Of course I can do everything from scratch but both knowledge and time miss me.

If your question was how to run plain C code what I’ve done is compiled the example for USART and LED with the arm-none-eabi toolchains from codesourgery
You should be able to find them easily on the list if no, ask me I’ll re-find them and point it to you.

Then I have managed only two things :

  • flash the code
  • load the code from the MMC cards with the console after the xloader process.

You should normally be able to avoid SDcard manipulations and use serial link but I didn’t get it …

To compile the code I use -Ttext compile option. (Have a look at the Makefile provided with the examples)
I used the go instruction after loading it from the MMC when I used the serial link.

I you have more questions I’ll be happy to share my little knowledge :slight_smile:



Hi there!

Yeah! Can you share your examples?




the examples I used are from the list actually :slight_smile:
Here are some links :

for the serial link :

for blinking the leds :
same links actually :slight_smile:

To compile I used the recommended none-eabi toolchains from code-sourgery.

I’ve used the following flags :
CFLAGS= -c -g -Wall -O0 -mcpu=cortex-a8 -march=armv7-a
LDFLAGS= -mcpu=cortex-a8 -march=armv7-a -Wl,-Ttext,0x80000000,-T$(LDS) -nostartfiles -nostdlib -nodefaultlibs
ASFLAGS= -c -g -Wall -O0 -mcpu=cortex-a8 -march=armv7-a

(don’t forget to build a binary from your elf)
Copy the binary on the boot partition of the sdcards
Then just get it in RAM from the xloader command prompt (like the uImage in tutorials)
And finally a
go 0x80000000 should make it run.

I haven’t been really further but someone has I’m really intersted !!!

Hope I’ve been clear and able to help, ask for precision if no;)