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.

CCS/LAUNCHCC3220MODASF: cloudOTA CdnGithub_ParseRespDir Error

Part Number: LAUNCHCC3220MODASF

Tool/software: Code Composer Studio

Hi,

Trying to run the CloudOTA example. 

After getting the response from the HTTP request, when it has to allocate the size as per the content length, it is unable to do so. It return -1.

  • Hi,

    Are you sure the problem is the malloc failure? Can you share the full terminal log?  (please enable the OTA logs in the otauser.h  and recompile the library).

    When working with the JSON library, whenever trying to get a value, there is a need of passing the maximum size of the buffer that will be returned to the caller with the information.

     MAX_METADATA_FILENAME (see OtaJson.c) is the maximum size of the buffer that holds the value of key “download_url”

    Please try to increment this value. It will require a rebuild of the ota library (and of your application).

    Br,

    Kobi 

  • Hi,

    It looks like the malloc failure. I tried to increase the value of the "Not Configurable numbers" in the ota.h because when printed out the value of the response buffer, I realized that it's not able to get the download URL but there are several warnings about the integer truncation so I put that back to normal. The response length of the json(response after hitting the APIs) is 212436. This is what it's trying to allocate in the above screenshot.

    As you asked for the complete log, below is the screenshot of that, with that I have also printed the buffer received after the API.

  • Well, this is the problem. You are trying to read a very long tar file (i guess this is your OTA image tarball) while this step tries to read the content of your OTA folder in the GitHub (i.e. "ls"). 

    OTA_VENDOR_DIR should contain the folder in which the tar file is located and not the tar file itself.

    Please refer to the OTA documentation for the instructions of the required github repository.

    Br,

    Kobi

     

  • Hi Kobe,

    Thanks for the support.
    It worked out, the allocation failure is gone now. But now I'm getting the signature failure, I think it was because it requires the chain of certificates because when I tried using the dummy certs I was able to do it.
    When I'm using the openssl to create the certificate, Uniflash is declining to register the rootCA.crt.
    Is it because of the format?
    As per the documentation it requires the chain in pem format, and when I'm converting all the chain certs in pem format, it is exceeding the size.
    Kindly help.

    Regards
  • What do you mean by "Uniflash is declining to register the rootCA.crt"? how do you register it?
    What is the error you are getting?
    I also don't understand what is the error you are referring in regards to the regards to the PEM.
    Please send logs/screen-captures of the issues.

    Br,
    Kobi
  • Hi Kobi,

    Referencing the older thread(e2e.ti.com/.../604556)
    I did exactly the same thing and was getting the error for unknown rootCA.
    Is there any way I can use the self-signed certs in this?
    As per the thread I mentioned there's no solution.
    Any help will be great
    Regards
  • The image is verified against the Certificate Catalog (which by default doesn't contain your self-signed certificate).

    The following document contains the instructions for programming your own catalog which will support the self-signed certificate as well as all the other cloud certificates that you want to use.

    http://www.ti.com/lit/ug/swru547a/swru547a.pdf

    Br,

    Kobi