mirror of
git://projects.qi-hardware.com/nn-usb-fpga.git
synced 2025-04-21 12:27:27 +03:00
Adding Hello World Example Runing from Internal SRAM and NAND
This commit is contained in:
26
Examples/hello_sram/build/Makefile
Executable file
26
Examples/hello_sram/build/Makefile
Executable file
@@ -0,0 +1,26 @@
|
||||
|
||||
OBJS := start.o main.o jz_serial.o
|
||||
|
||||
CROSS := mipsel-elf-
|
||||
|
||||
CFLAGS := -O2 -G 0 -mno-abicalls -fno-pic -mips32 -Iinclude
|
||||
AFLAGS = -D__ASSEMBLY__ $(CFLAGS)
|
||||
LDFLAGS := -T ld.script -nostdlib -EL
|
||||
|
||||
.c.o:
|
||||
$(CROSS)gcc $(CFLAGS) -c $< -o $@
|
||||
.S.o:
|
||||
$(CROSS)gcc $(AFLAGS) -c $< -o $@
|
||||
|
||||
jz_xloader.bin: jz_xloader
|
||||
$(CROSS)objdump -D jz_xloader $< > jz_xloader.dump
|
||||
$(CROSS)objcopy -O binary $< $@
|
||||
|
||||
jz_xloader: $(OBJS)
|
||||
$(CROSS)ld $(LDFLAGS) $^ -o $@
|
||||
|
||||
upload: jz_xloader
|
||||
sudo usbtool 1 jz_xloader.bin 0x80000000
|
||||
|
||||
clean:
|
||||
rm -fr *.o jz_xloader jz_xloader.bin jz_xloader.dump
|
||||
Reference in New Issue
Block a user