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.

TM4C129XKCZAD: Serial to Ethernet Adapter (SPMA072) webserver

Part Number: TM4C129XKCZAD

Dear TI support,

I have the TM4C129x development board. I downloaded Serial to Ethernet application SPMA072. I have CCS 11.2.0 and was able to compile the project. I am able to check the htm webserver files, however I am having problems recompiling htm files into c files. I think I need to run a batch file but not sure what file. Is there a specific procedure to follow?

Do you have information about this?

Thanks

Felix Valladares

  • Hi Felix

    >> however I am having problems recompiling htm files into c files.

    Could you please check if this E2E discussion is helpful on your question?

     CCS/CCSTUDIO: Code Composer Studio generate files as pre build step 

    Thanks

  • Hi Xiaodong, the link you sent me didn't help. My question is specifically related to the Websever pages in the Serial to Ethernet application. I believe some time ago someone in TI support provided me with a document that explained how to update HTML files and generate the c files. However I cannot find it now.

    Thanks

    Felix  

  • Hi Felix 

    I check with if SDTO (tools) team can support this question or not.

    Thanks

      

  • This does not appear to be a CCS/SDTO specific issue

  • Hi Ki

    Thanks for your reply! I will try to find the approach 

  • To convert your raw .htm or .html web files into static C byte arrays that the lwIP TCP/IP stack can compile, you need to use a command-line tool named makefsdata

    This process does not typically use a separate batch file out-of-the-box. Instead, Code Composer Studio (CCS) relies on an internal Pre-build step within the project options to run this tool automatically every time you build the project.
    Follow this procedure to successfully recompile your HTML files into C files:
    Step 1: Locate the Web Files and Tool
    • HTML Directory: Look inside your enet_s2e project directory. There should be a subfolder named fs containing your original web files (like index.htm, styles.css, or javascript files).
    • The Executable: Inside your TivaWare directory, navigate to ../TivaWare_C_Series-2.x.x/tools/bin/. You will find a command-line application named makefsdata.exe
    Step 2: Configure the Automated Recompilation in CCS
    Rather than manually launching a batch file, configure CCS to handle this automatically:
    1. Open Code Composer Studio and right-click your enet_s2e project in the Project Explorer.
    2. Select Properties.
    3. Expand Build on the left panel and click on the Steps tab.
    4. Locate the Pre-build steps text window.
    5. Paste the following command (adjust paths if your project layout differs, but this is the default standard for TivaWare):"${SW_ROOT}/tools/bin/makefsdata" -i fs -o lwiplib/io_fsdata.h
      Note: If your project structure outputs directly to fsdata.c instead of an included header file, modify the output name to match your specific code, for example: "${SW_ROOT}/tools/bin/makefsdata" -i fs -o fsdata.c.
    Step 3: Execute the Recompilation
    1. Add, modify, or delete your .htm files inside the fs directory.
    2. In CCS, click Project -> Clean... and choose your project. This clears out old artifacts.
    3. Click Build Project.
    4. Monitor the CDT Build Console. You will see the makefsdata tool run right before compilation starts, sweeping the contents of the fs directory and rewriting the C structures.
    Alternative Manual Execution (Command Prompt)
    If you prefer a standalone batch approach, you can create your own .bat file inside the root of your project directory:
    1, Open Notepad, paste the text below, and save it as generate_fs.batbatch@echo off
    echo Generating file system data...
    "C:\ti\TivaWare_C_Series-2.1.4.178\tools\bin\makefsdata.exe" -i fs -o lwiplib/io_fsdata.h
    echo Done!
    pause

    (Ensure you update the C:\ti\... path to match the exact TivaWare version path installed on your local drive).

    2, Double-click your new .bat file to manually regenerate the C representation whenever you modify the web files.

  • Thanks so much Xiaodong for your help. I will give it a try and let you know.

  • Hi Felix

    I closed this thread. if you have more question or support need, please reply this thread and re-open it

    Thanks