Results 1 to 8 of 8

Thread: Problem with DevKitPSP

                  
   
  1. #1
    PSP Coder
    Join Date
    Jun 2005
    Location
    Italy
    Age
    45
    Posts
    9
    Rep Power
    0

    Default Problem with DevKitPSP

    Hello.
    I tried to compile my emulator with DevKitPSP-R3 but I have some problems.
    I have successfully compiled my code but I have some problems with linking.
    I attached here the console output.

    pspobj/bios.o: In function `HLE_console_read':
    bios.c:(.text+0xcf8): relocation truncated to fit: R_MIPS_GPREL16 against `_impure_ptr'
    pspobj/bios.o: In function `HLE_console_write':
    bios.c:(.text+0xdb0): relocation truncated to fit: R_MIPS_GPREL16 against `_impure_ptr'
    bios.c:(.text+0xdd0): relocation truncated to fit: R_MIPS_GPREL16 against `_impure_ptr'
    bios.c:(.text+0xe0c): relocation truncated to fit: R_MIPS_GPREL16 against `_impure_ptr'
    pspobj/bios.o: In function `BIOS_getchar':
    bios.c:(.text+0x31a0): relocation truncated to fit: R_MIPS_GPREL16 against `_impure_ptr'
    pspobj/bios.o: In function `BIOS_putchar':
    bios.c:(.text+0x3210): relocation truncated to fit: R_MIPS_GPREL16 against `_impure_ptr'
    bios.c:(.text+0x3238): relocation truncated to fit: R_MIPS_GPREL16 against `_impure_ptr'
    bios.c:(.text+0x3270): relocation truncated to fit: R_MIPS_GPREL16 against `_impure_ptr'
    pspobj/hle_0004.o: In function `HLE_Formatted_Write':
    hle_0004.c:(.text+0x74): relocation truncated to fit: R_MIPS_GPREL16 against `_impure_ptr'
    hle_0004.c:(.text+0x98): relocation truncated to fit: R_MIPS_GPREL16 against `_impure_ptr'
    hle_0004.c:(.text+0x100): additional relocation overflows omitted from the output
    c:/devkitpsp/psp/sdk/lib\libpspdebug.a(scr_printf.o): In function `pspDebugScreenInit':
    c:\projects\devkitPro\buildscripts\pspsdk-1.0+beta\sdk\debug/scr_printf.c:47: undefined reference to `sceGeEdramGetAddr'
    c:\projects\devkitPro\buildscripts\pspsdk-1.0+beta\sdk\debug/scr_printf.c:48: undefined reference to `sceDisplaySetMode'
    c:\projects\devkitPro\buildscripts\pspsdk-1.0+beta\sdk\debug/scr_printf.c:49: undefined reference to `sceDisplaySetFrameBuf'
    C:/DEVKIT~3/BIN/../lib/gcc/psp/3.4.4/../../../../psp/lib\libc.a(fstatr.o): In function `_fstat_r':
    fstatr.c:(.text+0x20): undefined reference to `_fstat'
    C:/DEVKIT~3/BIN/../lib/gcc/psp/3.4.4/../../../../psp/lib\libc.a(makebuf.o): In function `__smakebuf':
    makebuf.c:(.text+0xf0): undefined reference to `isatty'
    C:/DEVKIT~3/BIN/../lib/gcc/psp/3.4.4/../../../../psp/lib\libc.a(openr.o): In function `_open_r':
    openr.c:(.text+0x24): undefined reference to `_open'
    C:/DEVKIT~3/BIN/../lib/gcc/psp/3.4.4/../../../../psp/lib\libc.a(sbrkr.o): In function `_sbrk_r':
    sbrkr.c:(.text+0x1c): undefined reference to `_sbrk'
    C:/DEVKIT~3/BIN/../lib/gcc/psp/3.4.4/../../../../psp/lib\libc.a(writer.o): In function `_write_r':
    writer.c:(.text+0x24): undefined reference to `_write'
    C:/DEVKIT~3/BIN/../lib/gcc/psp/3.4.4/../../../../psp/lib\libc.a(closer.o): In function `_close_r':
    closer.c:(.text+0x1c): undefined reference to `_close'
    C:/DEVKIT~3/BIN/../lib/gcc/psp/3.4.4/../../../../psp/lib\libc.a(lseekr.o): In function `_lseek_r':
    lseekr.c:(.text+0x24): undefined reference to `_lseek'
    C:/DEVKIT~3/BIN/../lib/gcc/psp/3.4.4/../../../../psp/lib\libc.a(readr.o): In function `_read_r':
    readr.c:(.text+0x24): undefined reference to `_read'
    collect2: ld returned 1 exit status
    C:\DEVKIT~3\BIN\MAKE.EXE: *** [pspfpse.elf] Error 1

    The relocation errors aren't a problem, I just need to understand why the GOT overflows so easily.
    The true problems are the missing functions.
    Should I write the UNISTD functions myself?
    The 'sce' stubs are also missing.
    I'm linking with "-lc -lpspglue -lpspkernel -lpspdebug" libraries.
    The stubs seem to be into "psplibc" but I can't use it because it makes conflicts with other functions into the libc.
    If I use psplibc instead of libc, I have much more errors because there are many functions not implemented.
    All suggestions are appreciated, thanks in advance.

    Sincerely,

    LDChen.

  2. #2
    PSP Coder
    Join Date
    Jun 2005
    Location
    Italy
    Age
    45
    Posts
    9
    Rep Power
    0

    Default

    Hello,
    I was able to solve all compilation problems.
    However, there are surely some bugs with the libraries.
    For example, the getttimeofday() calls an sceKernelGettimeofday().
    But this function doesn't exist: the linking phase fails because the stub is called "sceKernelLibcGettimeofday" and not "sceKernelGettimeofday".
    After doing the good fixes, it worked fine.
    I hope this may help other developers.

    But now I have another problem.
    Compiled Applications don't work into PSPE.
    I tried the PSPSDK sample, I just added a PNG icon otherwise PSPE hangs without it.
    I tried to run the generated EBOOT.PBP and PSPE quits.
    Into STDERR.TXT I read:

    load C:\temp\pspe\ms0\PSP\GAME\SDK\EBOOT.PBP
    PBP format
    illegal address
    PC = 00000000
    00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000
    Fatal signal: Segmentation Fault (SDL Parachute Deployed)

    Any suggestions?

    Sincerely,

    LDChen

  3. #3
    NGPSP Author
    Join Date
    May 2005
    Posts
    226
    Rep Power
    57

    Default

    looks like maybe a bad pbp?

    I have a 1.0 unit if you need it tested on a real psp to see if its a falt of the emulator or the file itself.

    - edit -
    What output files do you get from compiling? Also can you post your makefile?

    I am not fully sure since I still use the old nem method but maybe i can help.

  4. #4

    Default Good Fixes?

    What fixes are these, and where can I get them? I'm getting errors with functions with the sce prefix.

  5. #5
    DCEmu Coder dalejrrocks's Avatar
    Join Date
    Feb 2006
    Location
    Alabama
    Age
    30
    Posts
    240
    Rep Power
    54

    Default

    DL the latest Devkit which is 8. Or better yet use xorloser's precompiled toolchain+SDK if you are going to use precompiled stuff. You can read my tutorial "The Quick + Easy Way to Start Developing in C/C++" for help installing.

  6. #6

    Default devkitPSP R8

    Oh, I've got R7. I didn't know there was much difference.

  7. #7

    Default Ahh!!!

    Now I'm getting undefined references to everything from cosf to sceKernelExitGame.

  8. #8
    GP2X Coder/Moderator yaustar's Avatar
    Join Date
    Jan 2006
    Posts
    1,680
    Rep Power
    71

    Default

    Try contacting the authors, I am sure they appreciate any of the bug reports they can get.

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
  •