mirror of
https://github.com/raphnet/gc_n64_usb-v3
synced 2024-12-22 07:18:52 -05:00
Add STK525 (dev board) support
This commit is contained in:
parent
a84b70c369
commit
5e59201bc4
44
Makefile.stk525
Normal file
44
Makefile.stk525
Normal file
@ -0,0 +1,44 @@
|
||||
CC=avr-gcc
|
||||
AS=$(CC)
|
||||
LD=$(CC)
|
||||
|
||||
PROGNAME=n64
|
||||
OBJDIR=objs-$(PROGNAME)
|
||||
CPU=at90usb1287
|
||||
CFLAGS=-Wall -mmcu=$(CPU) -DF_CPU=16000000L -Os -DUART1_STDOUT -DSTK525
|
||||
LDFLAGS=-mmcu=$(CPU) -Wl,-Map=$(PROGNAME).map
|
||||
HEXFILE=$(PROGNAME).hex
|
||||
|
||||
OBJS=main.o n64.o gcn64_protocol.o usart1.o usb.o bootloader.o
|
||||
|
||||
all: $(HEXFILE)
|
||||
|
||||
clean:
|
||||
rm -f $(PROGNAME).elf $(PROGNAME).hex $(PROGNAME).map $(OBJS)
|
||||
|
||||
%.o: %.S
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
%.o: %.c %.h
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(PROGNAME).elf: $(OBJS)
|
||||
$(LD) $(OBJS) $(LDFLAGS) -o $(PROGNAME).elf
|
||||
|
||||
$(PROGNAME).hex: $(PROGNAME).elf
|
||||
avr-objcopy -j .data -j .text -O ihex $(PROGNAME).elf $(PROGNAME).hex
|
||||
avr-size $(PROGNAME).elf
|
||||
|
||||
fuse:
|
||||
|
||||
flash: $(HEXFILE)
|
||||
./wait_then_flash.sh $(CPU) $(HEXFILE)
|
||||
|
||||
chip_erase:
|
||||
dfu-programmer atmega32u2 erase
|
||||
|
||||
reset:
|
||||
dfu-programmer atmega32u2 reset
|
@ -26,13 +26,23 @@
|
||||
static volatile unsigned char gcn64_workbuf[GCN64_BUF_SIZE];
|
||||
|
||||
/******** IO port definitions and options **************/
|
||||
#define GCN64_DATA_PORT PORTD
|
||||
#define GCN64_DATA_DDR DDRD
|
||||
#define GCN64_DATA_PIN PIND
|
||||
#define GCN64_DATA_BIT (1<<0)
|
||||
#define GCN64_BIT_NUM_S "0" // for asm
|
||||
#define FREQ_IS_16MHZ
|
||||
#define DISABLE_INTS_DURING_COMM
|
||||
#ifndef STK525
|
||||
#define GCN64_DATA_PORT PORTD
|
||||
#define GCN64_DATA_DDR DDRD
|
||||
#define GCN64_DATA_PIN PIND
|
||||
#define GCN64_DATA_BIT (1<<0)
|
||||
#define GCN64_BIT_NUM_S "0" // for asm
|
||||
#define FREQ_IS_16MHZ
|
||||
#define DISABLE_INTS_DURING_COMM
|
||||
#else
|
||||
#define GCN64_DATA_PORT PORTA
|
||||
#define GCN64_DATA_DDR DDRA
|
||||
#define GCN64_DATA_PIN PINA
|
||||
#define GCN64_DATA_BIT (1<<0)
|
||||
#define GCN64_BIT_NUM_S "0" // for asm
|
||||
#define FREQ_IS_16MHZ
|
||||
#define DISABLE_INTS_DURING_COMM
|
||||
#endif
|
||||
|
||||
/*
|
||||
* \brief Explode bytes to bits
|
||||
|
Loading…
Reference in New Issue
Block a user