1

I am trying to run a HelloWorld project on BeagleBoard. For this I am using RVDS to create the library and then CodeSourcery to create the executable for BeagleBoard.

To create a library through RVDS I am using below command line:

armcc --cpu cortex-a8 -c hello_world.c --c99 --apcs=/fpic --no_hide_all -O3 -Otime --vectorize --no_unaligned_access -I"D:\RVDS\hello_world" -I"C:\Program Files\ARM\RVCT\Data\4.1\713\include\windows"

But this command line only creates object files and not the library. To create the library I used armar command, but I am not sure if this is correct. Hence my first question is how can I create a library using RVDS command line.

I also tried creating the library using RVDS eclipse environment by selecting a new Static Library project. Once the library was created I used CodeSourcery to create the executable using:

arm-none-linux-gnueabi-gcc -Wall -I. -L. test_hello_world.c -lhello_world -o test_hello_world

But if I try to run this executable on BeagleBoard, it doesn't work. Hence I think there is something wrong in the way I am creating the library.

Please let me know if someone has tried the combination of RVDS & CodeSourcery to create an executable for BeagleBoard.

Thanks for your help.

viraptor
  • 33,322
  • 10
  • 107
  • 191
user1116700
  • 47
  • 2
  • 10

1 Answers1

0

If the beagle board is running Linux you can use the device's version of gcc to compile your hello world. That way you don't have to setup a cross compiler on the desktop.

nathan
  • 4,612
  • 6
  • 32
  • 33
  • Thanks for your reply Nathan. BeagleBoard is running Linux through SD Card. I am compiling my source code on Win7 and then copying the executable on the SD Card. and then running that through TeraTerm. Is there a way to cross compile my code on Win7 and then use it on BeagleBoard? If not then can I use TeraTerm to compile source code on Beagle Board and then run it on Beagle Board? – user1116700 Jan 03 '12 at 20:11
  • If your Linux distro comes with GCC installed (ours did) then yes, you can compile and run your source on the Beagle Board without installing the ARM GCC toolchain on Windows. In fact I think that would be far easier. – nathan Jan 03 '12 at 20:22
  • I checked and mine doesnt have GCC installed. Is there a way to do the cross compiling on Windows. I will need it for my future projects where I use NEON instructions for optimization and hence use RVDS for compiling. – user1116700 Jan 03 '12 at 21:52
  • I've setup CodeSourcery successfully for AT91SAM9261, but not the Beagle. If you are running Angstrom Linux on your Beagle then you should be able to install gcc via "opkg install gcc" or something of that sort. – nathan Jan 03 '12 at 22:05