Trying to understand by the examples,
Was having trouble adding scr_printf function to an existing c file.
What do i have to include into my demo2a.c and makefile to be able to use scr_printf?
I have this example:
hello.c
#include <tamtypes.h>
#include <kernel.h>
#include <sifrpc.h>
#include <stdio.h>
#include <debug.h>
int main(int argc, char *argv[])
{
SifInitRpc(0);
init_scr();
scr_printf("Hello, world!\n");
printf("Hello, world!\n");
while(1) {}
return 0;
}
makefile:
EE_BIN = hello.elf
EE_OBJS = hello.o
EE_LIBS = -ldebug
all: $(EE_BIN)
clean:
rm -f *.elf *.o *.a
include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal
I tryed to include all these header files in my demo2a.c and then call scr_pritnf in the main function,nogo.Any point in the right direction would be greatly appreciated.



Reply With Quote

