Skip to content

Commit 711700d

Browse files
committed
Update to last vitasdk
1 parent 5a13d8d commit 711700d

File tree

3 files changed

+22
-35
lines changed

3 files changed

+22
-35
lines changed

README.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,7 @@ DEBUGNET FOR VITA
1313

1414
1) Compile and install library and include file
1515

16-
You need the new vita toolchain installed in your environment VITASDK must be defined.
1716

18-
Experimental build scripts tested with osx are in:
19-
20-
[vitasdk-buildscripts] (https://github.com/psxdev/vitasdk-buildscripts)
21-
22-
After install it replace crt0.o from arm-vita-eabi/lib with this one than you has in build-native/newlib/arm-vita-eabi/newlib/libc/sys/vita/crt0.o is inside of directory that you are using to compiling the toolchain
23-
24-
Toolchain is work in progress but it's time to switch to vitasdk
25-
26-
2717
```
2818
cd libdebugnet
2919
make
@@ -62,15 +52,20 @@ DEBUGNET FOR VITA
6252
```
6353

6454
5) ready to have a lot of fun :P and switch to vitasdk
65-
55+
56+
===========================
57+
Change log
58+
===========================
59+
21/01/2016 Update to support last vitasdk
60+
6661
===========================
6762
Credits
6863
===========================
6964

7065
Special thanks goes to:
7166

7267
- yifanlu to open the doors with rejuvenate.
73-
- All people who collaborated in #PSP2SDK: @17310, @xerpi(i stole you network initialization code :P from FTPVita), @frangar , @frtomtomdu80, @hykemthedemon , @SMOKE587, @Josh_Axey ...
68+
- All people who collaborated in #PSP2SDK: @173210, @xerpi(i stole you network initialization code :P from FTPVita), @frangar , @frtomtomdu80, @hykemthedemon , @SMOKE587, @Josh_Axey ...
7469
- All ps3dev and ps2dev old comrades
7570
- xyzz for help with vita toolchain
7671

libdebugnet/source/debugnet.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ int debugNetInit(char *serverIp, int port, int level)
120120
}
121121
/*net initialazation code from xerpi at https://github.com/xerpi/FTPVita/blob/master/ftp.c*/
122122
/* Init Net */
123-
if (sceNetShowNetstat() == PSP2_NET_ERROR_ENOTINIT) {
123+
if (sceNetShowNetstat() == SCE_NET_ERROR_ENOTINIT) {
124124
net_memory = malloc(NET_INIT_SIZE);
125125

126126
initparam.memory = net_memory;
@@ -139,23 +139,23 @@ int debugNetInit(char *serverIp, int port, int level)
139139

140140

141141
/* Get IP address */
142-
ret = sceNetCtlInetGetInfo(PSP2_NETCTL_INFO_GET_IP_ADDRESS, &info);
142+
ret = sceNetCtlInetGetInfo(SCE_NETCTL_INFO_GET_IP_ADDRESS, &info);
143143
//printf("sceNetCtlInetGetInfo(): 0x%08X\n", ret);
144144

145145

146146
/* Save the IP of PSVita to a global variable */
147-
sceNetInetPton(PSP2_NET_AF_INET, info.ip_address, &vita_addr);
147+
sceNetInetPton(SCE_NET_AF_INET, info.ip_address, &vita_addr);
148148

149149
/* Create datagram udp socket*/
150150
SocketFD = sceNetSocket("debugnet_socket",
151-
PSP2_NET_AF_INET , PSP2_NET_SOCK_DGRAM, PSP2_NET_IPPROTO_UDP);
151+
SCE_NET_AF_INET , SCE_NET_SOCK_DGRAM, SCE_NET_IPPROTO_UDP);
152152

153153
memset(&stSockAddr, 0, sizeof stSockAddr);
154154

155155
/*Populate SceNetSockaddrIn structure values*/
156-
stSockAddr.sin_family = PSP2_NET_AF_INET;
156+
stSockAddr.sin_family = SCE_NET_AF_INET;
157157
stSockAddr.sin_port = sceNetHtons(port);
158-
sceNetInetPton(PSP2_NET_AF_INET, serverIp, &stSockAddr.sin_addr);
158+
sceNetInetPton(SCE_NET_AF_INET, serverIp, &stSockAddr.sin_addr);
159159

160160
/*Connect socket to server*/
161161
sceNetConnect(SocketFD, (struct SceNetSockaddr *)&stSockAddr, sizeof stSockAddr);

sample/Makefile

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,19 @@ OBJS= main.o
1212

1313
LIBS=-ldebugnet -lSceNet_stub -lSceNetCtl_stub
1414

15-
PREFIX = arm-vita-eabi
16-
AS = $(PREFIX)-as
17-
CC = $(PREFIX)-gcc
18-
CXX = $(PREFIX)-g++
19-
READELF = $(PREFIX)-readelf
20-
OBJDUMP = $(PREFIX)-objdump
21-
CFLAGS = -Wl,-q $(DEFINES) $(INCDIR) -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections
22-
CXXFLAGS = $(CFLAGS) -fno-unwind-tables -fno-rtti -fno-exceptions -Wno-deprecated -Wno-comment -Wno-sequence-point
23-
ASFLAGS = $(CFLAGS) --gc-sections
15+
PREFIX = arm-vita-eabi
16+
CC = $(PREFIX)-gcc
17+
CFLAGS = -Wl,-q -Wall -O3
18+
ASFLAGS = $(CFLAGS)
2419

2520
all: $(TARGET).velf
2621

27-
$(TARGET).velf: $(TARGET).elf
28-
#advice from xyzz strip before create elf
29-
arm-vita-eabi-strip -g $<
30-
#i put db.json there use your location
31-
vita-elf-create $< $@ $(VITASDK)/bin/db.json
22+
%.velf: %.elf
23+
$(PREFIX)-strip -g $<
24+
vita-elf-create $< $@
3225

3326
$(TARGET).elf: $(OBJS)
34-
$(CC) $^ $(CFLAGS) $(LIBS) -o $@
27+
$(CC) $(CFLAGS) $^ $(LIBS) -o $@
3528

3629
clean:
37-
@rm -rf $(TARGET).elf $(TARGET).velf $(OBJS) $(DATA)/*.h
38-
30+
@rm -rf $(TARGET).velf $(TARGET).elf $(OBJS)

0 commit comments

Comments
 (0)