This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Generating multiple versions of the same firmware?

Hi,

i have a rather daunting problem. We want to deploy our firmware in over 300 devices. All devices use the same firmware except for one variable DeviceID. The id has to be different for every device we use.

So device 1 would get id 1, device 2 id 2 and so on.

I am sure that some of you have already tackled such problems. What would be the best solution?

Maybe set the variable to a specific location (DeviceID _at_ Location) and patch the hexfile? or something more elegant?

regards

Christian

  • Hi Christian,

    I just wanted to bring to your attention this flexible tool for manipulating HEX files (as well as many other file formats):
    http://srecord.sourceforge.net/
    The Win32 binary can be downloaded here:
    http://sourceforge.net/projects/srecord

    If you decide to patch the HEX file, this tool can very useful.

    - mike

  • One possibility would be to make a .bat file. If you use a "%" in the linker commandline and use the .bat loop abilities, you would only have to enter the number once per batch of chips. Of course, you would have to make the .hex filename the device ID as part of the "%" use.

    Erik

  • "Of course, you would have to make the .hex filename the device ID as part of the "%" use."

    Not quite sure what you're getting at there - could you explain a bit more.

    I think 'for' together with the "S-Record" utilities Mike mentioned should be able to do this.

    Note that the 'for' on Win-NT and later is far more powerful than Win-9x and before (including "real" MS-DOS).

  • well, if you are making several .hex files with different serial numbers, you have two options:
    1) a different name of the .hex file to disk for each serial number - or -
    2) integrate the programming of the chips in the .bat file.


    Erik

  • Hi

    I am Assuming that you are going to program the chips with a programmer or Boot loader.

    You should be able to add a record to the Hex file. It is very easy to create a record in Intel Hex. Just make sure you mark that location reseved in the compiler. The write a seperate program to add the proper record to each file. Make sure it is before the "Last Record" Record in the hex file.

  • Check your PROM programmer and/or its control software - you may find it can do this automatically.

    The STAGcom software for my programmer certainly says it can - see "serialisation" (although I've never used it myself):
    http://www.stag.co.uk/

    Alternatively, does you procuct have any EEPROM (or similar) that could be used?
    The serial number could be programmed as part of the final manufacturing test?

  • All devices use the same firmware except for one variable DeviceID. The id has to be different for every device we use.

    I, once, had an experience with a similar application. For reasons I do not recall, the original design required a unique number in each code memory. This worked fine till a software upgrade was required. The blasted designer of the project had made it so that once a given unit had been installed the DeviceId could not change.

    Please, do not fall into that trap.

    The upgrade process described above resulted in virtually every customer getting pi$$ed because the first start after upgrade "always" failed, since the keeping the DeviceId process turned out to be so error prone.


    THE GOOD NEWS is that you do not need to do that at all. Maxim has a $0.52 chip, DS2411 that provide a unique number over the Dallas 1 wire bus. I am using it in a current project where the slaves initially respond with theit DS2411 numbers and then are assigned 'manageable' numbers for theit 485 nodes.

    Erik