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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uClinux-2.0.x/] [arch/] [m68knommu/] [platform/] [68EZ328/] [tools/] [bintoc.c] - Rev 199

Go to most recent revision | Compare with Previous | Blame | View Log

#include <stdio.h>
 
int
main(int argc, char *argv[])
{
	unsigned char buf[8];
	int cnt;
	int i;
 
	printf ("/* romfs.h: ROMfs image converted to a C char array
   Machine generated DO NOT EDIT */
char
_flashstart[] = {");
 
	while (cnt = read(0,buf,sizeof(buf))) {
 
		printf("\n");
		for (i=0; i<cnt; i++) {
			printf(" 0x%.2x,",buf[i]); 
		}
	}
	printf("\n0};\n");
}
 
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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