srec_cat basic

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

i started playing around with srec_cat a little bit and am stuck at basics already. Could somebody please tell why line

    srec_cat srecc.hex −intel −o srecc.srec
is working fine and something like
    srec_cat srecc.hex −o srecc.bin −binary
exits with code 1?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'd expect that you still need to tell it , that the inputfile is -intel , else it doesn't know about the sourceformat.

This i suppose
https://www.avrfreaks.net/index.p...

Says that

srec_cat srecc.hex -intel −o srecc.bin −binary

Might work

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As Bingo says:

E:\avr>srec_cat test.hex -o test.bin -binary
srec_cat: test.hex: 1: warning: ignoring garbage lines
srec_cat: test.hex: 23: file contains no data

E:\avr>srec_cat test.hex -intel -o test.bin -binary

E:\avr>dir test.bin
 Volume in drive E is VBOX_windows
 Volume Serial Number is 0000-0801

 Directory of E:\avr

12/06/2013  11:16               324 test.bin
               1 File(s)            324 bytes
               0 Dir(s)  419,006,967,808 bytes free

E:\avr>avr-size test.hex
   text    data     bss     dec     hex filename
      0     324       0     324     144 test.hex

E:\avr>

The second invocation of srec_cat works and it has produced a 324 byte .bin file when avr-size also reports that test.hex contains 324 bytes of data. So it worked.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks a lot, it works now and thanks for the links too.