mirror of
https://github.com/joel16/uofw.git
synced 2024-11-27 21:40:54 +00:00
Fixed debugging & exports
This commit is contained in:
parent
dd375b8976
commit
f7a3754161
@ -12,10 +12,11 @@ BUILD_EXPORTS = ../../utils/build-exports/psp-build-exports
|
||||
PRXGEN = psp-prxgen
|
||||
|
||||
PRX_EXPORTS = exports.exp
|
||||
EXPORT_OBJ=$(patsubst %.exp,%.o,$(PRX_EXPORTS))
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -DDEBUG
|
||||
LIBS := -ldebug -lpspdebug $(LIBS) -lSysclibForKernel -lsceDisplay -lsceGe_user -lIoFileMgrForUser
|
||||
LIBS := -ldebug -lpspdebug $(LIBS) -lSysclibForKernel -lsceDisplay -lsceGe_user -lIoFileMgrForUser -lsceSyscon_driver
|
||||
endif
|
||||
|
||||
MODULE_STUBS=$(foreach mod,$(MODULES), $($(mod)_STUBS))
|
||||
|
BIN
lib/libdebug.a
BIN
lib/libdebug.a
Binary file not shown.
@ -4,6 +4,8 @@
|
||||
TARGET = ctrl
|
||||
OBJS = ctrl.o
|
||||
|
||||
DEBUG = 1
|
||||
|
||||
LIBS = -lSysMemForKernel -lsceSuspendForKernel -lsceSysEventForKernel -lKDebugForKernel -lInterruptManagerForKernel -lSysclibForKernel -lThreadManForKernel -lSysTimerForKernel -lInitForKernel -lsceDisplay_driver -lsceSyscon_driver
|
||||
|
||||
include ../../lib/build.mak
|
||||
|
@ -86,11 +86,21 @@ void dbg_init(int eraseLog, FbMode fbMode, FatMode fatMode)
|
||||
{
|
||||
switch (fatMode)
|
||||
{
|
||||
case FAT_BASIC:
|
||||
pspSyscon_init();
|
||||
pspSysconCtrlLED(0,1);
|
||||
pspSysconCtrlLED(1,1);
|
||||
pspSysconCtrlMsPower(1);
|
||||
case FAT_HARDWARE:
|
||||
case FAT_AFTER_SYSCON:
|
||||
if (fatMode == FAT_HARDWARE)
|
||||
{
|
||||
pspSyscon_init();
|
||||
pspSysconCtrlLED(0,1);
|
||||
pspSysconCtrlLED(1,1);
|
||||
pspSysconCtrlMsPower(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
sceSysconCtrlLED(0,1);
|
||||
sceSysconCtrlLED(1,1);
|
||||
sceSysconCtrlMsPower(1);
|
||||
}
|
||||
pspMsInit();
|
||||
fat_append = ms_append;
|
||||
if (eraseLog)
|
||||
@ -102,7 +112,7 @@ void dbg_init(int eraseLog, FbMode fbMode, FatMode fatMode)
|
||||
}
|
||||
break;
|
||||
|
||||
case FAT_AFTER_FATFS:
|
||||
case FAT_AFTER_FATMS:
|
||||
fat_append = io_append;
|
||||
if (eraseLog)
|
||||
{
|
||||
@ -119,7 +129,7 @@ void dbg_init(int eraseLog, FbMode fbMode, FatMode fatMode)
|
||||
|
||||
switch (fbMode)
|
||||
{
|
||||
case FB_BASIC:
|
||||
case FB_HARDWARE:
|
||||
pspDebugScreenInitEx((void*)0x44000000, PSP_DISPLAY_PIXEL_FORMAT_8888, 0);
|
||||
//pspDebugScreenPrintData("hello\n", 6);
|
||||
pspDebugScreenPutChar(0, 50, 0xFFFFFF, 'l');
|
||||
@ -147,11 +157,8 @@ void dbg_printf(const char *format, ...)
|
||||
int size = my_vsnprintf(buf, 512, format, ap);
|
||||
if (size > 0)
|
||||
{
|
||||
if (fat_append != NULL) {
|
||||
pspSyscon_init();
|
||||
pspMsInit();
|
||||
if (fat_append != NULL)
|
||||
fat_append(buf, size);
|
||||
}
|
||||
if (fb_append != NULL)
|
||||
fb_append(buf, size);
|
||||
}
|
||||
|
@ -4,15 +4,16 @@
|
||||
typedef enum
|
||||
{
|
||||
FB_NONE,
|
||||
FB_BASIC,
|
||||
FB_HARDWARE,
|
||||
FB_AFTER_DISPLAY
|
||||
} FbMode;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FAT_NONE,
|
||||
FAT_BASIC,
|
||||
FAT_AFTER_FATFS
|
||||
FAT_HARDWARE,
|
||||
FAT_AFTER_SYSCON,
|
||||
FAT_AFTER_FATMS
|
||||
} FatMode;
|
||||
|
||||
#ifdef DEBUG
|
||||
|
Loading…
Reference in New Issue
Block a user