• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Correct "script" for the GCC cross compiler for Sheeva Plug Computer  (Read 5037 times)
lmorgan
Newbie
*

Karma: 0
Posts: 3


View Profile
« on: February 16, 2010, 02:00:54 PM »

I've downloaded and installed the command line version of the GCC cross compiler so I can write code for my Sheeva Plug computer.  The problem is that the example code requires a -T option to the compile command to tell it which linker script it needs to use.  Could someone please tell me what and where this script is?

Am I using the wrong compiler (CodeSourcery)?  Is there a better option available?  I'm compiling on Windows 7 with the Sheeva Plug as the target.

Thanks!

len morgan
Logged

peter a
Full Member
***

Karma: 0
Posts: 132


View Profile
« Reply #1 on: February 17, 2010, 10:59:36 AM »

Hi , I`m in the same boat .
For all the help I can find is in Linux, the only way I`ve found to get around it, is to run in Linux.
But Virtual with -  VirtualBox :- http://www.virtualbox.org/
Logged

jlpoole
Principal Software Engineer
Global Moderator
Jr. Member
*****

Karma: 2
Posts: 87

Principal Software Engineer -- Oracle Corporation


View Profile
« Reply #2 on: February 18, 2010, 10:27:47 AM »

I just want to chime in that I've been struggling with cross-compile on Gentoo. 

I had hoped that I could easily cross-compile on an AMD quad-core Phenom using Gentoo because the Gentoo documentation for cross compiling made it look straight forward and I've found that documentation in Gentoo, if followed carefully, works.  Turns out the documentation exposed to me through Gentoo's site was admittedly deprecated; I learned this after chatting with one of the main crossdev gurus on Gentoo IRC channel.  Needless to say, it has been a very discouraging struggle and I think the problem lies in the lack of precise documentation.  I believe so much is taken for granted by those in the know that much of the critical dependencies go undocumented or addressed in the documentation.

I was finally able to cross compile helloWorld, but when I tried something greater, such as a kernel, bad things happened. 

It is a real time sink... and this is on my own time (most of the time).  Right now, my priority is to get Java working on Gentoo on the SheevaPlug.
Logged

The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation.

chunkyks
Newbie
*

Karma: 3
Posts: 27


View Profile
« Reply #3 on: February 18, 2010, 01:56:18 PM »

The best way is to use Scratchbox to compile for the plug [behind the scenes it's a real VM]. That's been documented how to do it on the plugcomputer wiki:
http://www.plugcomputer.org/plugwiki/index.php/Scratchbox2_based_cross_compiling

That being said, if you really want to cross-compile, I particularly like CMake. I'm cross-compiling on Linux with this cmake toolchain file:
http://svn.icculus.org/obdgpslogger/trunk/cmakemodules/Toolchain-sheeva.cmake?view=markup

You can do the same thing on windows with cmake by changing the paths in that file appropriately.

Of course, all that hinges on you using cmake to build your project - which I've been doing since this project began.

Gary (-;
Logged

bad_gui
Jr. Member
**

Karma: 0
Posts: 50


View Profile
« Reply #4 on: December 08, 2010, 08:19:59 PM »

I installed CodeSourcery but am really confused about how to use it and whether it supports the Plug.

I am trying to find out the Linker script to use with the Feroceon.  According to the pdf that was installed
in the docs, the linker scripts support Cortex-M3, ARM Simulator (VFP), ARM Simulator and Cortex-M1.

According to this post http://www.codesourcery.com/sgpp/lite/arm/portal/kbentry31  the linker
scripts should be obvious but I don't see any in the arm-none-eabi/lib directory

When I execute  $arm-none-linux-gnueabi-ld --verbose  I get this
Code:
GNU ld (Sourcery G++ Lite 2010.09-51) 2.20.51.20100809
  Supported emulations:
   armelf
using internal linker script:
==================================================
/* Script for -z combreloc: combine and sort reloc sections */
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
              "elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start)
SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");
SECTIONS
{
  /* Read-only sections, merged into text segment: */
  PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x8000)); . = SEGMENT_START("text-segment", 0x8000);
  .interp         : { *(.interp) }
  .note.gnu.build-id : { *(.note.gnu.build-id) }
  .hash           : { *(.hash) }
  .gnu.hash       : { *(.gnu.hash) }
  .dynsym         : { *(.dynsym) }
  .dynstr         : { *(.dynstr) }
  .gnu.version    : { *(.gnu.version) }
  .gnu.version_d  : { *(.gnu.version_d) }
  .gnu.version_r  : { *(.gnu.version_r) }
  .rel.dyn        :
    {
      *(.rel.init)
      *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
      *(.rel.fini)
      *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
      *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*)
      *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
      *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
      *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
      *(.rel.ctors)
      *(.rel.dtors)
      *(.rel.got)
      *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
      PROVIDE_HIDDEN (__rel_iplt_start = .);
      *(.rel.iplt)
      PROVIDE_HIDDEN (__rel_iplt_end = .);
      PROVIDE_HIDDEN (__rela_iplt_start = .);
      PROVIDE_HIDDEN (__rela_iplt_end = .);
    }
  .rela.dyn       :
    {
      *(.rela.init)


I'm not sure what to use after -T
Logged

Pages: [1]
Print
Jump to: