The thing that i dont understant it's why this program runs perfectly when i compile it for kernel 1.50... the animation and BOX2D library calls works without problems... i tried change the heap size and thread stack size but it aways gave me the same error... if i remove the SDL_main reference and set these settings (sdl_psp_exit_callback,sdl_psp_callback_thread,PSP_HEAP_SIZE_KB,etc...) in main.cpp it shows black screen and resets PSP.
With simple SDL programs (including one posted in another "SDL with 3.xx" thread of this forum) i have exactly the same problem... PSP resets with black screen.
I updated everything in PSP toolchain and SDL with the latest sources of the repository...
The programs running in x86 platfomrs (Windows & Linux) uses about 5 MB of memory... i dont know if it will be the same for PSP , but i think that BOX2D is not the main problem... it worked even in my port for old Symbian phones...
-----------EDIT---------------------
I fixed my makefile... i just removed entire references to SDL_main from the makefile, corrected my implemetations of CallbackThread and ExitCallback and called PSP_HEAP_SIZE_MAX withou parameters... it compiled and worked perfectly...
my makefile now is like this:
Code: Select all
TARGET = Box
OBJS =main.o Render.o Box2D/Source/Collision/b2TimeOfImpact.o Box2D/Source/Collision/b2BroadPhase.o Box2D/Source/Collision/b2CollideCircle.o Box2D/Source/Collision/b2CollidePoly.o Box2D/Source/Collision/b2Collision.o Box2D/Source/Collision/b2Distance.o Box2D/Source/Collision/b2PairManager.o Box2D/Source/Collision/Shapes/b2CircleShape.o Box2D/Source/Collision/Shapes/b2PolygonShape.o Box2D/Source/Collision/Shapes/b2Shape.o Box2D/Source/Common/b2BlockAllocator.o Box2D/Source/Common/b2Math.o Box2D/Source/Common/b2Settings.o Box2D/Source/Common/b2StackAllocator.o Box2D/Source/Dynamics/b2Body.o Box2D/Source/Dynamics/b2ContactManager.o Box2D/Source/Dynamics/b2Island.o Box2D/Source/Dynamics/b2World.o Box2D/Source/Dynamics/b2WorldCallbacks.o Box2D/Source/Dynamics/Joints/b2DistanceJoint.o Box2D/Source/Dynamics/Joints/b2GearJoint.o Box2D/Source/Dynamics/Joints/b2Joint.o Box2D/Source/Dynamics/Joints/b2MouseJoint.o Box2D/Source/Dynamics/Joints/b2PrismaticJoint.o Box2D/Source/Dynamics/Joints/b2PulleyJoint.o Box2D/Source/Dynamics/Joints/b2RevoluteJoint.o Box2D/Source/Dynamics/Contacts/b2CircleContact.o Box2D/Source/Dynamics/Contacts/b2Contact.o Box2D/Source/Dynamics/Contacts/b2ContactSolver.o Box2D/Source/Dynamics/Contacts/b2PolyAndCircleContact.o Box2D/Source/Dynamics/Contacts/b2PolyContact.o
LINKOBJ = main.o Render.o Box2D/Source/Collision/b2TimeOfImpact.o Box2D/Source/Collision/b2BroadPhase.o Box2D/Source/Collision/b2CollideCircle.o Box2D/Source/Collision/b2CollidePoly.o Box2D/Source/Collision/b2Collision.o Box2D/Source/Collision/b2Distance.o Box2D/Source/Collision/b2PairManager.o Box2D/Source/Collision/Shapes/b2CircleShape.o Box2D/Source/Collision/Shapes/b2PolygonShape.o Box2D/Source/Collision/Shapes/b2Shape.o Box2D/Source/Common/b2BlockAllocator.o Box2D/Source/Common/b2Math.o Box2D/Source/Common/b2Settings.o Box2D/Source/Common/b2StackAllocator.o Box2D/Source/Dynamics/b2Body.o Box2D/Source/Dynamics/b2ContactManager.o Box2D/Source/Dynamics/b2Island.o Box2D/Source/Dynamics/b2World.o Box2D/Source/Dynamics/b2WorldCallbacks.o Box2D/Source/Dynamics/Joints/b2DistanceJoint.o Box2D/Source/Dynamics/Joints/b2GearJoint.o Box2D/Source/Dynamics/Joints/b2Joint.o Box2D/Source/Dynamics/Joints/b2MouseJoint.o Box2D/Source/Dynamics/Joints/b2PrismaticJoint.o Box2D/Source/Dynamics/Joints/b2PulleyJoint.o Box2D/Source/Dynamics/Joints/b2RevoluteJoint.o Box2D/Source/Dynamics/Contacts/b2CircleContact.o Box2D/Source/Dynamics/Contacts/b2Contact.o Box2D/Source/Dynamics/Contacts/b2ContactSolver.o Box2D/Source/Dynamics/Contacts/b2PolyAndCircleContact.o Box2D/Source/Dynamics/Contacts/b2PolyContact.o
PSPSDK_LIBC_LIB = -lm -lstdc++ -lpsplibc -lpspglue -lc
PSPSDK = $(shell psp-config --pspsdk-path)
PSPBIN = $(shell psp-config --psp-prefix)/bin
DEFAULT_CFLAGS = -I/usr/local/pspdev/psp/include/SDL
MORE_CFLAGS = -O2 -G0 -Wall -fno-exceptions
BUILD_PRX = 1
PSP_FW_VERSION = 352
CFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
CXXFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS) -fno-exceptions
#LIBS = -lSDL $(shell $(SDL_CONFIG) --libs) -lstdc++
LIBS = -lstdc++ -L/usr/local/pspdev/psp/lib -lSDL -lm -L/usr/local/pspdev/psp/sdk/lib -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspnet_inet
EXTRA_TARGETS = EBOOT.PBP
include $(PSPSDK)/lib/build.mak
Now i can think in some type of optmization for BOX2d library
Thanks for all the attention. !