psp2sdk / psp2sdk Goto Github PK
View Code? Open in Web Editor NEWThe free SDK for PSP2, aiming to integrate with devkitARM
License: Mozilla Public License 2.0
The free SDK for PSP2, aiming to integrate with devkitARM
License: Mozilla Public License 2.0
Automatic building system is essential.
A missing .sceModuleInfo section should not be fatal.
However it should throw a warning on stderr and insert a generic sceModuleInfo instead :
{
.attr = 0,
.ver = 0,
.name = "",
.type = 0,
.gp = NULL,
.expTop = [1],
.expBtm = [1],
.impTop = [1],
.impBtm = [1],
.nid = 0,
.start = [2],
.stop = [2],
.exidxTop = [1],
.exidxBtm = [1],
.extabTop = [1],
.extabBtm = [1],
}
//notes :
//[1] : Should be found by scanning the sections
//[2] : Should be found by scanning the symbol sections (or defaulting to 00000000)
This would allow any C project to be compilable on the SDK without any modification !
(beside the fact that your crt0 don't split the args/argp into argc/argv)
BTW, love the way this SDK is organized (except the goto
coding style ;-) ).
I installed the nightly of the psp2sdk
on a Debain 8 based PC. I cloned psp2helloworld
and ran make
. This is the result:
arm-none-eabi-gcc -Wall -specs=psp2.specs -c -o draw.o draw.c
draw.c:10:35: fatal error: psp2/kernel/memorymgr.h: No such file or directory
#include <psp2/kernel/memorymgr.h>
^
compilation terminated.
<builtin>: recipe for target 'draw.o' failed
make: *** [draw.o] Error 1
It seems that memorymgr.h is missing. I looked in /opt/devkitpro/devkitARM/psp2/include/psp2/kernel
and memorymgr.h is not there. It seems that it is missing from the psp2-libs nightly zip I downloaded from wololo.net
http://pastie.org/private/x67kbgtlmlyshultbwu5pg
it's available of course, but configure can't find it :/
C++ should be supported by adding into the headers
#ifdef __cplusplus
extern "C" {
#endif
and
#ifdef __cplusplus
}
#endif
src/include/errno.h lacks error numbers.
bigmini:tools bigboss$ ./autogen.sh
Warning: I am going to run configure' with no arguments. If you wish to pass any to it, please specify them on the
./autogen.sh' command line.
Running aclocal...
Running automake --gnu ...
configure.ac:37: error: required file 'psp2-fixup/Makefile.in' not found
configure.ac:37: error: required file 'psp2-fixup-lib/Makefile.in' not found
Error: automake failed.
compiling by hand with embed elf.h included in your last commit give me:
bigmini:psp2-fixup bigboss$ ls
psp2-fixup.c
bigmini:psp2-fixup bigboss$ gcc -I../include psp2-fixup.c
In file included from psp2-fixup.c:19:
../include/elf.h:972:10: fatal error: 'bits/auxv.h' file not found
The current .travis.yml doesn't offer osx build, although Travis CI do so. Please add osx build version.
When you work on that, fork this repository and try with your forked repository.
Any help will be appreciated. Debug and debug!
You can download Rejuvenate from here.
Yifan Lu | Rejuvenate Public Beta Release
You can download a sample program from here.
If you have questions about psp2-fixup, feel free to ask. If you have questions about other things, Google is your friend.
Hello,
I just installed the sdk following the wiki (with devkitPro) and I have a compilation error:
arm-none-eabi-gcc -Wall -specs=psp2.specs -c -o main.o main.c
In file included from main.c:5:0:
a:\devkitpro\devkitarm\arm-none-eabi\include\stdio.h:35:20: fatal error: stddef.
h: No such file or directory
#include <stddef.h>
^
compilation terminated.
make: *** [main.o] Error 1
You can help me?
It's necessary to set up doxygen.
So I have tried over an over to compile the psp2sdk on a few different setups. Even after meeting all of the sdk dependencies I keep getting this error:
libs/stubs/SceNpUtility_stub/SceNpUtility_stub.S:7:25: fatal error: psp2/import.S: No such file or directory
#include <psp2/import.S>
Any thoughts on what I am doing wrong?
Let me know if more information is required. I think it still something simple I am missing.
I've gone through the instructions for how to install psp2sdk and I felt like there were some holes as far as explanation (it's even missing a step 2). But also, I got through, filling in some of the blanks and when trying to build the hello world example I get this error:
yutosin@ubuntu:~/psp2helloworld$ make
arm-none-eabi-gcc -Wall -specs=psp2.specs -c -o main.o main.c
arm-none-eabi-gcc: error: psp2.specs: No such file or directory
make: *** [main.o] Error 1
I really wanna contribute and develop, but I can't get past this. Help?
It depends on issue #48 .
According to Yifan Lu's specifications, it has its own type (ET_SCE_STUBLIB).
We must create a program to change ELF type for stublib before creating stub libraries.
psp2sdk/src $ ./configure
checking stddef.h usability... no
checking stddef.h presence... yes
configure: WARNING: stddef.h: present but cannot be compiled
configure: WARNING: stddef.h: check for missing prerequisite headers?
configure: WARNING: stddef.h: see the Autoconf documentation
configure: WARNING: stddef.h: section "Present But Cannot Be Compiled"
configure: WARNING: stddef.h: proceeding with the compiler's result
configure: WARNING: ## ------------------------------------------------------- ##
configure: WARNING: ## Report this to https://github.com/173210/psp2sdk/issues ##
configure: WARNING: ## ------------------------------------------------------- ##
checking for stddef.h... no
configure: error: header files not found.
Got this error with gcc 5.1.0
Unfortunately I don't have that much experience with autotools, dunno if this was a genuine issue or a beginner's mistake.
I could compile the tools folder though.
Tested in osx:
arm-none-eabi-objdump -D sample.elf
sample.elf: file format elf32-littlearm
Disassembly of section .text:
00000000 <module_start>:
0: e92d4800 push {fp, lr}
4: e28db004 add fp, sp, #4
8: e24dd018 sub sp, sp, #24
c: e50b0008 str r0, [fp, #-8]
10: e50b100c str r1, [fp, #-12]
14: e3003000 movw r3, #0
18: e3403000 movt r3, #0
1c: e3530000 cmp r3, #0
20: 1a000002 bne 30 <module_start+0x30>
24: e3003260 movw r3, #608 ; 0x260
28: e3403000 movt r3, #0
2c: ea000001 b 38 <module_start+0x38>
30: e3003000 movw r3, #0
34: e3403000 movt r3, #0
38: e3002000 movw r2, #0
3c: e3402000 movt r2, #0
40: e3520000 cmp r2, #0
44: 0a000004 beq 5c <module_start+0x5c>
48: e3002000 movw r2, #0
4c: e3402000 movt r2, #0
50: e5922000 ldr r2, [r2]
54: e1a0e002 mov lr, r2
58: ea000000 b 60 <module_start+0x60>
5c: e3a0e020 mov lr, #32
60: e3002000 movw r2, #0
64: e3402000 movt r2, #0
68: e3520000 cmp r2, #0
6c: 0a000003 beq 80 <module_start+0x80>
70: e3002000 movw r2, #0
74: e3402000 movt r2, #0
78: e592c000 ldr ip, [r2]
7c: ea000000 b 84 <module_start+0x84>
80: e3a0c601 mov ip, #1048576 ; 0x100000
84: e3002000 movw r2, #0
88: e3402000 movt r2, #0
8c: e3520000 cmp r2, #0
90: 0a000004 beq a8 <module_start+0xa8>
94: e3002000 movw r2, #0
98: e3402000 movt r2, #0
9c: e5922000 ldr r2, [r2]
a0: e1a01002 mov r1, r2
a4: ea000000 b ac <module_start+0xac>
a8: e3a01102 mov r1, #-2147483648 ; 0x80000000
ac: e3002000 movw r2, #0
b0: e3402000 movt r2, #0
b4: e3520000 cmp r2, #0
b8: 0a000003 beq cc <module_start+0xcc>
bc: e3002000 movw r2, #0
c0: e3402000 movt r2, #0
c4: e5922000 ldr r2, [r2]
c8: ea000000 b d0 <module_start+0xd0>
cc: e3a02807 mov r2, #458752 ; 0x70000
d0: e58d1000 str r1, [sp]
d4: e58d2004 str r2, [sp, #4]
d8: e3002000 movw r2, #0
dc: e3402000 movt r2, #0
e0: e58d2008 str r2, [sp, #8]
e4: e1a00003 mov r0, r3
e8: e3001184 movw r1, #388 ; 0x184
ec: e3401000 movt r1, #0
f0: e1a0200e mov r2, lr
f4: e1a0300c mov r3, ip
f8: ebffffc0 bl 0 <module_start>
fc: e1a02000 mov r2, r0
100: e3003280 movw r3, #640 ; 0x280
104: e3403000 movt r3, #0
108: e5832000 str r2, [r3]
10c: e3003280 movw r3, #640 ; 0x280
110: e3403000 movt r3, #0
114: e5933000 ldr r3, [r3]
118: e3530000 cmp r3, #0
11c: ba000008 blt 144 <module_start+0x144>
120: e3003280 movw r3, #640 ; 0x280
124: e3403000 movt r3, #0
128: e5933000 ldr r3, [r3]
12c: e1a00003 mov r0, r3
130: e51b1008 ldr r1, [fp, #-8]
134: e51b200c ldr r2, [fp, #-12]
138: ebffffb0 bl 0 <module_start>
13c: e1a03000 mov r3, r0
140: ea000002 b 150 <module_start+0x150>
144: e3003280 movw r3, #640 ; 0x280
148: e3403000 movt r3, #0
14c: e5933000 ldr r3, [r3]
150: e1a00003 mov r0, r3
154: e24bd004 sub sp, fp, #4
158: e8bd8800 pop {fp, pc}
0000015c <module_stop>:
15c: e92d4800 push {fp, lr}
160: e28db004 add fp, sp, #4
164: e3003280 movw r3, #640 ; 0x280
168: e3403000 movt r3, #0
16c: e5933000 ldr r3, [r3]
170: e1a00003 mov r0, r3
174: ebffffa1 bl 0 <module_start>
178: e1a03000 mov r3, r0
17c: e1a00003 mov r0, r3
180: e8bd8800 pop {fp, pc}
00000184
:Disassembly of section .init:
000001a4 <.init>:
1a4: e24bd028 sub sp, fp, #40 ; 0x28
1a8: e89d6ff0 ldm sp, {r4, r5, r6, r7, r8, r9, sl, fp, sp, lr}
1ac: e12fff1e bx lr
Disassembly of section .fini:
000001b0 <.fini>:
1b0: e24bd028 sub sp, fp, #40 ; 0x28
1b4: e89d6ff0 ldm sp, {r4, r5, r6, r7, r8, r9, sl, fp, sp, lr}
1b8: e12fff1e bx lr
Disassembly of section .sceModuleInfo.rodata:
000001c0 <module_info>:
1c0: 01010000 mrseq r0, (UNDEF: 1)
1c4: 706d6173 rsbvc r6, sp, r3, ror r1
1c8: 0000656c andeq r6, r0, ip, ror #10
...
1e4: 00000240 andeq r0, r0, r0, asr #4
1e8: 00000260 andeq r0, r0, r0, ror #4
1ec: 00000260 andeq r0, r0, r0, ror #4
1f0: 00000260 andeq r0, r0, r0, ror #4
...
208: 0000015c andeq r0, r0, ip, asr r1
20c: 00000278 andeq r0, r0, r8, ror r2
210: 00000278 andeq r0, r0, r8, ror r2
214: 00000278 andeq r0, r0, r8, ror r2
218: 00000278 andeq r0, r0, r8, ror r2
21c: 00000000 andeq r0, r0, r0
Disassembly of section .sceLib.ent:
00000220 :
220: 00000020 andeq r0, r0, r0, lsr #32
224: 00020800 andeq r0, r2, r0, lsl #16
228: 00000001 andeq r0, r0, r1
...
234: 00000258 andeq r0, r0, r8, asr r2
238: 00000240 andeq r0, r0, r0, asr #4
23c: 0000024c andeq r0, r0, ip, asr #4
Disassembly of section .sceExport.rodata:
00000240 <export_top>:
240: 935cd196 cmpls ip, #-2147483611 ; 0x80000025
244: 79f8e492 ldmibvc r8!, {r1, r4, r7, sl, sp, lr, pc}^
248: 6c2224ba cfstrsvs mvf2, [r2], #-744 ; 0xfffffd18
0000024c :
24c: 00000000 andeq r0, r0, r0
250: 0000015c andeq r0, r0, ip, asr r1
254: 000001c0 andeq r0, r0, r0, asr #3
00000258 :
258: 6c737973 ldclvs 9, cr7, [r3], #-460 ; 0xfffffe34
25c: 00006269 andeq r6, r0, r9, ror #4
Disassembly of section .sceImport.rodata:
00000260 <_SceLibKernel_stub_str>:
260: 4c656353 stclmi 3, cr6, [r5], #-332 ; 0xfffffeb4
264: 654b6269 strbvs r6, [fp, #-617] ; 0xfffffd97
268: 6c656e72 stclvs 14, cr6, [r5], #-456 ; 0xfffffe38
...
0000026d <_SceThreadmgr_stub_str>:
26d: 54656353 strbtpl r6, [r5], #-851 ; 0xfffffcad
271: 61657268 cmnvs r5, r8, ror #4
275: 72676d64 rsbvc r6, r7, #100, 26 ; 0x1900
...
0000027a <_SceLibc_stub_str>:
27a: 4c656353 stclmi 3, cr6, [r5], #-332 ; 0xfffffeb4
27e: 00636269 rsbeq r6, r3, r9, ror #4
Disassembly of section .sceFNID.rodata:
00000260 <.sceFNID.rodata>:
...
Disassembly of section .sceFStub.rodata:
00000260 <.sceFStub.rodata>:
...
Disassembly of section .rodata:
00000260 <.LC0>:
260: 72657375 rsbvc r7, r5, #-738197503 ; 0xd4000001
264: 69616d5f stmdbvs r1!, {r0, r1, r2, r3, r4, r6, r8, sl, fp, sp, lr}^
268: 0000006e andeq r0, r0, lr, rrx
0000026c <.LC1>:
26c: 6c6c6568 cfstr64vs mvdx6, [ip], #-416 ; 0xfffffe60
270: 6f77206f svcvs 0x0077206f
274: 00646c72 rsbeq r6, r4, r2, ror ip
Disassembly of section .eh_frame:
00000278 <FRAME_END>:
278: 00000000 andeq r0, r0, r0
Disassembly of section .jcr:
0000027c <JCR_END>:
27c: 00000000 andeq r0, r0, r0
Disassembly of section .bss:
00000280 :
280: 00000000 andeq r0, r0, r0
Disassembly of section .sce_libgen_mark:
00000284 <_SceLibKernel_0001_stub_head-0x3c>:
284: 00000114 andeq r0, r0, r4, lsl r1
288: 000002c0 andeq r0, r0, r0, asr #5
28c: 00000000 andeq r0, r0, r0
290: c5c11ee7 strbgt r1, [r1, #3815] ; 0xee7
294: c5c11ee7 strbgt r1, [r1, #3815] ; 0xee7
298: 00000114 andeq r0, r0, r4, lsl r1
29c: 000002c0 andeq r0, r0, r0, asr #5
2a0: 00000000 andeq r0, r0, r0
2a4: f08de149 ; instruction: 0xf08de149
2a8: f08de149 ; instruction: 0xf08de149
2ac: 00000114 andeq r0, r0, r4, lsl r1
2b0: 000002d8 ldrdeq r0, [r0], -r8
2b4: 00000000 andeq r0, r0, r0
2b8: 1bbde3d9 blne fef79224 <_NID_fopen+0xfefbafeb>
2bc: 1bbde3d9 blne fef79228 <_NID_fopen+0xfefbafef>
000002c0 <_SceLibKernel_0001_stub_head>:
2c0: 00000018 andeq r0, r0, r8, lsl r0
2c4: 00000000 andeq r0, r0, r0
2c8: 00000260 andeq r0, r0, r0, ror #4
2cc: 00000001 andeq r0, r0, r1
2d0: 00000000 andeq r0, r0, r0
000002d4 <_sce_package_version_SceLibKernel>:
2d4: 00000000 andeq r0, r0, r0
000002d8 <_SceThreadmgr_0001_stub_head>:
2d8: 00000018 andeq r0, r0, r8, lsl r0
2dc: 00000000 andeq r0, r0, r0
2e0: 0000026d andeq r0, r0, sp, ror #4
2e4: 00000001 andeq r0, r0, r1
2e8: 00000000 andeq r0, r0, r0
000002ec <_sce_package_version_SceThreadmgr>:
2ec: 00000000 andeq r0, r0, r0
2f0: 00000114 andeq r0, r0, r4, lsl r1
2f4: 00000304 andeq r0, r0, r4, lsl #6
2f8: 00000000 andeq r0, r0, r0
2fc: 9a004680 bls 11d04 <_sce_package_version_SceLibc+0x119ec>
300: 9a004680 bls 11d08 <_sce_package_version_SceLibc+0x119f0>
00000304 <_SceLibc_0001_stub_head>:
304: 00000018 andeq r0, r0, r8, lsl r0
308: 00000000 andeq r0, r0, r0
30c: 0000027a andeq r0, r0, sl, ror r2
310: 00000001 andeq r0, r0, r1
314: 00000000 andeq r0, r0, r0
00000318 <_sce_package_version_SceLibc>:
318: 00000000 andeq r0, r0, r0
Disassembly of section .comment:
00000000 <.comment>:
0: 3a434347 bcc 10d0d24 <_NID_realloc+0xa1b86a>
4: 4e472820 cdpmi 8, 4, cr2, cr7, cr0, {1}
8: 34202955 strtcc r2, [r0], #-2389 ; 0xfffff6ab
c: 322e392e eorcc r3, lr, #753664 ; 0xb8000
...
Disassembly of section .ARM.attributes:
00000000 <.ARM.attributes>:
0: 00003c41 andeq r3, r0, r1, asr #24
4: 61656100 cmnvs r5, r0, lsl #2
8: 01006962 tsteq r0, r2, ror #18
c: 00000032 andeq r0, r0, r2, lsr r0
10: 726f4305 rsbvc r4, pc, #335544320 ; 0x14000000
14: 2d786574 cfldr64cs mvdx6, [r8, #-464]! ; 0xfffffe30
18: 06003941 streq r3, [r0], -r1, asr #18
1c: 0841070a stmdaeq r1, {r1, r3, r8, r9, sl}^
20: 0a020901 beq 8242c <_sce_package_version_SceLibc+0x82114>
24: 12010c03 andne r0, r1, #768 ; 0x300
28: 15011404 strne r1, [r1, #-1028] ; 0xfffffbfc
2c: 18031701 stmdane r3, {r0, r8, r9, sl, ip}
30: 1e011a01 vmlane.f32 s2, s2, s2
34: 24012206 strcs r2, [r1], #-518 ; 0xfffffdfa
38: 44012a01 strmi r2, [r1], #-2561 ; 0xfffff5ff
3c: Address 0x000000000000003c is out of bounds.
Disassembly of section .sceRefs.rodata:
00000000 <.sceRefs.rodata>:
...
Disassembly of section .sceStubs.text.SceLibKernel.sceKernelCreateThread:
00000000 :
0: e3e00000 mvn r0, #0
4: e12fff1e bx lr
8: e320f000 nop {0}
c: 00000000 andeq r0, r0, r0
Disassembly of section .sceStubs.text.SceLibKernel.sceKernelStartThread:
00000000 :
0: e3e00000 mvn r0, #0
4: e12fff1e bx lr
8: e320f000 nop {0}
c: 00000000 andeq r0, r0, r0
Disassembly of section .sceStubs.text.SceThreadmgr.sceKernelDeleteThread:
00000000 :
0: e3e00000 mvn r0, #0
4: e12fff1e bx lr
8: e320f000 nop {0}
c: 00000000 andeq r0, r0, r0
Disassembly of section .sceStubs.text.SceLibc.printf:
00000000 :
0: e3e00000 mvn r0, #0
4: e12fff1e bx lr
8: e320f000 nop {0}
c: 00000000 andeq r0, r0, r0
arm-none-eabi-objdump -D sample_fix.elf
sample_fixup.elf: file format elf32-littlearm
I had successfully compiled and installed the sdk yesterday on Windows with MinGW. Since then, several commits have been pushed, so I wanted to update everything. It throws an error after an extremely long command. I had talked with tomtomdu80 about this exact same error before but on Cygwin and was not resolved.
Here's the log of the last command ran and the error:
http://pastebin.com/mcabQT5u
The size of the repo is approaching 10Mo because of the gh-pages branch
In file included from C:\devkitPro\devkitARM\psp2/include/stdio.h:37:0,
from main.c:5:
C:\devkitPro\devkitARM\psp2/include/malloc.h:51:40: warning: 'struct _reent' declared inside parameter list
extern _PTR _malloc_r _PARAMS ((struct _reent *, size_t));
^
C:\devkitPro\devkitARM\psp2/include/malloc.h:51:40: warning: its scope is only this definition or declaration, which is probably not what you want
C:\devkitPro\devkitARM\psp2/include/malloc.h:59:39: warning: 'struct _reent' declared inside parameter list
extern _VOID _free_r _PARAMS ((struct _reent *, _PTR));
^
C:\devkitPro\devkitARM\psp2/include/malloc.h:67:41: warning: 'struct _reent' declared inside parameter list
extern _PTR _realloc_r _PARAMS ((struct _reent *, _PTR, size_t));
^
C:\devkitPro\devkitARM\psp2/include/malloc.h:75:40: warning: 'struct _reent' declared inside parameter list
extern _PTR _calloc_r _PARAMS ((struct _reent *, size_t, size_t));
^
C:\devkitPro\devkitARM\psp2/include/malloc.h:83:42: warning: 'struct _reent' declared inside parameter list
extern _PTR _memalign_r _PARAMS ((struct _reent *, size_t, size_t));
^
C:\devkitPro\devkitARM\psp2/include/malloc.h:91:53: warning: 'struct _reent' declared inside parameter list
extern struct mallinfo _mallinfo_r _PARAMS ((struct _reent *));
^
C:\devkitPro\devkitARM\psp2/include/malloc.h:99:46: warning: 'struct _reent' declared inside parameter list
extern void _malloc_stats_r _PARAMS ((struct _reent *));
^
C:\devkitPro\devkitARM\psp2/include/malloc.h:107:40: warning: 'struct _reent' declared inside parameter list
extern int _mallopt_r _PARAMS ((struct _reent *, int, int));
^
C:\devkitPro\devkitARM\psp2/include/malloc.h:115:54: warning: 'struct _reent' declared inside parameter list
extern size_t _malloc_usable_size_r _PARAMS ((struct _reent *, _PTR));
^
C:\devkitPro\devkitARM\psp2/include/malloc.h:126:40: warning: 'struct _reent' declared inside parameter list
extern _PTR _valloc_r _PARAMS ((struct _reent *, size_t));
^
C:\devkitPro\devkitARM\psp2/include/malloc.h:134:41: warning: 'struct _reent' declared inside parameter list
extern _PTR _pvalloc_r _PARAMS ((struct _reent *, size_t));
^
C:\devkitPro\devkitARM\psp2/include/malloc.h:142:44: warning: 'struct _reent' declared inside parameter list
extern int _malloc_trim_r _PARAMS ((struct _reent *, size_t));
^
C:\devkitPro\devkitARM\psp2/include/malloc.h:152:41: warning: 'struct _reent' declared inside parameter list
extern _VOID _mstats_r _PARAMS ((struct _reent *, char *));
When i try to compile the vitahelloworld i get several linker errors (I'm using latest nightly build from Wololo.net):
cc2ccxC6.ltrans0.o:(.text+0xc0): undefined reference to `__aeabi_atexit'
cc2ccxC6.ltrans0.o:(.text+0x1d8): undefined reference to `exit'
main.o: In function `main':
main.c:(.text+0x254): undefined reference to `rand'
main.c:(.text+0x294): undefined reference to `rand'
main.c:(.text+0x2d4): undefined reference to `rand'
draw.o: In function `alloc_gpu_mem':
draw.c:(.text+0xac): undefined reference to `printf'
draw.c:(.text+0xd8): undefined reference to `printf'
draw.c:(.text+0xec): undefined reference to `printf'
draw.c:(.text+0x130): undefined reference to `printf'
draw.o: In function `init_video':
draw.c:(.text+0x1a8): undefined reference to `printf'
draw.o:draw.c:(.text+0x2a8): more undefined references to `printf' follow
draw.o: In function `clear_screen':
draw.c:(.text+0x4f0): undefined reference to `memset'
draw.o: In function `font_draw_stringf':
draw.c:(.text+0xa34): undefined reference to `vsnprintf'
collect2.exe: error: ld returned 1 exit status
make: *** [psp2helloworld.elf] Error 1
psp2-fixup segfaults on 32 bit OS, gdb backtrace:
Starting program: /usr/local/bin/psp2-fixup -q -S FTPVita.elf FTPVita_fixup.elf
Program received signal SIGSEGV, Segmentation fault.
0xb7e8ae16 in _int_free (av=0xb7fc1420 <main_arena>, p=<optimized out>,
have_lock=0) at malloc.c:3996
3996 malloc.c: No such file or directory.
(gdb) bt
#0 0xb7e8ae16 in _int_free (av=0xb7fc1420 <main_arena>,
p=<optimized out>, have_lock=0) at malloc.c:3996
#1 0x0804a7e0 in closeElf (elf=elf@entry=0xbfffef94) at elf.c:114
#2 0x0804894b in main (argc=5, argv=0xbffff0c4) at psp2-fixup.c:120
When compiling vitahelloworld:
main.c:(.text+0x68c): undefined reference to `sceKernelGetProcessTimeWide'
draw.o: In function `alloc_gpu_mem':
draw.c:(.text+0x80): undefined reference to `sceKernelAllocMemBlock'
draw.c:(.text+0xbc): undefined reference to `sceKernelGetMemBlockBase'
draw.o: In function `swap_buffers':
draw.c:(.text+0x47c): undefined reference to `sceDisplaySetFrameBuf'
Occurs with the nightly build and local build. It appears that some relocations are messed up. Works fine on Ubuntu.
Backtrace:
0x00404dcb in convRelToRela (scns=0x8a4188, segs=0x8a2f90, symtab=0x8a6528, relScns=0x8aefb0, relShnum=8)
at rel.c:140
0x0040427b in updateElf (elf=0x28fec0) at elf.c:202
0x00403a78 in main (argc=5, argv=0x8a1b10) at psp2-fixup.c:109
Make header files!
Use psp2moduleinfo.h as a reference.
Comply to Doxygen format to make documents.
Do NOT refer to SCE's header files. They contains their own characteristics and SCE has their copyrights.
I have a code where extern char *p is defined and the body of p is defined in another C file. When *p is accessed, the elf got stuck in a infinite loop somewhere.
The issue can be resolved replacing that declaration with extern char p[], but it's clear that it's a bug.
configure:4489: checking stddef.h usability configure:4489: gcc -c -g -O2 -Wall -nostdlib -I$(top_srcdir)/include -mcpu=cortex-a9 -mfpu=neon-fp16 conftest.c >&5 gcc: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead gcc: error: unrecognized command line option '-mfpu=neon-fp16' configure:4489: $? = 1 configure: failed program was: | /* confdefs.h */
ubuntu 14.04 lts
https://launchpad.net/gcc-arm-embedded/+download
gcc-arm-none-eabi-4_9 extracted to /opt/toolchain
cd ~/psp2sdk
export PREFIX=/opt/toolchain
make
config.log is attatched
http://privatepaste.com/075d5c297d
aeabi needs some functions like __aeabi_uidiv, which is not offered by stubs.
The following functions are lacking:
__aeabi_unwind_cpp_pr0
__aeabi_uidiv
It caused a problem with this code.
https://github.com/xerpi/FTPVita/blob/b1e2989472c72b22f471e887114d27adefdefdb5/ftp.c#L160
static const char *num_to_month[] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
Make new libraries!
Use SceLibMonoBridge_stub.S as a reference.
You can find libraries from those source.
vitasploit has a function to extract imports and exports.
Please make sure that your function names start with sce-. Actually SceLibMonoBridge_stub.S has functions which doesn't start with sce-, but it's a special case.
Is it fine to add SCE's error codes in the SDK ?
As 173210 pointed in issue #11, we should not refer to SCE's header files for legal issues, but error codes are defined in original pspsdk, as is, that's why I'm not sure if this is fine to add them or not.
Hi,
I am trying to measure touch force, but after debugging I noticed that the force of a touch report always stays zero. I would like to see it working as I am working on a simple ui library :)
Good job on the SDK so far ๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.