URL
https://opencores.org/ocsvn/pavr/pavr/trunk
Subversion Repositories pavr
Compare Revisions
- This comparison shows the changes necessary to convert path
/pavr/trunk/test/sieve
- from Rev 4 to Rev 6
- ↔ Reverse comparison
Rev 4 → Rev 6
/clean.bat
0,0 → 1,16
del *.obj |
del *.lst |
del *.map |
del *.hex |
del *.bin |
del *.err |
del *.ini |
del *.equ |
del *.nlb |
del *.tds |
del *.exe |
del *.dat |
|
make clean |
del coff\*.* /S /Q |
rmdir coff |
clean.bat
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: cavrcompile.bat
===================================================================
--- cavrcompile.bat (nonexistent)
+++ cavrcompile.bat (revision 6)
@@ -0,0 +1,8 @@
+echo Compiling sources...
+cavr sieve.c
+avrasm32.exe -fI sieve.asm -o test.hex -l test.lst
+hexbin test.hex test.bin I
+
+echo Copying binary file to VHDL test directory...
+del ..\..\tools\build_vhdl_test\test.bin
+copy test.bin ..\..\tools\build_vhdl_test
cavrcompile.bat
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: gcccompile.bat
===================================================================
--- gcccompile.bat (nonexistent)
+++ gcccompile.bat (revision 6)
@@ -0,0 +1,10 @@
+echo Cleaning...
+make clean
+
+echo Compiling sources...
+make
+hexbin sieve.hex test.bin I
+
+echo Copying binary file to VHDL test directory...
+del ..\..\tools\build_vhdl_test\test.bin
+copy test.bin ..\..\tools\build_vhdl_test
gcccompile.bat
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: sieve.c
===================================================================
--- sieve.c (nonexistent)
+++ sieve.c (revision 6)
@@ -0,0 +1,44 @@
+/* -*- mode: c -*-
+ * $Id: sieve.c,v 1.1.1.1 2003-02-10 04:08:54 doru Exp $
+ * http://www.bagley.org/~doug/shootout/
+ */
+
+//#include
+//#include
+#include
+//#include
+//#include
+
+//#define LIM 8192
+#define LIM 100
+#define NR_TIMES 1
+
+void main() {
+ int NUM;
+ static char flags[LIM + 1];
+ long i, k;
+ int count;
+ //char *txt1="Hello!";
+
+ NUM=NR_TIMES;
+ count=0;
+
+ while (NUM--) {
+ count = 0;
+ for (i=2; i <= LIM; i++) {
+ flags[i] = 0xff;
+ }
+ for (i=2; i <= LIM; i++) {
+ if (flags[i]) {
+ // remove all multiples of prime: i
+ for (k=i+i; k <= LIM; k+=i) {
+ flags[k] = 0xaa;
+ }
+ count++;
+ }
+ }
+ }
+ while (1) {
+ }
+ //printf("Count: %d\n", count);
+}
Index: makefile
===================================================================
--- makefile (nonexistent)
+++ makefile (revision 6)
@@ -0,0 +1,39 @@
+# Simple Makefile Volker Oth (c) 1999
+# edited by AVRfreaks.net nov.2001
+
+########### change these lines according to your project ##################
+
+#put the name of the target mcu here (at90s8515, at90s8535, attiny22, atmega603 etc.)
+ MCU = at90s8515
+
+#put the name of the target file here (without extension)
+ TRG = sieve
+
+#put your C sourcefiles here
+ SRC = $(TRG).c
+
+#put additional assembler source file here
+ ASRC =
+
+#additional libraries and object files to link
+ LIB =
+
+#additional includes to compile
+ INC =
+
+#assembler flags
+ ASFLAGS = -mdwarf2-asm -Wa, -gstabs
+
+#compiler flags
+ CPFLAGS = -g -Os -Wall -Wstrict-prototypes -Wa,-ahlms=$(<:.c=.lst) -O1
+
+#linker flags
+ LDFLAGS = -Wl,-Map=$(TRG).map,--cref
+
+
+########### you should not need to change the following line #############
+#include $(AVR)/avrfreaks/avr_make
+include c:\programs\avrgcc\avrfreaks\avr_make
+
+###### dependencies, add any dependencies you need here ###################
+$(TRG).o : $(TRG).c