diff options
| author | Keith Packard <keithp@keithp.com> | 2009-03-25 09:45:14 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2009-03-25 09:45:14 -0700 |
| commit | 61faf2b773300988fe27cfde5bc045be9950a1b0 (patch) | |
| tree | 7888a5755e0567a6b955486384e60ca6d6c538da /target/dma/Makefile | |
| parent | 7b3fdf5b42c9be9bebc1ceb7a52ff0f5a2a28fcd (diff) | |
Add DMA example
Diffstat (limited to 'target/dma/Makefile')
| -rw-r--r-- | target/dma/Makefile | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/target/dma/Makefile b/target/dma/Makefile new file mode 100644 index 00000000..9cb3e327 --- /dev/null +++ b/target/dma/Makefile @@ -0,0 +1,46 @@ +CC=sdcc +NO_OPT=--nogcse --noinvariant --noinduction --nojtbound --noloopreverse \ + --nolabelopt --nooverlay --peep-asm +DEBUG=--debug + +CFLAGS=--model-large $(DEBUG) --less-pedantic \ + --no-peep --int-long-reent --float-reent \ + --data-loc 0x30 + +LDFLAGS=--out-fmt-ihx +LDFLAGS_RAM=$(LDFLAGS) --code-loc 0xf000 --xram-loc 0xf800 --xram-size 1024 + +LDFLAGS_FLASH=$(LDFLAGS) --code-loc 0x0000 --xram-loc 0xf000 --xram-size 1024 + +SRC=dma.c +ADB=$(SRC:.c=.adb) +ASM=$(SRC:.c=.asm) +LNK=$(SRC:.c=.lnk) +LST=$(SRC:.c=.lst) +REL=$(SRC:.c=.rel) +RST=$(SRC:.c=.rst) +SYM=$(SRC:.c=.sym) + +PROGS=dma-flash.ihx dma-ram.ihx +PCDB=$(PROGS:.ihx=.cdb) +PLNK=$(PROGS:.ihx=.lnk) +PMAP=$(PROGS:.ihx=.map) +PMEM=$(PROGS:.ihx=.mem) +PAOM=$(PROGS:.ihx=) + +%.rel : %.c + $(CC) -c $(CFLAGS) -o$*.rel $< + +all: $(PROGS) + +dma-ram.ihx: $(REL) Makefile + $(CC) $(LDFLAGS_RAM) $(CFLAGS) -o dma-ram.ihx $(REL) + $(CC) $(LDFLAGS_FLASH) $(CFLAGS) -o dma-flash.ihx $(REL) + +dma-flash.ihx: dma-ram.ihx + +clean: + rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM) + rm -f $(PROGS) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM) + +install: |
