I've a problem with the threads
Code: Select all
int thid;
thid = sceKernelCreateThread("Show_systray_info_thread", Show_systray_info, 0x18, 0x10000, PSP_THREAD_ATTR_USER, NULL);
if(thid < 0)
{
printf("Error, could not create thread\n");
sceKernelSleepThread();
}
sceKernelStartThread(thid, 0, NULL);
Code: Select all
int Show_systray_info(SceSize args, void *argp)
{
while(running())
{
int number=(scePowerGetBatteryLifePercent()*20)/100;
int a;
for(a=0; a<number;a++){
fillScreenRect(scePowerIsBatteryCharging()? 0xFF5252FF : 0xFF8CFF8C, 476-a, 7, 1, 2);
fillScreenRect(scePowerIsBatteryCharging()? 0xFF0000FF : 0xFF00FF00, 476-a, 9, 1, 3);
fillScreenRect(scePowerIsBatteryCharging()? 0xFF0000CA : 0xFF00AE00, 476-a, 12, 1, 3);
fillScreenRect(scePowerIsBatteryCharging()? 0xFF000091 : 0xFF008A00, 476-a, 15, 1, 2);
}
pspTime time;
sceRtcGetCurrentClockLocalTime(&time);
intraFontSetStyle(ltn8, 1.00f,WHITE,0,INTRAFONT_ALIGN_RIGHT);
intraFontPrintf(ltn8, 445, 16, "%s %i:%i", Stat_Usb()? "Usb-->" : "", (int)time.hour, (int)time.minutes);
}
intraFontSetStyle(ltn8, 0.80f,BLACK,WHITE,0);
return 0;
}
Code: Select all
main.c:35: undefined reference to `_flush_cache'
collect2: ld returned 1 exit status
C:\pspsdk\bin\make.exe: *** [explorer.elf] Error 1
Build failed. Exit value 2.
Excuse me, but I'm new in the psp development...
Sorry for my bad english, I'm Spanish!
EDIT:
I think Makefile is useful:
Code: Select all
TARGET = explorer
OBJS = intraFont.o main.o osk.o framebuffer.o graphics.o general.o img_mouse.o img_base.o \
img_menu.o img_menu2.o img_proprieta.o img_cartella.o img_file.o img_avviso.o \
img_iso.o img_cso.o img_img.o img_mov.o img_mp3.o img_txt.o img_bin.o \
img_doc.o img_bmp.o img_jpg.o img_png.o img_gif.o img_menu_principale.o \
img_pbp.o img_elf.o img_prx.o img_zip.o img_barra.o img_barra2.o \
img_selezione.o img_mem_device.o img_selezione_2.o
CFLAGS = -O2 -G0 -Wall -g
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBS = -lpspgum -lpspgu -lpng -lz -lm -lpspumd -lpspusb -lpspusbstor -lpsppower -lpsprtc
LDFLAGS =
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = New FRT
PSP_EBOOT_ICON = ICON0.PNG
# In my toolchian is not requided to set up the path
include $(PSPSDK)/lib/build.mak