Bloodshed Dev-C++ as a PSP homebrew IDE

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
biermana
Posts: 12
Joined: Mon Jun 27, 2005 3:23 pm

Bloodshed Dev-C++ as a PSP homebrew IDE

Post by biermana »

I've been using Bloodshed's free Dev-C++ IDE a my development environment for PSP homebrew. In Dev-C++ I'm able to specify a custom complier configuration using psp-gcc, and use the PSPSDK provided makefile template for builds. This seems to work well, but unfortuntely no debugging yet.

Is anyone else using Dev-C++ or a better alternative? (aside from vi and emacs).

Dev-C++ can be downloaded here:

http://www.bloodshed.net/dev/devcpp.html
inomine
Posts: 53
Joined: Thu May 05, 2005 7:26 pm

Post by inomine »

I use it, although I force it to use my own makefiles. The only task I use it for is as a nice editor for my code.
Tech^CF
Posts: 3
Joined: Sat Jul 02, 2005 7:42 pm
Location: Drammen, Norway
Contact:

Post by Tech^CF »

I have made some simple programs in C++ with Bloodshep (really like this IDE) . Is it easy to set up for PSP? If it is some work it would be nice with a tutorial ;)
PSP 1.50 JAP Value + 512MB Sandisk + Lumines, Twisted Metal, Wipeout
KaL
Posts: 41
Joined: Sun Apr 03, 2005 9:59 pm

Post by KaL »

Mike/Pippin
Posts: 40
Joined: Sun Jun 05, 2005 4:23 am

Post by Mike/Pippin »

After I did that tutorial and I ran a simple program I got this.

Code: Select all

Compiler: PSP
Building Makefile: "C:\Dev-Cpp\Makefile.win"
Executing  make...
make.exe -f "C:\Dev-Cpp\Makefile.win" all
psp-gcc.exe -c Untitled1.c -o Untitled1.o -I"C:/Dev-Cpp/include"   
In file included from Untitled1.c:2:
C:/Dev-Cpp/include/stdio.h:178: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:179: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:180: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:181: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:183: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:184: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:185: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:186: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:189: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:190: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:193: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:194: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:198: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:200: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:206: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:207: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:208: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:209: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:210: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:211: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:212: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:213: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:216: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:219: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:220: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:222: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:224: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:231: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:232: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:233: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:238: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:239: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:240: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:241: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:242: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:243: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:244: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:252: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:253: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:258: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:265: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:272: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:279: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:297: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:298: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:304: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:305: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:306: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:335: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:336: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:342: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:343: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:355: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:356: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:363: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:364: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:367: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:368: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:374: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:375: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:376: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:377: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:378: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:379: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:380: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:387: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:388: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:389: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:390: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:428: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:429: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:430: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:431: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:432: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:433: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:434: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:435: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:436: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:437: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:438: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:439: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:440: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:441: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:465: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:468: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:469: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:471: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:473: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:489: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:490: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:491: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:492: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:495: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:496: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:497: warning: '__cdecl__' attribute directive ignored
C:/Dev-Cpp/include/stdio.h:498: warning: '__cdecl__' attribute directive ignored
Untitled1.c: In function 'main':
Untitled1.c:4: warning: return type of 'main' is not 'int'
psp-gcc.exe Untitled1.o  -o "Project1.exe" -L"C:/Dev-Cpp/lib"  

/cygdrive/c/pspdev/bin/../lib/gcc/psp/4.0.0/../../../../psp/bin/ld: warning: cannot find entry symbol _start; defaulting to 000000000040003c
Untitled1.o: In function `main':
Untitled1.c:(.text+0x18): undefined reference to `printf'
collect2: ld returned 1 exit status
make.exe: *** [Project1.exe] Error 1

Execution terminated
The source is

Code: Select all

#include <stdio.h>
void main&#40;&#41;
&#123;
     printf&#40;"Hello World From About\n"&#41;;
&#125;
Anyways I did the tutorial with the win32 things not the cygwin. I dont know if that makes a difference.

EDIT: I downloaded the Win32 PSPdev installer and installed and changed directorys in the IDE(Bloodshed) and now I get this error with the same source code.

Code: Select all

Compiler&#58; PSP
Building Makefile&#58; "C&#58;\Dev-Cpp\Makefile.win"
Executing  make...
make.exe -f "C&#58;\Dev-Cpp\Makefile.win" all
psp-gcc.exe Untitled1.o  -o "Project1.exe" -L"C&#58;/Dev-Cpp/lib"  

/cygdrive/c/Program Files/PSPDev/bin/../lib/gcc/psp/4.0.0/../../../../psp/lib/crt0.o&#58;/home/dev/pspsdk-1.0+beta/sdk/startup/crt0.S&#58;63&#58; undefined reference to `sceKernelCreateThread'
/cygdrive/c/Program Files/PSPDev/bin/../lib/gcc/psp/4.0.0/../../../../psp/lib/crt0.o&#58;/home/dev/pspsdk-1.0+beta/sdk/startup/crt0.S&#58;68&#58; undefined reference to `sceKernelStartThread'
/cygdrive/c/Program Files/PSPDev/bin/../lib/gcc/psp/4.0.0/../../../../psp/lib/crt0.o&#58; In function `__entrytable'&#58;
crt0.S&#58;&#40;.rodata.sceResident+0xc&#41;&#58; undefined reference to `module_info'
Untitled1.o&#58; In function `main'&#58;
Untitled1.c&#58;&#40;.text+0x18&#41;&#58; undefined reference to `printf'
collect2&#58; ld returned 1 exit status
make.exe&#58; *** &#91;Project1.exe&#93; Error 1

Execution terminated
biermana
Posts: 12
Joined: Mon Jun 27, 2005 3:23 pm

Post by biermana »

Mike/Pippin,

Take the Makefile from the PSPSDK samples, then in Dev-C++, choose project options, then Makefile, then check "use custom makefile".

Your makefile should look something like this:

Code: Select all

TARGET = sdktest
OBJS = main.o

INCDIR = 
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $&#40;CFLAGS&#41; -fno-exceptions -fno-rtti
ASFLAGS = $&#40;CFLAGS&#41;

LIBDIR =
LDFLAGS =

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = SDK Test v1.0
PSP_EBOOT_ICON = res/ICON0.PNG

include $&#40;PSPSDK&#41;/lib/build.mak

Let me know how that goes.

Tony
Mike/Pippin
Posts: 40
Joined: Sun Jun 05, 2005 4:23 am

?

Post by Mike/Pippin »

Ok I got a bunch load of errors when I did that. Maybe I didnt do it with the right packges or what your suppose to use with it. Can some one link me to the files you can download for Dev C++ so it works with PSP thing.
KaL
Posts: 41
Joined: Sun Apr 03, 2005 9:59 pm

Post by KaL »

You didn't add the pspsdk libraries in your Dev-C++ linker's options.
netddos
Posts: 9
Joined: Fri Jun 17, 2005 4:03 pm

Post by netddos »

http://www.cs.purdue.edu/homes/ljbuesch/

Followed the guide above but got stuck on the very last step..

Where is the make.bat file?
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

netddos wrote:http://www.cs.purdue.edu/homes/ljbuesch/

Followed the guide above but got stuck on the very last step..

Where is the make.bat file?
\sdk\lib\make.bat
Lego of my Ago!
Mangus
Posts: 33
Joined: Fri Jun 17, 2005 4:33 pm

Post by Mangus »

I know I sound like a noob, but I just realized i don't have a make.bat file, but only a build.mak file as far as I can tell
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

prolly same thing.
Lego of my Ago!
leenoi
Posts: 9
Joined: Fri Jul 08, 2005 4:35 pm

Post by leenoi »

anyone know why after I compile I got this message????

Compiler: PSP
Executing make...
make.exe -f "..\..\cygwin\usr\PSPDev\psp\sdk\lib\build.mak" all
psp-gcc -I. -I/include -L. -L/lib -lpspdebug -lpsplibc -lpspkernel -o .elf

/usr/PSPDev/bin/../lib/gcc/psp/4.0.0/../../../../psp/bin/ld: cannot find -lpspdebug
collect2: ld returned 1 exit status
make.exe: *** [.elf] Error 1

Execution terminated
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

do you have the path to the PSPSDK in your PATH?
Lego of my Ago!
leenoi
Posts: 9
Joined: Fri Jul 08, 2005 4:35 pm

Post by leenoi »

Agoln wrote:do you have the path to the PSPSDK in your PATH?
Hi Agoln ,Thank you very much about you answer, I'm very new about Open source , It 's my firs time to compile some staff like this , mostly in the pass I use VisualBasic and VisualC++(Directx). as you know I don't need to config anything , now I don't want to be Microsoft slave :-P I want to try som open source and I'm very interest in PSP, so I start to try PSPSDK.
But I don't know how to config this PSPSDK , and I don't know all command inside build.mak file , It will be very nice for me ,if some of you can explain for me but it's not important ,most important is I still can't compile it , after I try it more then 2 day , this is my config and detail
I use Dev C++ 4.9.9.2 (5.0beta)
create new comiler call PSP
cygwin 2.457.2.2 -> C:\cygwin
pspsdk 1.0 beta for win32 -> C:\cygwin\usr\local\PSPDev
in Dev C++ complier options
binaries set to C:\cygwin\bin and C:\cygwin\usr\local\PSPDev\psp\bin
lib set to C:\cygwin\lib and C:\cygwin\usr\local\PSPDev\psp\lib
c include C:\cygwin\usr\local\PSPDev\psp\include
in program I had change gcc and g++ to psp's gcc and g++

in Dev C++ project option
complier change to PSP (witch I had create)
in makefile I use custom and add build.mak (I found in sdk/lib)

at last I got this error

Compiler: PSP
Executing make...
make.exe -f "build.mak" all
psp-gcc -I. -I\cygwin\usr\local\PSPDev\psp/include -L. -L\cygwin\usr\local\PSPDev\psp/lib -lpspdebug -lpsplibc -lpspkernel -o .elf

process_begin: CreateProcess((null), psp-gcc -I. -I\cygwin\usr\local\PSPDev\psp/include -L. -L\cygwin\usr\local\PSPDev\psp/lib -lpspdebug -lpsplibc -lpspkernel -o .elf, ...) failed.
make (e=2): The system cannot find the file specified.


make.exe: *** [.elf] Error 2

Execution terminated


Thank you very much
Last edited by leenoi on Sat Jul 09, 2005 11:23 pm, edited 1 time in total.
HexDump
Posts: 70
Joined: Tue Jun 07, 2005 9:18 pm

Post by HexDump »

Kal, I got this error too, why should I add the pspsdk libs to devc++? aren´t they supposed to be refered by the makefile?.

/cygdrive/c/Program Files/PSPDev/bin/../lib/gcc/psp/4.0.0/../../../../psp/lib/crt0.o: In function `__entrytable':
crt0.S:(.rodata.sceResident+0xc): undefined reference to `module_info'
biermana
Posts: 12
Joined: Mon Jun 27, 2005 3:23 pm

Post by biermana »

I've seen a few references in this thread to building the build.mak file directly. I think build.mak is intented to be an include file in your project's makefile, not called directly from make. The ".mak" file extension is an indicator of this, as make's documentation identifies ".mak" as an include file extension.

I think you want to have Dev-C++ refer to your project's makefile, which in turn includes the build.mak file.

See this example:

Code: Select all

TARGET = sdktest
OBJS = main.o

INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $&#40;CFLAGS&#41; -fno-exceptions -fno-rtti
ASFLAGS = $&#40;CFLAGS&#41;

LIBDIR =
LDFLAGS =

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = SDK Test v1.0
PSP_EBOOT_ICON = res/ICON0.PNG

include $&#40;PSPSDK&#41;/lib/build.mak 
This approach has been working nicely for me, and the SDK examples also take this approach.
leenoi
Posts: 9
Joined: Fri Jul 08, 2005 4:35 pm

Post by leenoi »

So , If I want to compile Nem 's HelloPsp which I download form this forums. Can you teach and guide me how to compile step by step , it will be good if you start from the beginning
Thank you very much.

I'm sory if I boring you. but I wishful I can use this SDK.
and sory again if my English very poor.
Post Reply