Skip to content

Commit

Permalink
there is now a WIP version of a new-UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil Stockbridge committed May 17, 2012
1 parent adb6a25 commit 731c891
Show file tree
Hide file tree
Showing 11 changed files with 977 additions and 0 deletions.
1 change: 1 addition & 0 deletions new-UI/BIOS-glyphs.bmp
1 change: 1 addition & 0 deletions new-UI/Makefile
59 changes: 59 additions & 0 deletions new-UI/Makefile.emu
@@ -0,0 +1,59 @@

# Skeleton Makefile for DSO Quad applications

NAME = new-UI

PARTS = font.o input.o nice_font.o UI.o main.o

DELIVERABLES = $(NAME)

# Options for the linker. "-L support" helps the linker find the .lds files
LFLAGS = -L../support

# "-I support" is so that make can find the DSO Quad platform files
CFLAGS = -I../support -I../lib -I../font-demo/bw
CFLAGS += $(shell pkg-config --cflags sdl)

# Optimization & debug settings
CFLAGS += -fno-common -Os -std=gnu99

# Compiler warnings
CFLAGS += -Wall -Wno-unused

# Avoid including the Cortex-specific headers:
CFLAGS += -D__EMULATED -D__CM3_CORE_H__ -D__IO= -D__I= # -D__STM32F10x_H

CFLAGS += $(DEBUG)

LIBS = $(shell pkg-config --libs sdl)

.SILENT:

# The directory for .o files and such. Keep it in RAM for speed and to reduce
# flash disc wear
TDIR = /tmp/$(NAME)

# Add the support files to the list of objects to build:
PARTS += BIOS-emu.o

# Tell make where to find transitional files:
VPATH = ../support:../lib:../font-demo/bw:$(TDIR)

$(NAME): $(PARTS)
$(CC) $(CFLAGS) -o $@ $(PARTS) $(LFLAGS) $(LIBS)

# Rebuild all parts if any header or the Makefile changes:
.c.o: *.h Makefile.emu
$(CC) $(CFLAGS) -c -o $@ $<

.S.o: | $(TDIR)
$(CC) $(AFLAGS) -c -o $@ $<

all: $(DELIVERABLES) main.c

$(TDIR):
mkdir $(TDIR)

clean:
rm -f *.o ../font-demo/bw/font.o $(TDIR)/*.o $(TDIR)/*.map $(DELIVERABLES)

74 changes: 74 additions & 0 deletions new-UI/Makefile.quad
@@ -0,0 +1,74 @@

# Skeleton Makefile for DSO Quad applications

NAME = new-UI

PARTS = font.o input.o nice_font.o UI.o main.o

DELIVERABLES = PAGE18.HEX

# Options for the linker. "-L support" helps the linker find the .lds files
LFLAGS = -L../support

#LIBS = -lm

# "-I support" is so that make can find the DSO Quad platform files
CFLAGS = -I../support -I../lib -I../font-demo/bw

# Processor type
CFLAGS += -mcpu=cortex-m3 -mthumb -mno-thumb-interwork

# Optimization & debug settings
CFLAGS += -fno-common -Os -std=gnu99

# Compiler warnings
CFLAGS += -Wall -Wno-unused

CFLAGS += $(DEBUG)

# Default linker arguments (disables GCC-provided startup.c, creates .map file)
LFLAGS += -nostartfiles -Wl,-Map=$(TDIR)/$(NAME).map -eReset_Handler

.SILENT:

# The directory for .o files and such. Keep it in RAM for speed and to reduce
# flash disc wear
TDIR = /tmp/$(NAME)

# Add the support files to the list of objects to build:
PARTS += startup.o BIOS.o Interrupt.o

# Names of the toolchain programs
CC = arm-none-eabi-gcc
OBJCOPY = arm-none-eabi-objcopy
SIZE = arm-none-eabi-size

# Tell make where to find transitional files:
VPATH = ../support:../lib:../font-demo/bw:$(TDIR)

# How to make .HEX files from .elf files:
%.HEX: %.elf
$(OBJCOPY) -O ihex $< $@

%.bin: %.elf
$(OBJCOPY) -O binary $< $@

%.elf: %.lds $(PARTS) | $(TDIR)
$(CC) $(CFLAGS) -o $@ $(PARTS) $(LFLAGS) $(LIBS) -T $<

# Rebuild all parts if any header or the Makefile changes:
.c.o: *.h Makefile
$(CC) $(CFLAGS) -c -o $@ $<

.S.o: | $(TDIR)
$(CC) $(AFLAGS) -c -o $@ $<

all: $(DELIVERABLES)
$(SIZE) PAGE18.elf

$(TDIR):
mkdir $(TDIR)

clean:
rm -f $(TDIR)/*.o $(TDIR)/*.map $(DELIVERABLES)

8 changes: 8 additions & 0 deletions new-UI/PAGE18.lds
@@ -0,0 +1,8 @@
/* Define memory regions. */
MEMORY
{
rom (rx) : ORIGIN = 0x0801e000, LENGTH = 8K
ram (rwx) : ORIGIN = 0x20003000, LENGTH = 32K /* Total size is 36K, leave 4K for stack */
}

INCLUDE main.lds

0 comments on commit 731c891

Please sign in to comment.