So I tried compiling my first addin.
I am having 2 problems:
1. There is no image displayed for the addin icon.
2. Running the addin simply causes the calculator to reboot with no warning whatsoever.
directory setup:
Code:
test.c:
Code:
Makefile:
Code:
Any ideas?
EDIT:
Pretty sure this has to do with libfxcg, because compiling on the vanilla SDK works fine.
I am having 2 problems:
1. There is no image displayed for the addin icon.
2. Running the addin simply causes the calculator to reboot with no warning whatsoever.
directory setup:
Code:
flyingfisch@Office-Optiplex-745:~/PrizmSDK-0.3/projects/test$ ls -R
.:
Makefile selected.bmp src test.bin test.g3a unselected.bmp
./src:
test.c test.o
test.c:
Code:
#include <fxcg/display.h>
#include <fxcg/keyboard.h>
int main() {
int key;
while (1) {
Bdisp_AllClr_VRAM();
GetKey(&key);
switch (key) {
case KEY_CTRL_EXE:
PrintXY(1,1," Hello World!",TEXT_MODE_NORMAL,TEXT_COLOR_BLACK);
}
}
return 1;
}
Makefile:
Code:
CC=sh3eb-elf-gcc
MKG3A=mkg3a
RM=rm
CFLAGS=-m4a-nofpu -mb -Os -mhitachi -Wall -I../../include -lgcc -L../../lib
LDFLAGS=$(CFLAGS) -nostartfiles -T../../toolchain/prizm.x -Wl,-static -Wl,-gc-sections
CSOURCES=src/test.c
OBJECTS=src/test.o
BIN=test.bin
ADDIN=$(BIN:.bin=.g3a)
all: $(ADDIN)
$(BIN): $(OBJECTS)
$(CC) $< $(LDFLAGS) -o $@
$(ADDIN): $(BIN)
$(MKG3A) -n :test $< $@
.s.o:
$(CC) -c $(CFLAGS) $< -o $@
.c.o:
$(CC) -c $(CFLAGS) $< -o $@
clean:
$(RM) $(addprefix $(OUTDIR)\,$(OBJECTS)) $(BIN) $(ADDIN)
Any ideas?
EDIT:
Pretty sure this has to do with libfxcg, because compiling on the vanilla SDK works fine.