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.

Linux: Uniflash/dslite.sh configure board serial number or dev port for flashing from command line

Other Parts Discussed in Thread: UNIFLASH, LAUNCHXL-CC2650

Tool/software: Linux

Hi,

I am working with `UniFlash 4.6` on launchxl-cc2650 boards and would like to select the board to flash from the command line arguments of `dslite.sh`.


In an ideal scenario, I would be using a common `cc2650f128.ccxml` file adapted from the one generated from the graphical interface, that I could reuse for different boards and just specify the serial number or the /dev/tty port to use for flashing in a script.

In different forums/posts I have seen options like ComPort, --serial for some other versions that did not work.
And in the source code reference to `SEPK.POD_PORT`, `SEPK.POD_SERIAL`, `pod_port` or `pod_serial` but these cannot be given as `--settings` so not sure how to handle it.

When looking in the `cc2650f128.ccxml` the `Debug Probe Selection` section looks more like the graphical interface configuration than the flasher so not sure if that is the way I should specify it.

            <property Type="choicelist" Value="1" id="Debug Probe Selection">
                <choice Name="Select by serial number" value="0">
                    <property Type="stringfield" Value="MYSERIALNUMBER" id="-- Enter the serial number"/>
                </choice>
            </property>

Overall nothing wrong, but I do not know how to handle it from scripts.

What would be the canonical way to implement a script that flash for a given serial number/serial port: "my_flasher.sh SERIAL_NUMBER FLASHFILE".
If it is generating an xml file, then fine, just want to be sure before going that way, or if there is a simpler way.

Thank you in advance.
Regards,

Gaëtan

  • Hello Gaëtan,

    user5969016 said:
    If it is generating an xml file, then fine, just want to be sure before going that way, or if there is a simpler way.

    Likely your idea of having your own script to generate the ccxml file is the best (and only) option I can think of. Either that, or have the script modify the common ccxml file to specify the serial number in the file.

    ki

  • Hello ki,

    thank you for your answer, I was planning to indeed to "generate" a file by only modifying a common ccxml file.

    To simplify this part, do you know if the following part of the xml file would be valid to use without serial like the following or how I should do it in a "correct" way

                <property Type="choicelist" Value="1" id="Debug Probe Selection">
                    <choice Name="Select by serial number" value="0">
                        <!-- REMOVE THE COMMENT IF YOU USE SERIAL <property Type="stringfield" Value="REPLACE SERIAL_NUMBER" id="-- Enter the serial number"/> -->
                    </choice>
                </property>

    One goal would be that the base file could be used when not setting the serial number, and only need to replace one line, or one part of a line when setting the serial number.

    I could insert all the lines of the property, but that would put the format and all in the generation script instead of in the ccxml file.

    With your information I could already have a solution, I am just wondering if there is a nicer way than another that you would know.

    Thank you for your support.


    Regards,
    Gaëtan

  • user5969016 said:
    To simplify this part, do you know if the following part of the xml file would be valid to use without serial like the following or how I should do it in a "correct" way

                <property Type="choicelist" Value="1" id="Debug Probe Selection">
                    <choice Name="Select by serial number" value="0">
                        <!-- REMOVE THE COMMENT IF YOU USE SERIAL <property Type="stringfield" Value="REPLACE SERIAL_NUMBER" id="-- Enter the serial number"/> -->
                    </choice>
                </property>

    To do it the "correct" way, completely remove the entire block you have above when only one xds110 is used. Commenting out only that line will not work and likely will cause an error when CCS parses the ccxml file.

    Thanks

    ki

  • Thank you for your answer ki.

    Now I need to implement it :)

    Have a nice day

    Regards,
    Gaëtan