hexdump
This is the best I could come up with for printing out a bunch of bytes from a file into a format that you can put in a C program. I couldn't figure out how to get rid of the trailing junk:
hexdump -e '8/1 "0x%02x, " "\n"' file_to_dump.bin
This is the best I could come up with for printing out a bunch of bytes from a file into a format that you can put in a C program. I couldn't figure out how to get rid of the trailing junk:
hexdump -e '8/1 "0x%02x, " "\n"' file_to_dump.bin