Simplest method to get intel hex file into a string List ?

edited September 2017 in How To...

title says it really..... how to easily take each line of a hex file and make it a string in a StringList ?


  • Answer ✓

    loadStrings() will get you each line of the input file as a string array

    and there's a StringList constructor which takes an "Object ..." so you might be able to pass it in there.

  • Are you trying to load the raw ASCII lines, or are you trying to parse out the data contents of each line only, sans address, record type, checksum etc.?

  • edited September 2017

    includes the following example


    (i must admit i thought the OP meant the output from something like xxd)

  • Thanks Guys, I'm re-writing a little bootloader application from delphi across to java/processing to make it crossplatform and hopefully easier to maintain. I only need the RAW ASCII lines into the array, so I can then fire them out the serial port to MCUs. loadStrings() into a string array seems to have done the job, no need for stringList, haven't done a test on actual MCU yet, but the data from the Hex file is coming in correct. Cheers, mala

Sign In or Register to comment.