How to change mbedJS top page

Step

 

1.Open fsdata.h file in mbedJS project.

#include "mimic.h"

struct NyLPC_TRomFileData RMCU_FSDATA[18]=
{
    :
    :
    {
        "index.html",
        2642,
        "text/html",
        "\x3C\x21\x44\x4F\x43...
    },
    :

2.Edit the RMCU_FSDATA struct  as follows.

#include "mimic.h"

struct NyLPC_TRomFileData RMCU_FSDATA[18]=
{
    :
    :
    {
        "index.html",
        39,
        "text/html",
        "<html><body>Hello mbedJS!</body></html>"
    },
    :

Changes are SIZE and TEXT fields.

3.Compile project and flash to mbed.

 

 

Add file or remove.

  • Binary file must be hex encoded.
  • If you want to add file or remove. Must be set  array size and size of ‘this-> modromfs.setParam of the array (“rom”, RMCU_FSDATA, 18)’ at main.cpp to the same vale.