version 1.2, 2005/02/15 08:18:56
|
version 1.3, 2005/02/15 08:36:30
|
|
|
echo "appending to $1.hex!" | echo "appending to $1.hex!" |
echo "DONT FORGET TO remove final ," | echo "DONT FORGET TO remove final ," |
echo " ============================================ " | echo " ============================================ " |
echo "static unsigned char file_$1 = {" >> $1.hex |
echo "static unsigned char file_$1[] = {" >> $1.hex |
#| grep "s/cab/_/" | #| grep "s/cab/_/" |
od -h $1 | sed "s/^[0-9]\{7\}[ ]*//g" | sed "s/\([0-9a-f]\{2\}\)[ ]*/00x\U\1,/g" | sed "s/\([.]*\),$//" | sed "s/.*/&,/" | sed "s/^,$//g" | sed "/^$/d" >> $1.hex |
od -h $1 | sed "s/^[0-9]\{7\}[ ]*//g" | sed "s/\([0-9a-f]\{2\}\)[ ]*/0x\U\1,/g" | sed "s/\([.]*\),$//" | sed "s/.*/&,/" | sed "s/^,$//g" | sed "/^$/d" >> $1.hex |
#doesnt just remove end of file but end of every line - sed "s/.$[^^]//" | sed "s/.$//" | | #doesnt just remove end of file but end of every line - sed "s/.$[^^]//" | sed "s/.$//" | |
echo "};" >> $1.hex | echo "};" >> $1.hex |
echo "static int szfile_$1 = sizeof(file_$1);" >> $1.hex | echo "static int szfile_$1 = sizeof(file_$1);" >> $1.hex |