5

I have got a firmware (.raw) file which has to be written in serial flash. One way is to create a header file out of it i.e. a string array with the file content and then in code read this buffer and write it in serial flash.

In linux do we have any tool/command to create a header file with proper formatting. I am finding it toough to do it manually. The size of raw file is around 5mb.

stakx - no longer contributing
  • 83,039
  • 20
  • 168
  • 268

1 Answers1

6

In linux you can use xxd command for this functionality.

Usage: xxd -i fname > abc.h

This will create a new header file with proper formatting.

Anshul
  • 1,416
  • 1
  • 16
  • 42