0

I want to change the devices start logo. I placed my logo in 0x00060000-0x0007FFFF address range, it's 128kb. I am using this online tool for resizing, formatting and for generating array.

https://notisrac.github.io/FileToCArray/

https://github.com/notisrac/FileToCArray?tab=readme-ov-file

Is it possible to generate intel .hex file without local compile? Or what is the best way? I wrote a gui for logo update. Giving start address and gui writes over USB.

I've said, end user will change the logo without compiling, Please look at this video. Anybody will change the logo. He/She is a dummy, just have a picture. I am asking, how can I do that?

I am already changing logos via compiling with two different project. And changing .HEX files SEGGER J-Flash Edit->Relocate and Edit->Delete range. I don't want to this.

note: I am using CMAKE for compiling.

Thanks already, sincerely.

9
  • What did your research to encode binary data into Intel hex reveal else? And why did it not help you? (Hint: the detour over C is more a dead end.) -- What tools do you have at hand? For example, do you have GCC installed? Commented Jan 17 at 9:35
  • 2
    Maybe use some bin2hex tool, e.g. python-intelhex.readthedocs.io/en/stable/part3-2.html. Why do you need Intel HEX format? Can't you simply transfer the binary data? Please edit your question to add requested information or clarification. Commented Jan 17 at 9:47
  • 1
    objcopy -I bin -O ihex will do this and is most likely already installed. Commented Jan 17 at 10:28
  • I'd recommend using srec_cat as it allows you to set the starting offset in the hex file. Something like srec_cat inputfile.bin -Binary -offset 0x60000 -Output outputfile.hex -Intel (the input file name is followed by the -Binary format and the -offset 0x60000 filter, the output file name is followed by the -Intel format). This will output 32 bytes per line by default. To change it to 16 bytes per line, add the -Output_Block_Size 16 option to the end. Commented Jan 17 at 10:38
  • 1
    @IanAbbott: objcopy can do that as well, and it is already installed on any development system. objcopy -I binary -O ihex --change-addresses 0x12345678 foo.bin foo.hex Commented Jan 17 at 13:34

1 Answer 1

2

The command you want is:

objcopy -I binary -O ihex --change-addresses 0x12345678 input.bin output.hex

Several comments are suggesting extra software you could install, but since you mention gcc you must already have objcopy installed. If you invoke your gcc as (for example) arm-none-eabi-gcc then you might need to use arm-none-eabi-objcopy, but any version of objcopy will produce the same output.

Sign up to request clarification or add additional context in comments.

3 Comments

it's already installed and i am using cmake. i've already get .hex or .srec files. i am asking for end user operations. i've edited question please check it.
@neyimvarki your end user will still need a tool to prep the file, and that could be a copy of objcopy that you provide or point them to. It is part of the binutils package, you don't need to install all of gcc. You would still have to provide a solution for their chosen operating system. You could similarly use SRecord as others have suggested (and I posted a little link).
Having re-read edits I think OP wants something that convert an image file in firmware and writes it to flash without any dev tools. Obviously too wide scope for SO, but its already closed anyway.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.