Our 1st module. LP0 configuration.
This commit is contained in:
@@ -11,11 +11,12 @@ VPATH = $(dir $(wildcard ./*/)) $(dir $(wildcard ./*/*/))
|
||||
|
||||
OBJS = $(addprefix $(BUILD)/,\
|
||||
module_sample.o \
|
||||
gfx.o \
|
||||
)
|
||||
|
||||
ARCH := -march=armv4t -mtune=arm7tdmi -mthumb -mthumb-interwork
|
||||
ARCH := -march=armv4t -mtune=arm7tdmi -mthumb-interwork
|
||||
CFLAGS = $(ARCH) -O2 -nostdlib -fpie -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-inline -std=gnu11 -Wall $(CUSTOMDEFINES)
|
||||
LDFLAGS = $(ARCH) -nostartfiles -lgcc -Wl,--nmagic,--gc-sections
|
||||
LDFLAGS = $(ARCH) -fpie -pie -nostartfiles -lgcc
|
||||
|
||||
.PHONY: clean all
|
||||
|
||||
@@ -25,7 +26,8 @@ $(BUILD)/%.o: ./%.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(TARGET).bso: $(OBJS)
|
||||
$(CC) $(LDLAGS) -pie -e _modInit $^ -o $(OUTPUT)/$(TARGET).bso
|
||||
$(CC) $(LDFLAGS) -e _modInit $^ -o $(OUTPUT)/$(TARGET).bso
|
||||
$(STRIP) -g $(OUTPUT)/$(TARGET).bso
|
||||
|
||||
clean:
|
||||
@rm -rf $(OUTPUT)/$(TARGET).bso
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
*/
|
||||
|
||||
#include "../../common/common_module.h"
|
||||
#include "../../common/common_gfx.h"
|
||||
#include "gfx/gfx.h"
|
||||
|
||||
void _modInit(cbMainModule_t cb, pmoduleConfiguration_t mc)
|
||||
void _modInit(void *moduleConfig, bdkParams_t bp)
|
||||
{
|
||||
cb("Hello World!");
|
||||
gfx_puts(bp->gfxCon, "Hello World!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user