Merge branch 'master' of github.com:r0ket/r0ket

This commit is contained in:
schneider 2011-06-20 23:40:56 +02:00
commit 2d25081337
20 changed files with 47 additions and 35 deletions

6
.gitignore vendored
View File

@ -1,10 +1,4 @@
firmware.bin
firmware.elf
*.org *.org
*.o *.o
*.a *.a
*.swp *.swp
lpc1xxx/memory.ld
modules/wrapper.c
lcd/allfonts.h
font_devel

5
firmware/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
firmware.bin
firmware.elf
lpc1xxx/memory.ld
modules/wrapper.c
lcd/allfonts.h

View File

@ -9,7 +9,7 @@ VPATH +=
OBJS += OBJS +=
OBJS += basic/basic.o basic/reinvoke_isp.o basic/delayms.o basic/voltage.o OBJS += basic/basic.o basic/reinvoke_isp.o basic/delayms.o basic/voltage.o
OBJS += basic/keyin.o basic/uuid.o OBJS += basic/keyin.o basic/uuid.o
LIBS += core/libcore.a lcd/liblcd.a modules/libmodules.a filesystem/libfat.a usb/libusb.a LIBS += core/libcore.a lcd/liblcd.a applications/libapp.a filesystem/libfat.a usb/libusb.a
########################################################################## ##########################################################################
# GNU GCC compiler flags # GNU GCC compiler flags
@ -27,7 +27,7 @@ OBJS += $(TARGET)_handlers.o LPC1xxx_startup.o
# Startup files # Startup files
########################################################################## ##########################################################################
LDLIBS = -lm LDLIBS = -lm
LDLIBS += -Lmodules -lmodules LDLIBS += -Lapplications -lapp
LDLIBS += -Llcd -llcd LDLIBS += -Llcd -llcd
LDLIBS += -Lusb -lusb LDLIBS += -Lusb -lusb
LDLIBS += -Lfilesystem -lfat LDLIBS += -Lfilesystem -lfat
@ -53,7 +53,7 @@ clean:
@cd core && $(MAKE) clean @cd core && $(MAKE) clean
@cd ../tools/bootloader && $(MAKE) clean @cd ../tools/bootloader && $(MAKE) clean
@cd lcd && $(MAKE) clean @cd lcd && $(MAKE) clean
@cd modules && $(MAKE) clean @cd applications && $(MAKE) clean
@cd filesystem && $(MAKE) clean @cd filesystem && $(MAKE) clean
@cd usb && $(MAKE) clean @cd usb && $(MAKE) clean
@cd loadable && $(MAKE) clean @cd loadable && $(MAKE) clean
@ -69,8 +69,8 @@ core/libcore.a: core/projectconfig.h
lcd/liblcd.a lcd/render.o lcd/display.o: lcd/liblcd.a lcd/render.o lcd/display.o:
cd lcd && $(MAKE) ROOT_PATH=../$(ROOT_PATH) cd lcd && $(MAKE) ROOT_PATH=../$(ROOT_PATH)
modules/libmodules.a: applications/libapp.a:
cd modules && $(MAKE) ROOT_PATH=../$(ROOT_PATH) cd applications && $(MAKE) ROOT_PATH=../$(ROOT_PATH)
filesystem/libfat.a: filesystem/libfat.a:
cd filesystem && $(MAKE) ROOT_PATH=../$(ROOT_PATH) cd filesystem && $(MAKE) ROOT_PATH=../$(ROOT_PATH)
@ -100,5 +100,5 @@ $(OUTFILE).elf: $(OBJS) $(SYS_OBJS) $(LIBS) $(LPCFIX) $(LD_TEMP)
-@echo "" -@echo ""
$(LPCFIX) -c $@ $(LPCFIX) -c $@
.PHONY: $(LD_TEMP) lcd/liblcd.a modules/libmodules.a filesystem/libfat.a usb/libusb.a .PHONY: $(LD_TEMP) lcd/liblcd.a applications/libapp.a filesystem/libfat.a usb/libusb.a

View File

@ -3,11 +3,11 @@
########################################################################## ##########################################################################
OBJS = default.o OBJS = default.o
OBJS += $(foreach mod,$(MODULE),$(mod).o) OBJS += $(foreach mod,$(APP),$(mod).o)
SRCS = $(foreach mod,$(MODULE),$(mod).c) SRCS = $(foreach mod,$(APP),$(mod).c)
ifndef MODULE ifndef APP
ME_OBJ=$(USERNAME) ME_OBJ=$(USERNAME)
ifeq "$(ME_OBJ)" "" ifeq "$(ME_OBJ)" ""
@ -22,7 +22,7 @@ OBJS += $(ME_OBJ).o
endif endif
WRAP=wrapper WRAP=wrapper
LIBNAME=modules LIBNAME=app
########################################################################## ##########################################################################
# GNU GCC compiler flags # GNU GCC compiler flags
@ -54,7 +54,7 @@ clean:
%.c: %.c:
@echo @echo
@echo "You need to create $@ first" @echo "You need to create $@ first"
@echo "It should contain a single function void module_filename(void)" @echo "It should contain a single function void main_filename(void)"
@echo @echo
@exit 1 @exit 1

View File

@ -9,7 +9,7 @@ void ReinvokeISP(void);
/**************************************************************************/ /**************************************************************************/
void module_adc(void) { void main_adc(void) {
int yctr = 18; int yctr = 18;
int dx = 0; int dx = 0;
uint32_t brightness = 0; uint32_t brightness = 0;

View File

@ -12,7 +12,7 @@ void ReinvokeISP(void);
/**************************************************************************/ /**************************************************************************/
void module_bsx(void) { void main_bsx(void) {
int yctr = 18; int yctr = 18;
int dx = 0; int dx = 0;
uint32_t brightness = 0; uint32_t brightness = 0;

View File

@ -3,7 +3,7 @@
/**************************************************************************/ /**************************************************************************/
void module_default(void) { void main_default(void) {
systickInit(10); systickInit(10);
return; return;
}; };

View File

@ -77,7 +77,7 @@ void execute_file (const char * fname){
/**************************************************************************/ /**************************************************************************/
void module_executor(void) { void main_executor(void) {
backlightInit(); backlightInit();

View File

@ -70,7 +70,7 @@ static const struct MENU mainmenu = {"Mainmenu", menu};
void handleMenu(const struct MENU *the_menu) ; void handleMenu(const struct MENU *the_menu) ;
void module_fs(void) { void main_fs(void) {
backlightInit(); backlightInit();

View File

@ -12,7 +12,7 @@ void delayms(uint32_t ms);
/**************************************************************************/ /**************************************************************************/
void module_iggy(void) { void main_iggy(void) {
//Make PIO1_11 an analog input //Make PIO1_11 an analog input
gpioSetDir(RB_LED3, gpioDirection_Input); gpioSetDir(RB_LED3, gpioDirection_Input);
IOCON_PIO1_11 = 0x41; IOCON_PIO1_11 = 0x41;

View File

@ -122,7 +122,7 @@ void blink(){
gpioSetValue (RB_LED1, CFG_LED_OFF); gpioSetValue (RB_LED1, CFG_LED_OFF);
} }
void module_mandelbrot(void) { void main_mandelbrot(void) {
gpioSetValue (RB_LED1, CFG_LED_OFF); gpioSetValue (RB_LED1, CFG_LED_OFF);
backlightInit(); backlightInit();

View File

@ -100,7 +100,7 @@ void mandelCalc() {
mandel.dirty = false; mandel.dirty = false;
} }
void module_mandelbrot2(void) { void main_mandelbrot2(void) {
backlightInit(); backlightInit();
IOCON_PIO3_3 = 0x10; IOCON_PIO3_3 = 0x10;
font=&Font_7x8; font=&Font_7x8;

View File

@ -65,7 +65,7 @@ static const struct MENU mainmenu = {"Mainmenu", menu};
void handleMenu(const struct MENU *the_menu) ; void handleMenu(const struct MENU *the_menu) ;
void module_menutest(void) { void main_menutest(void) {
backlightInit(); backlightInit();

View File

@ -2,7 +2,7 @@
for a in $* ; do for a in $* ; do
base=${a%.o} base=${a%.o}
echo "void module_$base(void);" echo "void main_$base(void);"
echo "void tick_$base(void);" echo "void tick_$base(void);"
done done
@ -11,7 +11,7 @@ echo "void wrapper(void){"
for a in $* ; do for a in $* ; do
base=${a%.o} base=${a%.o}
echo "module_$base();" echo "main_$base();"
done done
echo "}" echo "}"

View File

@ -11,7 +11,7 @@ void delayms(uint32_t ms);
/**************************************************************************/ /**************************************************************************/
void module_s(void) { void main_s(void) {
//Make PIO1_11 an analog input //Make PIO1_11 an analog input
gpioSetDir(RB_LED3, gpioDirection_Input); gpioSetDir(RB_LED3, gpioDirection_Input);
IOCON_PIO1_11 = 0x41; IOCON_PIO1_11 = 0x41;

View File

@ -650,7 +650,7 @@ return jj;
} }
void module_schneider(void) void main_schneider(void)
{ /* the coefficients for B163 */ { /* the coefficients for B163 */
bitstr_parse(poly, "800000000000000000000000000000000000000c9"); bitstr_parse(poly, "800000000000000000000000000000000000000c9");
bitstr_parse(coeff_b, "20a601907b8c953ca1481eb10512f78744a3205fd"); bitstr_parse(coeff_b, "20a601907b8c953ca1481eb10512f78744a3205fd");

View File

@ -9,7 +9,7 @@ void backlightInit(void);
/**************************************************************************/ /**************************************************************************/
void module_sec(void) { void main_sec(void) {
backlightInit(); backlightInit();

View File

@ -203,7 +203,7 @@ void check_end() {
} }
} }
void module_spaceinvaders(void) { void main_spaceinvaders(void) {
gpioSetValue (RB_LED1, CFG_LED_OFF); gpioSetValue (RB_LED1, CFG_LED_OFF);
backlightInit(); backlightInit();

View File

@ -0,0 +1,13 @@
void main_default(void);
void tick_default(void);
void main_fs(void);
void tick_fs(void);
void wrapper(void){
main_default();
main_fs();
}
void tick_wrapper(void){
tick_default();
tick_fs();
}