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

Subversion Repositories plasma

[/] [plasma/] [trunk/] [tools/] [convert.c] - Diff between revs 191 and 200

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 191 Rev 200
Line 203... Line 203...
      bss_end = length + 4;
      bss_end = length + 4;
   }
   }
   if(gp_ptr == 0)
   if(gp_ptr == 0)
      gp_ptr = gp_ptr_backup + 0x7ff0;
      gp_ptr = gp_ptr_backup + 0x7ff0;
 
 
 
#if 0
   /*Initialize the $gp register for sdata and sbss */
   /*Initialize the $gp register for sdata and sbss */
   printf("gp_ptr=0x%x ", gp_ptr);
   printf("gp_ptr=0x%x ", gp_ptr);
   /*modify the first opcodes in boot.asm */
   /*modify the first opcodes in boot.asm */
   /*modify the lui opcode */
   /*modify the lui opcode */
   set_low(code, 0, gp_ptr >> 16);
   set_low(code, 0, gp_ptr >> 16);
Line 227... Line 228...
      stack_pointer = bss_end + 1024 * 4;
      stack_pointer = bss_end + 1024 * 4;
   stack_pointer &= ~7;
   stack_pointer &= ~7;
   printf("SP=0x%x\n", stack_pointer);
   printf("SP=0x%x\n", stack_pointer);
   set_low(code, 24, stack_pointer >> 16);
   set_low(code, 24, stack_pointer >> 16);
   set_low(code, 28, stack_pointer & 0xffff);
   set_low(code, 28, stack_pointer & 0xffff);
 
#endif
 
 
   /*write out test.bin */
   /*write out test.bin */
   outfile = fopen("test.bin", "wb");
   outfile = fopen("test.bin", "wb");
   fwrite(code, length, 1, outfile);
   fwrite(code, length, 1, outfile);
   fclose(outfile);
   fclose(outfile);
Line 242... Line 244...
      d = ntohl(*(unsigned long *)(code + i));
      d = ntohl(*(unsigned long *)(code + i));
      fprintf(txtfile, "%8.8x\n", d);
      fprintf(txtfile, "%8.8x\n", d);
   }
   }
   fclose(txtfile);
   fclose(txtfile);
   free(buf);
   free(buf);
 
   printf("\n");
 
 
   return 0;
   return 0;
}
}
 
 
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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