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.

BOOSTXL-CC3135: UniFlash command line get_csr.bat

Part Number: BOOSTXL-CC3135
Other Parts Discussed in Thread: UNIFLASH, CC3135, CC31XXEMUBOOST, CC3220S, CC3220SF, CC3235S, CC3235SF

Hi,

looking at the documentation in the uniflash_7.2.0 directory, specifically about auto-generating a CSR from the command line with the image creator and csr.exe tool (using the get_csr.bat script) - can this be used with the CC3135 via the CC31XXEMUBOOST platform?

The part options for the get_csr.bat script are:

  • CC3220S
  • CC3220SF
  • CC3235S
  • CC3235SF

I had a go with each, hoping that the CC3235S would still work just the same on the CC3135 but the script falls over when it gets to the point where it wants the board to be powered off, then on. I'm not sure if this just required the USB to the EMUBOOST to be disconnected (although that didn't work either - the script failed before I could even plug back in) or if it's looking for a USB to be connected directly to the CC3135 as well.

This would be very useful in being able to automate configuring a CC3135 board by generating, extracting and signing a CSR, with the signed cert to be loaded back on. I've attached the tail end of the get_csr output below. Currently I'm just using the defaults in the script, with the following paths configured:

set UNIFLASHPATH="%BATFILEPATH%..\bin"
set SDKINSTALLPATH=C:\ti\simplelink_cc32xx_sdk_5_10_00_02
rem *****
rem Service Pack Name and Path
set SPNAME=sp_4.10.0.1_3.7.0.1_3.1.0.26.bin
set SP_PATH="%SDKINSTALLPATH%/tools/cc32xx_tools/servicepack-cc3x35"
rem Certificate store list/signature and path
set CERT_LST=certcatalogPlayGround20160911.lst
set CERT_LST_BIN=certcatalogPlayGround20160911.lst.signed_3235.bin
set CERT_LST_PATH="%SDKINSTALLPATH%/tools/cc32xx_tools/certificate-playground"
rem Certificates name, key and path
set DUMMY_CERT_NAME=dummy-root-ca-cert
set DUMMY_KEY_NAME=dummy-root-ca-cert-key
set DUMMY_CERT_PATH="%SDKINSTALLPATH%/tools/cc32xx_tools/certificate-playground"

Non-encrypted files generated successfully.



Finished successfully.


INFO:root:COM PORT COM3
INFO:slbootloader.slbootloader:Connecting to device
INFO:slbootloader.slbootloader:--- Please power off the device ---
Press ENTER to continue
INFO:slbootloader.slbootloader:Power off
INFO:slbootloader.slbootloader:Set break signal
INFO:slbootloader.slbootloader:--- Please power on the device ---
INFO:slbootloader.slbootloader:Power on
Traceback (most recent call last):
  File "<string>", line 5266, in <module>
  File "<string>", line 5262, in main
  File "<string>", line 5232, in cmdline
  File "<string>", line 4077, in command_project_program
  File "<string>", line 2706, in program_image_from_project
  File "<string>", line 1567, in connect_device
  File "W:\slbootloader\slbootloader.py", line 409, in connect_with_reset
  File "W:\slbootloader\slbootloader.py", line 271, in _expect_ack
  File "W:\slbootloader\slbootloader.py", line 302, in _read_data
slbootloader.slbootloader.BootLoaderError:
Error: SLImageCreator.exe: BootLoaderError, Timeout reading data
SLImageCreator returned -1


sleep 10


reset device

ERROR: Failed to connect to XDS110 (-260).
       Check USB connection to the XDS110.

popd


pushd c:\ti\uniflash_7.2.0\simplelink\imagecreator\csr\

  • Hi,

    The reason it applies only to CC32xx family of devices is that only an application running on the internal M4 processor can implement the set of CSR related APIs and create the certificate. For CC31xx, there is no application processor in the device, only an external application processor.

    This is also the reason you see under the imagecreator csr directory (where the csr.exe is located) the 4 directories per device type that contain a prebuilt mcu application that includes these APIs.

    For CC31xx you can do something similar through the host driver APIs or do it externally using openssl for example.

    Regards,

    Shlomi

  • Ah of course! I forgot the ARM on the CC3135 wasn't for user applications.

    Are you saying it's possible to use openssl directly with the CC3135 to generate the CSR? I can generate the CSR via the host API I was just looking into a more automated way of generating / extracting/ signing. 

    Thank you.

    Sean

  • Hi,

    I agree it is less convenient in terms of automated testing but with CC31xx it is not possible unfortunately.

    with openSSL I meant you can create the CSR just you would do with uniflash but in this case it does not involve the key from the device so it may not be what you are looking for.

    Shlomi

  • I see what you mean. No problem, it won't take much more to automate what I have, I just wanted to make sure there wasn't a quicker way! Thanks for your help.

    Cheers,

    Sean