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

Subversion Repositories or1k

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 749 to Rev 750
    Reverse comparison

Rev 749 → Rev 750

/branches/oc/orp/orp_soc/sw/utils/marksec
0,0 → 1,8
#!/bin/sh
LINE_NB=`wc -l < $1`
MIN=`expr $LINE_NB - 1`
 
echo "ffffffff" > $2
tail -$MIN $1 >> $2
 
branches/oc/orp/orp_soc/sw/utils/marksec Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: branches/oc/orp/orp_soc/sw/utils/bin2srec.c =================================================================== --- branches/oc/orp/orp_soc/sw/utils/bin2srec.c (nonexistent) +++ branches/oc/orp/orp_soc/sw/utils/bin2srec.c (revision 750) @@ -0,0 +1,43 @@ +#include + +#define SMARK "S214" +#define SADDR 0x000000 +#define INIT_ADDR 0x100000 +#define SCHKSUM 0xff + +int main(int argc, char **argv) +{ + + FILE *fd; + int c, i, j; + unsigned long addr = INIT_ADDR; + unsigned char chksum; + + if(argc < 2) + error("no input file specified"); + + fd = fopen( argv[1], "r" ); + + while (!feof(fd)) { + j = 0; + chksum = SCHKSUM; + printf("%s%.6lx", SMARK, addr); + while (j < 16) { + c = fgetc(fd); + if (c == EOF) { + c = 0; + } + printf("%.2lx", c); + chksum -= c; + j++; + } + + chksum -= addr & 0xff; + chksum -= (addr >> 8) & 0xff; + chksum -= (addr >> 16) & 0xff; + chksum -= 0x14; + printf("%.2lx\r\n", chksum); + addr += 16; + } + return 0; +}
branches/oc/orp/orp_soc/sw/utils/bin2srec.c Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: branches/oc/orp/orp_soc/sw/utils/bin2flimg.c =================================================================== --- branches/oc/orp/orp_soc/sw/utils/bin2flimg.c (nonexistent) +++ branches/oc/orp/orp_soc/sw/utils/bin2flimg.c (revision 750) @@ -0,0 +1,36 @@ +#include + +int main(int argc, char **argv) +{ + + FILE *fd; + int c, i, j, width; + unsigned long word; + + if(argc < 3) + error("no input file specified"); + + width = atoi(argv[1]); + + fd = fopen( argv[2], "r" ); + + while (!feof(fd)) { + j = 0; + word = 0; + while (j < width) { + c = fgetc(fd); + if (c == EOF) { + c = 0; + } + word = (word << 8) + c; + j++; + } + if(width == 1) + printf("%.2lx\n", word); + else if(width == 2) + printf("%.4lx\n", word); + else + printf("%.8lx\n", word); + } + return 0; +}
branches/oc/orp/orp_soc/sw/utils/bin2flimg.c Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: branches/oc/orp/orp_soc/sw/utils/Makefile =================================================================== --- branches/oc/orp/orp_soc/sw/utils/Makefile (nonexistent) +++ branches/oc/orp/orp_soc/sw/utils/Makefile (revision 750) @@ -0,0 +1,12 @@ +all: dummy + +bin2srec: bin2srec.c + gcc -O2 -o bin2srec bin2srec.c + +bin2flimg: bin2flimg.c + gcc -O2 -o bin2flimg bin2flimg.c + +dummy: bin2srec bin2flimg + +clean: + rm -rf bin2srec bin2flimg *~ *.bak
branches/oc/orp/orp_soc/sw/utils/Makefile Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property

powered by: WebSVN 2.1.0

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