Results 1 to 4 of 4

Thread: sh-elf-objcopy problem - file gets truncated

                  
   
  1. #1
    DCEmu Newbie
    Join Date
    Feb 2006
    Posts
    10
    Rep Power
    0

    Question sh-elf-objcopy problem - file gets truncated

    Hey guys, I'm brand new to all of this stuff and decided to get started by downloading that Dev Iso linked to by DcEmu.Co.Uk awhile back.

    I went through the quite well done set up instructions, and installed CygWin as well as KOS.

    Anyway, I don't have a coder's cable yet (though I'll be getting one soon). So far I've been able to run make in all of the included examples and the expected files are produced, ie running make from /usr/local/dc/kos/kos/examples/dreamcast/hello produces the files hello.elf as well as romdisk.img and romdisk.o.

    Before this, all I've ever done is burnt apps using Boot Dream or stuff like that, so I know I'm missing the all important 1st_read.bin.

    I *think* I've found the command which should be turning the hello.elf file into 1st_read.bin, which is as follows:
    sh-elf-objcopy -O binary hello.elf 1st_read.bin

    The problem is that I keep getting this output:
    sh-elf-objcopy: 1st_read.bin: File truncated

    1st_read is created but is 0 kb in explorer. It of course doesn't work.
    I've also tried a utility called "elf2bin". It acts like it works, but the same thing happens, 1ST_READ.bin is 0 kb, which makes me think maybe something in my config is screwed up.

    I've Googled +sh-elf-objcopy +file truncated and found two forum posts, the first were a guy had a similar problem to mine and another one and no one answered and another one where someone did respond and made it seem like it was a problem with sh-elf-objcopy (??).

    http://www.dcemu.co.uk/vbulletin/arc...hp/t-4952.html
    http://www.dcemu.co.uk/vbulletin/arc....php/t-48.html

    If anyone knows what the cause of this problem is or what I can do about it, I'd be very greatful. Even a link or something would be nice.

  2. #2
    Dream Coder
    Join Date
    Apr 2004
    Location
    Miami, FL
    Age
    37
    Posts
    4,675
    Rep Power
    50

    Default

    sh-elf-objcopy -O binary -R .stack hello.elf 1st_read.bin
    If anyone is looking to buy, sell, trade games and support a developer directly at the same time, consider joining Goozex. Enjoy!

  3. #3
    DCEmu Newbie
    Join Date
    Feb 2006
    Posts
    10
    Rep Power
    0

    Default

    Hey, thanks a lot quzar! Those switches fixed everything!

    This is pretty exciting.

    I just ordered the coder's cable. I don't think I'll be able to stop myself from wasting a lot of CDs before it gets here, though.

  4. #4
    DCEmu Newbie
    Join Date
    Jun 2006
    Age
    41
    Posts
    2
    Rep Power
    0

    Default

    I have a problem a little bit different.
    sh-elf-objcopy gives me "No space left on device."
    What it could be?

    sh-elf-objcopy -O binary -R .stack test.elf test.bin
    c:\Dev-Cpp\sh-elf\bin\sh-elf-objcopy.exe: test.bin: No space left on device
    File sizes:
    main.o : 17kB
    test.elf: 721kB

    I'm not sure what flags use in the compiler/linker also...
    I used these one:
    Compiler:
    -Wall -g -ml -m4-single-only -O2 -fno-builtin -fno-strict-aliasing -fomit-frame-pointer -fno-optimize-sibling-calls -D_arch_dreamcast
    Linker:
    -ml -m4-single-only -nostartfiles -nostdlib -Wl,-Ttext=0x8c010000
    "C:\Dev-Cpp\sh-elf\startup.o" -lpng -lz -lm -lkallisti -lgcc
    Is anything wrong?
    Thanks in advance,
    Rodolfo

    [edit] i forgot to say: My version of sh-elf-objcopy is 2.11.2[/edit]

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •