Page 2 of 9 FirstFirst 1234 ... LastLast
Results 11 to 20 of 81

Thread: FPC4GP2X status?

  1. #11

    FPC4GP2X status?

    Quote Originally Posted by dmantione
    Do a "nm gp2x_sdl_mixer.o" and compare the symbols displayed with the ones the compiler is looking for. Can you see differences?
    Hi dmantione,
    I tried that and it said "File format not recognized". I tried both the arm-linux-nm.exe (c:\devkitGP2X\bin\) and the nm.exe (c:\devkitGP2X\arm-linux\bin\).

    cheers,
    Paul

  2. #12

    FPC4GP2X status?

    That is not okay, and suggests the .o file is not build correctly. Verify if your C compiler generates the .o files FPC needs.

  3. #13

    FPC4GP2X status?

    Quote Originally Posted by dmantione
    That is not okay, and suggests the .o file is not build correctly. Verify if your C compiler generates the .o files FPC needs.
    It works fine when I compile some arm assembly and ]libgp2x_asm.s[/b]
    Code:
    @ gp2x demo article code by Dzz
    @ this code is placed in the public domain.  do anything you want with it.
    
    	.align 4
    	.globl OpenFile
    	.globl CloseFile
    	.globl WriteFile
    	.globl MUnmap
    	.globl ChangeDir
    	.globl ExecuteFile
    	.globl MMap
    	.globl CopyScreen
    	.globl ClearScreen
    	.globl Ioctl3
    
    OpenFile:
    	swi #0x900005
    	mov pc, lr
    
    CloseFile:
    	swi #0x900006
    	mov pc, lr
    
    WriteFile:
    	swi #0x900004
    	mov pc, lr
    
    MUnmap:
    	swi #0x90005B
    	mov pc, lr
    
    ChangeDir:
    	swi #0x90000C
    	mov pc, lr
    
    ExecuteFile:
    	swi #0x90000B
    	mov pc, lr
    
    Ioctl3:
    	swi #0x900036
    	mov pc, lr
    
    MMap:
    	stmdb sp!, {r0, r1, r2, r3}
    	mov r0, sp
    	swi #0x90005A
    	add sp, sp, #16
    	mov pc, lr
    	
    CopyScreen:
      stmfd sp!, {r4-r10}  @ remember registers 4-10
      mov r2, #4800        @ we will run the loop 4800 times to copy the screen
    .CopyScreenLoop:
      ldmia r1!, {r3-r10}  @ pull in 32 bytes from the source
      stmia r0!, {r3-r10}  @ write the 32 bytes to the destination
      subs r2, r2, #1      @ decrement the loop counter
      bne .CopyScreenLoop  @ if we're not done, do it again
      ldmfd sp!, {r4-r10}  @ restore the registers
    	mov pc, lr           @ return
    
    ClearScreen:
      stmfd sp!, {r4-r10}  @ remember registers 4-10
      mov r2, #4800        @ we will run the loop 4800 times to copy the screen
    	mov r3, #0           @ load up the registers with zeros
    	mov r4, #0
    	mov r5, #0
    	mov r6, #0
    	mov r7, #0
    	mov r8, #0
    	mov r9, #0
    	mov r10, #0
    .ClearScreenLoop:
     stmia r0!, {r3-r10}  @ write the 32 bytes of zeros to the destination
     subs r2, r2, #1      @ decrement the loop counter
     bne .ClearScreenLoop @ if we're not done, do it again
     ldmfd sp!, {r4-r10}  @ restore the registers
     mov pc, lr           @ return
    Code:
    arm-linux-gcc.exe -c libgp2x_asm.s
    cheers,
    Paul

  4. #14

    FPC4GP2X status?

    Any .o file generated by the GNU assembler should be processable by the nm utility belonging to that assembler (regardless wether the compiler calling that assembler is GCC, FPC).

    If "nm" cannot process a .o file, either the .o file is corrupt, or it is written in a format "nm" does not understand, but in that case, as and nm do not belong together.

    Anyway, the output by "nm" is critical to understand this problem, so you will need to solve this problem in one way or another.

  5. #15

    FPC4GP2X status?

    Quote Originally Posted by dmantione
    Any .o file generated by the GNU assembler should be processable by the nm utility belonging to that assembler (regardless wether the compiler calling that assembler is GCC, FPC).

    If "nm" cannot process a .o file, either the .o file is corrupt, or it is written in a format "nm" does not understand, but in that case, as and nm do not belong together.

    Anyway, the output by "nm" is critical to understand this problem, so you will need to solve this problem in one way or another.
    Ok, thanks for the help, but I dont't know how to proceed now

    cheers,
    Paul

  6. #16

    FPC4GP2X status?

    Ok - I need help.
    I recieved my F200 yesterday (tuesday), and now I want to try and compile something for it, but I can't

    I've downloaded the guides written by Paul and followed them from the beginning to the end, but when I run the CompileProject batch file I get following error during link stage :
    Code:
    Linking gp2x_tutorial
    arm-linux-ld.exe: cannot find -lSDL
    An error occured while linking gp2x_tutorial
    How do I fix this problem? (It's probably a newb question, but I'm used to use compilers/ide's that works ot of the box)
    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

  7. #17

    FPC4GP2X status?

    Quote Originally Posted by pstudio
    Ok - I need help.
    I recieved my F200 yesterday (tuesday), and now I want to try and compile something for it, but I can't

    I've downloaded the guides written by Paul and followed them from the beginning to the end, but when I run the CompileProject batch file I get following error during ]Linking gp2x_tutorial
    arm-linux-ld.exe: cannot find -lSDL
    An error occured while linking gp2x_tutorial[/code]

    How do I fix this problem? (It's probably a newb question, but I'm used to use compilers/ide's that works ot of the box)
    strange, it should work out of the "box"; other people have used it ok...

    Sorry about this, I will look into it...

    PS In case it helps me, can you post the contents of your batch files that you had to alter to match file paths on your computer?

    cheers,
    Paul

  8. #18

    FPC4GP2X status?

    I didn't alter the filepaths since I unzippd the files to the same location as you suggested. The only filepath I changed was in the FPC config file where i changed the g:\... to c:\.
    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

  9. #19

    FPC4GP2X status?

    Nevermind. I redownloaded the devkit and now it works
    I've just compiled my first GP2X program and now I'm gonna see if it works (probably wont )
    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

  10. #20

    FPC4GP2X status?

    Quote Originally Posted by pstudio
    Nevermind. I redownloaded the devkit and now it works
    I've just compiled my first GP2X program and now I'm gonna see if it works (probably wont )
    Excellent!!

    So what is your first program, the tutorial I wrote, or one of your own?

    cheers,
    Paul

Page 2 of 9 FirstFirst 1234 ... LastLast

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
  •