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.

CC3220SF-LAUNCHXL: CC3220SF: Uniflash file size

Part Number: CC3220SF-LAUNCHXL
Other Parts Discussed in Thread: UNIFLASH, CC3200, CC3100

   

      I am trying to dump code but i am getting error 

      i am using CC3220SF-LAUNCHXL board here 32mb flash is there why i am getting error ?

      when i add web page(css,images,js,html) code that time showing error ?

     any size limit is there ?

     How to solve this issue ?

  

Thank you

  Vasu

  • Hi Vasu,

    At CC3220 LaunchPad is integrated 32Mbit flash (that mean 4MB not 32MB). How big are all your files?

    Jan
  • Hi Hnz
    Thank you for your reply,

    I removed few html file now dumping,
    another issue we using bootstrap in web page loading this take time for more than 1 minutes how to solve this issue ?
  • Hi,

    Can you be more specific (size of your web application and all libraries, how you interacts with webserver inside your C code, etc.)?

    Generally is not good idea to use web libraries with high level abstractions at embedded devices (Bootstrap, Angular, etc.). Because size of this libraries is too big. Same functionality can be achieved by by CSS/HTML and pure Javascript with much smaller size.

    Jan

  • Hi Jan

    Thank you for your reply,

            I am using uniflash to upload web  page code

            How to use  this code inside c (mcu bin) code ?

           Can i use array for storing web page content. when GET request comes send response to http client  ?

           Suppose this is possible   means can i use uniflash to store (js,cs,images) files and in c code index.html this is possible to access file system file (js,css,images) in index.html ? 

           How to reduce loading time ?

    Vasu

  • Hi Vasu,

    Your web files have approximately 500 kB. This is not that big I was afraid, but still far to ideal size. Issue is that you have a few big files and this is not a best practice for embedded device. At load time all your files (0.5MB) need to be transferred to client and this can take a while. Better is to have slitted web-pages to more smaller parts and dynamically load it when is needed. This approach dramatically improve user experience. You should consider to change architecture of your webpages.

    But I think you have somewhere bottleneck. You need investigate where is.
    - At first step you need to determine load times of each files at your browser (debug -> network). This could give you a clue.
    - As second thing you need to determine whether that poor performance is not due to not proper (slow) serving of event handlers (SimpleLinkNetAppRequestEventHandler, SimpleLinkHttpServerEventHandler). For this purpose you can use simple UART prints at asynchronous handlers to determine time behaviour.

    Jan
  • Hi Jan

    Thank you for your reply,

                 Now i am  simply developed wifi configuration page . timing being i am not handle  SimpleLinkNetAppRequestEventHandler.

                 directly using token name for configure wifi.

                 Now i am planning to remove big files.

                I having few doubt  please clarify.

                   1) What is the maximum file size in uniflash (mcu.bin, cert, www) ?

                   2) that is possible to upload certificates in webpage ?

                   3) I am using free rtos

                             RAM:

                                 what is the maximum user settable heap size for handing multiple thread  #define configTOTAL_HEAP_SIZE           ( ( size_t ) ( 0xD6D8 ) )) ?

                   4) In web page i used token name but why  SimpleLinkHttpServerEventHandler not called ?

  • Hi Jan

    Another issue

      Previously dumped but now error on same file why ?

          

         Compare to OOB uniflash example this small size why i getting error on dumping ?

    Thank you

  • Hi Vasu,

    - Maximum size of the single file in filesystem is unlimited, but it need to fit into sFlash. sFlash also contains many other files including ServicePack and system files. Available free space in flash is lower in case of restore to factory feature is enabled (see chapter 7.15 in SWRU455).
    - similar web pages cannot have more than 10kB including CSS. You have 500kB, that is really overkill.
    - yes, you can upload certificate from webpages. You need implement this by yourself using SL_NETAPP_REQUEST_HTTP_POST (see chapter 8.7.3 in SWRU455).
    - RAM and heap size depends on you application. In case you have free RAM you can use it increase size of heap section
    - Handler SimpleLinkHttpServerEventHandler is called for host/user tokens. In case you use predefined/device, this handler is not called and token is served by NWP itself without host interaction.

    Jan
  • Hi  Jan

     Thank you for your reply,

            -  I try to reduce file size.

            -  web page can i use at max 200 to 300KB because 10KB is not sufficient  some configuration is there in web page ?

            - I see how to achieve  upload  certificate.

           - RAM

             

                 How much maximum can i increase heap size ? 

        - I am using user/ token only (ex : __SL_P_P.A) but this callback function not called (SimpleLinkHttpServerEventHandler) ?

    Thank you

      Vasu

  • Hi Vasu,

    - Yes, you can use 200k or 300k webpages, but smaller are better. I was only surprised that that simple webpage have 500kB with styles because this is big wasting of the resources.
    - You have 180kB of free RAM. This free memory can be used to extend heap section.
    - Token __SL_P_P.A is not user token. This is a device token and from this reason is event SimpleLinkHttpServerEventHandler not called.

    Jan
  • Hi Jan,

      Sorry for delayed response,

         Thank you Jan helping to solve this issue.

         - last doubt generating image using uniflash image size version to version change (or) every uniflash version generating same image size ?

         - Now i understood what is the user token (CC3100/CC3200 SimpleLink Wi-Fi Internet-on-a-Chip User's Guide) this guide have brief explanation about user token.

    Thank you 

      Vasu

  • Hi Jan,

    Sorry for delayed response,

    Thank you Jan helping to solve this issue.

    - last doubt generating image using uniflash image size version to version change (or) every uniflash version generating same image size ?

    - Now i understood what is the user token (CC3100/CC3200 SimpleLink Wi-Fi Internet-on-a-Chip User's Guide) this guide have brief explanation about user token.

    Thank you

    Vasu
  • Hi Vasu,

    I am not sure is all versions of Uniflash produce same size of image from same files. But I suppose that size of image will be almost same and maybe even same.

    Jan