OpenCores
URL https://opencores.org/ocsvn/copyblaze/copyblaze/trunk

Subversion Repositories copyblaze

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /copyblaze/trunk
    from Rev 52 to Rev 53
    Reverse comparison

Rev 52 → Rev 53

/copyblaze/sw/code/pbcc/test10/test10.c
0,0 → 1,23
// test array of ints
 
#define ARRAY_SIZE 10
 
volatile short numbers[ARRAY_SIZE] = {9,8,7,6,5,4,3,2,1,0};
 
void main()
{
short i, j, temp;
for (i = (ARRAY_SIZE - 1); i > 0; i--)
{
for (j = 1; j <= i; j++)
{
if (numbers[j-1] > numbers[j])
{
temp = numbers[j-1];
numbers[j-1] = numbers[j];
numbers[j] = temp;
}
}
}
}
/copyblaze/sw/code/pbcc/test10/Makefile
0,0 → 1,60
# tools paths
DRIVE=/cygdrive/c
 
PATH_TOP=../../../..
PATH_TOOL=$(PATH_TOP)/sw/tools
PATH_ASM=asm
PATH_COMP=comp/pbcc/sdcc
 
CC=$(PATH_TOOL)/$(PATH_COMP)/bin/sdcc.exe
AS=$(PATH_TOOL)/$(PATH_ASM)/pBlazASM/pBlazASM/pBlazASM.exe
MG=$(PATH_TOOL)/$(PATH_ASM)/pBlazASM/cpBlazeMRG/cpBlazeMRG.exe
 
# output directory
DIROUT=$(PATH_TOP)/rtl/vhdl
 
# remove command
RM = rm -f -v
CP = cp
 
# Compiler Flags
C_SRC = test10.c
CFLAGS = -mpblaze -S
IFLAGS = -I"$(PATH_TOOL)/$(PATH_COMP)/device/include/pblaze"
 
# Assembler Flags
ASM_SRC = *.psm
AFLAGS = -k -l -x
 
# Merge Flags
MGFLAGS =
ENTITY = cp_ROM_Code
 
.SUFFIXES : .psm .mem .vhd .psh
 
# ALL
all: clean $(ENTITY).vhd
 
# compile #
$(ENTITY).psm: $(C_SRC)
$(CC) $(C_SRC) $(CFLAGS) $(IFLAGS)
 
# assemble #
$(ENTITY).mem: $(ENTITY).psm
$(AS) $(ASM_SRC) $(AFLAGS)
$(CP) *.hex $(ENTITY).hex
 
# merge #
$(ENTITY).vhd: $(ENTITY).mem
$(MG) $(MGFLAGS) $(ENTITY).hex
$(CP) $(ENTITY).vhd $(DIROUT)/$(ENTITY).vhd
 
 
# clean outputs
clean:
$(RM) *.lst
$(RM) *.mem
$(RM) *.hex
$(RM) *.log
$(RM) *.vhd
$(RM) *.bin
/copyblaze/sw/code/pbcc/test6/test6.c
0,0 → 1,22
// interrupt handler test for pBlazeIDE
 
char __xdata val = 0;
char __xdata c;
 
void interruptHandler() __interrupt
{
val++;
}
 
void main()
{
c = 0;
__asm
EINT
__endasm;
 
for (;;) {
 
c += 4;
}
}
/copyblaze/sw/code/pbcc/test6/Makefile
0,0 → 1,60
# tools paths
DRIVE=/cygdrive/c
 
PATH_TOP=../../../..
PATH_TOOL=$(PATH_TOP)/sw/tools
PATH_ASM=asm
PATH_COMP=comp/pbcc/sdcc
 
CC=$(PATH_TOOL)/$(PATH_COMP)/bin/sdcc.exe
AS=$(PATH_TOOL)/$(PATH_ASM)/pBlazASM/pBlazASM/pBlazASM.exe
MG=$(PATH_TOOL)/$(PATH_ASM)/pBlazASM/cpBlazeMRG/cpBlazeMRG.exe
 
# output directory
DIROUT=$(PATH_TOP)/rtl/vhdl
 
# remove command
RM = rm -f -v
CP = cp
 
# Compiler Flags
C_SRC = test6.c
CFLAGS = -mpblaze -S
IFLAGS = -I"$(PATH_TOOL)/$(PATH_COMP)/device/include/pblaze"
 
# Assembler Flags
ASM_SRC = *.psm
AFLAGS = -k -l -x
 
# Merge Flags
MGFLAGS =
ENTITY = cp_ROM_Code
 
.SUFFIXES : .psm .mem .vhd .psh
 
# ALL
all: clean $(ENTITY).vhd
 
# compile #
$(ENTITY).psm: $(C_SRC)
$(CC) $(C_SRC) $(CFLAGS) $(IFLAGS)
 
# assemble #
$(ENTITY).mem: $(ENTITY).psm
$(AS) $(ASM_SRC) $(AFLAGS)
$(CP) *.hex $(ENTITY).hex
 
# merge #
$(ENTITY).vhd: $(ENTITY).mem
$(MG) $(MGFLAGS) $(ENTITY).hex
$(CP) $(ENTITY).vhd $(DIROUT)/$(ENTITY).vhd
 
 
# clean outputs
clean:
$(RM) *.lst
$(RM) *.mem
$(RM) *.hex
$(RM) *.log
$(RM) *.vhd
$(RM) *.bin

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.