This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Programming MAC Address for Tiva Controller using Uniflash and XDS100v2

Other Parts Discussed in Thread: UNIFLASH, TM4C1231H6PZ

I am using XDS100v2. I need to know how can we program the MAC address of Tiva TM4C1231H6PZI using the command line option of Uniflash.


As of now, i am using below command to program the actual flash memory in command line.

uniflash –ccxml ../configs/TM4C1231H6PZ.ccxml –program “C:\WSeriesStats.hex” –target0p run


I also need to know what is the meaning of "target0p". I have found it in Uniflash examples.

  • targetOp allows you to send a command to the device afterwards. 

    "-targetOp" is use to interact with the target after program loads. Specified multiple target operation arguments will be executed in order. The current supported operations are: 1) "reset" - resets the target 2) "restart" - issues a restart on the loaded program 3) "run" - run the target core asynchrononously (ie; does not wait for a halt)

    As far as programming the MAC they are trying to do the equivalent of this:

    When you save the target configuration in the uniflash GUI there should be a .UNIFLASHSESSION file that contains these settings.  When you run from the command line make sure that file is in the same location as the .ccxml file.  Then add -loadSettings <pathToSessionFile> to the command line and put the name of the session file in it.

  • Hi Joey,

    Thanks for the support. I did similar way as you have mentioned,
    I am using following command now,

    uniflash -ccxml ../configs/TM4C1231H6PZ.ccxml -core "CORTEX_M4_0" -loadSettings ../session/TM4C1231H6PZ.uniflashsession -program ../programs/ABCD.hex -targetOp reset

    uniflashsession file is in session folder, while CCXML file is in config folder.

    Below is the snap of contents of my uniflashsession file, it has setting for programming the MAC address.

    <?xml version="1.0" encoding="UTF-8" standalone="no"?><PartNumber id=""><Core name="CORTEX_M4_0"><DebugProperties>&lt;?xml version="1.0" encoding="UTF-8" standalone="no" ?&gt;
    &lt;PropertyValues&gt;

      &lt;property id="VerifyAfterProgramLoad"&gt;
        &lt;curValue&gt;Full verification&lt;/curValue&gt;
      &lt;/property&gt;

      &lt;property id="AutoRunToLabelOnRestart"&gt;
        &lt;curValue&gt;0&lt;/curValue&gt;
      &lt;/property&gt;

      &lt;property id="FlashCrystalFreq"&gt;
        &lt;curValue&gt;16&lt;/curValue&gt;
      &lt;/property&gt;

      &lt;property id="FlashUserRegister0Input"&gt;
        &lt;curValue&gt;005EF820&lt;/curValue&gt;
      &lt;/property&gt;

      &lt;property id="FlashUserRegister0Commit"&gt;
        &lt;curValue&gt;1&lt;/curValue&gt;
      &lt;/property&gt;

      &lt;property id="FlashUserRegister1Input"&gt;
        &lt;curValue&gt;00D5EBA0&lt;/curValue&gt;
      &lt;/property&gt;

      &lt;property id="FlashUserRegister1Commit"&gt;
        &lt;curValue&gt;1&lt;/curValue&gt;
      &lt;/property&gt;

    &lt;/PropertyValues&gt;
    </DebugProperties><FilePaths/></Core></PartNumber>


    When I try to burn the flash with above mentioned command line, flash writing happens successful, but MAC doesn’t burn.

    Can you please confirm what the issue is?
    Thanks.

    BR,
    Aditya

  • Thanks Joey for your below reply.

    MAC address programming is consider a standalone Flash operation, so you will need to add the -operation argument to your command to execute it.

    For example,

    Programming via Mac Address:

    uniflash -ccxml "C:/Users/a0389326/user/CCSTargetConfigurations/LM3S9B92.ccxml" -setOptions FlashMACAddrInput=00-1A-B6-02-AF-B4 -operation ProgramMACAddress

    Programming via User Registers:

    uniflash -ccxml "C:/Users/a0389326/user/CCSTargetConfigurations/LM3S9B92.ccxml" -setOptions FlashUserRegister0Input=0x00B61A00 FlashUserRegister1Input=0x00B4AF02 -operation ProgramUserRegister0 ProgramUserRegister1

    Reading back the Mac Address after programming:

    uniflash -ccxml "C:/Users/a0389326/user/CCSTargetConfigurations/LM3S9B92.ccxml" -operation ReadMACAddress

    You can also specify the value of the MAC or User Register via the -loadSettings argument that John mentioned. If you want to load a program and run the target afterwards, you can also add -program and -targetOp into your command

  • Hi Support,

    This Programming MAC Address is fine solution if we need MAC Address on Temporary. The example command mentioned below,

    uniflash -ccxml "C:/Users/a0389326/user/CCSTargetConfigurations/LM3S9B92.ccxml" -setOptions FlashMACAddrInput=00-1A-B6-02-AF-B4 -operation ProgramMACAddress

    will hold the MAC address until power cycle. The windows tool of Uniflash also allows the MAC Address to be committed, can someone please let me know, how this can be be done using the above command? What additional option need to set to commit the MAC Address permentatly?

    Thanks.

  • Hello,

    Use setOptions command to: -setOptions FlashMACAddrInput=00-1A-B6-02-AF-B4 FlashMACAddrCommit=1

    Thanks,

    Jason