Disabling code or data flash. Intel HEX support.#12
Disabling code or data flash. Intel HEX support.#12bicyclesonthemoon wants to merge 1 commit intomsalau:masterfrom
Conversation
|
Thanks for your effort!
Also you may split the pull request into 2:
I'm perfectly fine with implementation of the first one and will merge it immediately. Regards, |
|
I have created a separate pull request for data/code flash disabling. As for the ihex support, I didn't create additional locations or definitions because I didn't see the need for it because of how almost identical these two formats are. I do not like the idea of deciding the file format based on filename extension. If we want automatic detection of file type this can be done based of the file content. |
Thanks! I've merged it already.
Indeed, S-Record and Intel Hex file formats have much in common, but they are different entities and thus should be separated. It is counter-intuitive to place the hex file handler in a file named srec.c
I believe extensions were invented to define file types :) Thus I insist on this feature. I also understand your motivation for adding an option to define the file type in command line. Some tools do use awkward extensions instead of commonly used ones. I think textual file types are easier for end-users. Regards, |
|
Hello again, So I would like to ask, what is your vision of how it should be.
How to detect file format?
Which way to go? |
I added the possibility to disable data flash or code flash operations as commented on issue #9
I added two commandline options. -x and -y.
And two variables char nodata and char nocode.
Using -x will disable any data flash operations.
Using -y will disable any code flash operations.
Also I added a support for Intel HEX format.
Previously I had to use srec_cat to convert hex files to s-record before using fl78flash.
So I made it possible to use the files directly.
A new comand line option is -f.
-f 0 is S-record.
-f 1 is Intel HEX
default is 0 (S-record).
I added ihex_read() function which is a copy or srec_read() slightly modified for the Intel HEX format.