|
Message
From: cvs at opencores.org<cvs@o...>
Date: Wed Mar 28 07:38:01 CEST 2007
Subject: [cvs-checkins] MODIFIED: mlite ...
Date: 00/07/03 28:07:38 Modified: mlite/tools convert.c makefile no_os.c opcodes.asm pi.c Log: Use linker values _gp, __bss_start, _end, and InitStack Revision Changes Path 1.14 mlite/tools/convert.c http://www.opencores.org/cvsweb.shtml/mlite/tools/convert.c.diff?r1=1.13&r2=1.14 (In the diff below, changes in quantity of whitespace are not shown.) Index: convert.c =================================================================== RCS file: /cvsroot/rhoads/mlite/tools/convert.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -b -r1.13 -r1.14 --- convert.c 12 Feb 2007 05:15:53 -0000 1.13 +++ convert.c 28 Mar 2007 05:38:01 -0000 1.14 @@ -205,6 +205,7 @@ if(gp_ptr == 0) gp_ptr = gp_ptr_backup + 0x7ff0; +#if 0 /*Initialize the $gp register for sdata and sbss */ printf("gp_ptr=0x%x ", gp_ptr); /*modify the first opcodes in boot.asm */ @@ -229,6 +230,7 @@ printf("SP=0x%x\n", stack_pointer); set_low(code, 24, stack_pointer >> 16); set_low(code, 28, stack_pointer & 0xffff); +#endif /*write out test.bin */ outfile = fopen("test.bin", "wb"); @@ -244,6 +246,7 @@ } fclose(txtfile); free(buf); + printf("\n"); return 0; } 1.17 mlite/tools/makefile http://www.opencores.org/cvsweb.shtml/mlite/tools/makefile.diff?r1=1.16&r2=1.17 (In the diff below, changes in quantity of whitespace are not shown.) Index: makefile =================================================================== RCS file: /cvsroot/rhoads/mlite/tools/makefile,v retrieving revision 1.16 retrieving revision 1.17 diff -u -b -r1.16 -r1.17 --- makefile 13 Feb 2007 19:51:05 -0000 1.16 +++ makefile 28 Mar 2007 05:38:01 -0000 1.17 @@ -29,7 +29,7 @@ all: convert_bin.exe tracehex.exe bintohex.exe ram_image.exe - @echo make targets = count, opcodes, pi, test, run, tohex, toimage, rtos + @echo make targets = count, opcodes, pi, test, run, tohex, toimage clean: -$(RM) *.o *.obj *.map *.lst *.hex *.txt 1.2 mlite/tools/no_os.c http://www.opencores.org/cvsweb.shtml/mlite/tools/no_os.c.diff?r1=1.1&r2=1.2 (In the diff below, changes in quantity of whitespace are not shown.) Index: no_os.c =================================================================== RCS file: /cvsroot/rhoads/mlite/tools/no_os.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- no_os.c 6 Mar 2006 01:59:54 -0000 1.1 +++ no_os.c 28 Mar 2007 05:38:01 -0000 1.2 @@ -3,6 +3,8 @@ #define MemoryRead(A) (*(volatile unsigned int*)(A)) #define MemoryWrite(A,V) *(volatile unsigned int*)(A)=(V) +int InitStack[128]; //used by boot.asm + void putchar(int value) { while((MemoryRead(IRQ_STATUS) & IRQ_UART_WRITE_AVAILABLE) == 0) 1.12 mlite/tools/opcodes.asm
http://www.opencores.org/cvsweb.shtml/mlite/tools/opcodes.asm.diff?r1=1.11&r2=1.12
(In the diff below, changes in quantity of whitespace are not shown.)
Index: opcodes.asm
===================================================================
RCS file: /cvsroot/rhoads/mlite/tools/opcodes.asm,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- opcodes.asm 14 Feb 2007 19:02:14 -0000 1.11
+++ opcodes.asm 28 Mar 2007 05:38:01 -0000 1.12
@@ -20,17 +20,11 @@
entry:
.set noreorder
- #These four instructions must be the first instructions
- #convert.exe will correctly initialize $gp
- lui $gp,0
- ori $gp,$gp,0
- #convert.exe will set $4=.sbss_start $5=.bss_end
- lui $4,0
- ori $4,$4,0
- lui $5,0
- ori $5,$5,0
- lui $sp,0
- ori $sp,$sp,0xfff0
+ la $gp, _gp #initialize stack pointer
+ la $4, __bss_start #$4 = .sbss_start
+ la $5, _end #$5 = .bss_end
+ nop #no stack needed
+ nop
b StartTest
nop #nops required to place ISR at 0x3c
1.3 mlite/tools/pi.c
http://www.opencores.org/cvsweb.shtml/mlite/tools/pi.c.diff?r1=1.2&r2=1.3
(In the diff below, changes in quantity of whitespace are not shown.)
Index: pi.c
===================================================================
RCS file: /cvsroot/rhoads/mlite/tools/pi.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- pi.c 6 Mar 2006 01:59:54 -0000 1.2
+++ pi.c 28 Mar 2007 05:38:01 -0000 1.3
@@ -1,5 +1,7 @@
/*Calculate the value of PI. Takes a long time!*/
#ifndef WIN32
+int InitStack[128]; //used by boot.asm
+
void putchar(char ch)
{
*(int*)0x20000000 = ch;
|
 |