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.

RTOS: efs_createfile() function in Simplelink

Tool/software: TI-RTOS

Hello,

With TM4C I am using 

efs_createfile()

function to provide static resources for my webserver. Such as CSS, or JS files. What is the alternative in MSP432E Simplelink environment?

Or any examples that using the output of binsrc.exe tool?

Thank you for your reply,

  • Hello Daniel,

    The EFS (embedded FileSystem) is still part of NDK in SimpleLink MSP432E4 SDK and the HTTP Server inside NDK (./source/ti/ndk/nettools/) uses it.

    We recommend using the HTTP Server inside Network Services (./source/ti/net/), but it does not have the "file system" feature implemented.

    Until we implement the "file system" feature with the HTTP Server inside Network Services, you can use the HTTP Server inside NDK.

    Thanks,

    Sai

  • Thank you very much for your reply. Can you tell me the ETA of the release that invoves this feature?

  • Hi Daniel,

    We don't have a schedule yet. So the only thing I really could say is that it will not be in 2019. Afterwards....it depends on demand (your request has been noted).

    Todd

  • Hello,

    I have some questions about your post:

    If I understand correctly I should ignore SimpleLink (SL) http server and I sould use the traditional HTTP server shipped with NDK when I want the server static files for http server? That is wierd for me, becuse (SL) http server is good for providing REST interface. 

    Can you please help me to understand?

  • Hi Daniel,

    I know it's not ideal. You basically have to decide what's more important: easier file system -> use NDK's HTTP, better support for other things -> SL HTTP Server. 

    Todd

  • Hello Tod,

    Thank you for your reply. The process I did is the following:

    1. using binsrc.exe the xyz.h file is created
    2. #import "xyz.h" into code
    3. using the SL HTTP Server UriHandler structrue, in the process fx I put the following line:
    4. HTTPServer_sendSimpleResponse(ssock, returnCode, contentType, index_SIZE, index);
    5. updated the content type to "text/html" 

    It works like charm! What do you think?

  • Well, this solution has a drawback.  

    Here is my urlHandler

    int urlHandler_static(URLHandler_Handle h, int m, const char * u, const char * uArgs, int l, int s){
    
        if (!strcmp(u, "/index.html")){
            HTTPServer_sendSimpleResponse(s, HTTP_SC_OK, "text/html", index_SIZE, index);
            return URLHandler_EHANDLED;
    
        } else if(!strcmp(u, "/css/admin_materialize_min.css")){
            HTTPServer_sendSimpleResponse(s, HTTP_SC_OK, "text/html", admin_materialize_min_SIZE, admin_materialize_min);
            return URLHandler_EHANDLED;
    
        } else if(!strcmp(u, "/css/icons.txt")){
            HTTPServer_sendSimpleResponse(s, HTTP_SC_OK, "text/html", icons_SIZE, icons);
            return URLHandler_EHANDLED;
    
        } else if(!strcmp(u, "/css/style.css")){
            HTTPServer_sendSimpleResponse(s, HTTP_SC_OK, "text/html", style_SIZE, style);
            return URLHandler_EHANDLED;
    
        }
    

    where I am trying to add all of the resources that I used in TM4C with efr_createfile function. The compiler says:

    Description	Resource	Path	Location	Type
    <a href="processors.wiki.ti.com/.../10099">  program will not fit into available memory.  placement with alignment fails for section ".text" size 0x55db9 .  Available memory ranges:	MSP_EXP432E401Y_TIRTOS.cmd	/FLOW_2.0	line 50	C/C++ Problem
    

    Do you have any idea how can I put these resouces into the flash?

  • Well, I can see the reason. 

    The embedTls and other SL tools requires some additional space. I think I need to rethink the tools that I want to use on the target. If you have any advice, let me know.

  • Hello Daniel,

    • You could also try to reduce the size of your HTTP Server files.
    • If you don't need secure sockets then try removing it.
    • If you need secure sockets, then the size of mbedTLS can be reduced by removing the features that you don't need in the file "./source/third_party/mbedtls/include/mbedtls/config.h". You will have to rebuild mbedTLS by running the makefile in the folder "./source/third_party/mbedtls/ti/lib/ccs/m4f/"

    Thanks,

    Sai

  • Hi TI-Software Developers,

    I just want to mention, that we are also interested in support of the file system.

  • Hi Sven,

    Noted! I let the development manager know about the additional interest in this feature.

    Todd

**Attention** This is a public forum