Hi people, I have an interesting problem here. I need to generate a number (a 4-digit Integer) and give it as a command line argument to my exe file generated by the cross compiler. The problem is, EXE file would be executed by the chip & not by the PC, hence giving any command line argument would need a connection between the chip & one of the ports on the PC. Is there a way/mechanism by which I can give a command line argument during compile-time and not during the run-time? Is there any functionality provided by the tool on these lines? Regards, Jinen.
People, I am trying to use a windows based hex-editor. Is there a smart way for identifying where in the hex file I would need to make changes? Another question, Is it possible to write scripts, which would automatically goto a particular line & particular column in a hex file and make the required changes? Regards, Jinen
"I am trying to use a windows based hex-editor. Is there a smart way for identifying where in the hex file I would need to make changes?" Why?? That's a totally impracticaly way of handling 25000 per month!!!
"I am trying to use a windows based hex-editor. Is there a smart way for identifying where in the hex file I would need to make changes?" It sounds like you are still intent on not using something like the DS2411 or EEPROM. In that case, one would normally use a fixed ROM address and not worry about trying to "find" where the linker placed a const code object (and thus located it in a HEX file). Then you can simply add a HEX record to the hex file or generate "overlay" hex files as described in one of the links I provided previously. http://www.htsoft.com/forum/all/showflat.php/Cat/0/Number/14440 By the way, the program described therein is provided in source form, so you can modify it to do your "random" thing rather than generate sequential serial numbers. "Another question, Is it possible to write scripts, which would automatically goto a particular line & particular column in a hex file and make the required changes?" Yes, 010 Editor (URL provided previously) has the means to read in a HEX file, programmatically modify it, and write it back out. One could do similar things with Awk, Perl, etc. scripts and of course C (even using the source code mentioned above as a starting point).