emWeb General Overview of Process to Create Website

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • emWeb General Overview of Process to Create Website

    Hi
    I am new to embedded webserving and would like some tips.
    Is there a good general overview of the process to create a website using emWeb?
    I have a emPower board and am working on changing the demo website to create my own.
    At the moment I am using various parts of embOS/IP User Guide to try to understand how to do it, i.e. "42.2.3 Using the read-only file system".
    It says to make the changes and "recompile your application" but that does almost nothing but give errors.
    I tried to run the m.bat manually but more errors. Bin2C.exe was not in Tool, move it there and seems to generate the .c and .h files.
    Some questions.
    1. Do I need to "compile" the .htm, .css, .gif files with m.bat/cc.bat/Bin2C.exe?
    2. Can I just put the files in a "File System" and use them like a typical website?
    3. What is the better way of 1. & 2. if 2. even works?
    4. I am making these changes in C:\Programming\Segger_emPower\IP\Setup\IP_FS\FS_RO...
    I get compile errors like it is still looking for files that I commented out, see below. Do you know why?
    Thanks
    Pete

    static IP_FS_READ_ONLY_FILE_ENTRY _aFile[] = {
    // path file data file size
    // ------------------- -------------- -------------
    { "/index.htm", index_file, INDEX_SIZE },
    { "/anwebpg.html", awp_file, AWP_SIZE },
    { "/Styles.css", styles_file, STYLES_SIZE },
    { "/Logo_PT.gif", logo_pt_file, LOGO_PT_SIZE },
    { "/Logo_Dyn.gif", logo_dyn_file, LOGO_DYN_SIZE },
    /*
    { "/Error404.htm", error404_file, ERROR404_SIZE },
    { "/favicon.ico", favicon_file, FAVICON_SIZE },
    { "/BGround.png", bground_file, BGROUND_SIZE },
    { "/Styles.css", styles_file, STYLES_SIZE },
    { "/Logo.gif", logo_file, LOGO_SIZE },
    { "/About.htm", about_file, ABOUT_SIZE },
    ...
    */


    4> ../../../IP/Setup/IP_FS/FS_RO/Generated/BTL_Det.c does not exist.
    4> Compiling ‘BTL_Det.c’
    4> "C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.12/gcc/arm-none-eabi/bin/cc1" -fmessage-length=0 -fno-diagnostics-show-caret -mcpu=cortex-m4 -mlittle-endian -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -mthumb -mtp=soft -munaligned-access -nostdinc "-isystemC:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.12/include" "-isystemC:/Users/pbecher/AppData/Local/SEGGER/SEGGER Embedded Studio/v3/packages/include" -IC:/Programming/Segger_emPower/BSP/SEGGER/K66FN2M0_emPower/Setup/ -IC:/Programming/Segger_emPower/BSP/SEGGER/K66FN2M0_emPower/Setup/DeviceSupport -IC:/Programming/Segger_emPower/BSP/SEGGER/K66FN2M0_emPower/Setup/CoreSupport -IC:/Programming/Segger_emPower/SEGGER -IC:/Programming/Segger_emPower/COMPRESS/Inc -IC:/Programming/Segger_emPower/COMPRESS/Config -IC:/Programming/Segger_emPower/CRYPTO/Inc -IC:/Programming/Segger_emPower/CRYPTO/Config -IC:/Programming/Segger_emPower/OS/Inc -IC:/Programming/Segger_emPower/OS/Config -IC:/Programming/Segger_emPower/FS/Config -IC:/Programming/Segger_emPower/FS/Inc -IC:/Programming/Segger_emPower/GUI/Config -IC:/Programming/Segger_emPower/GUI/Setup/K66FN2M0_SEGGER_emPower -IC:/Programming/Segger_emPower/GUI/Inc -IC:/Programming/Segger_emPower/IOT/Config -IC:/Programming/Segger_emPower/IOT/Inc -IC:/Programming/Segger_emPower/IP/Config -IC:/Programming/Segger_emPower/IP/Inc -IC:/Programming/Segger_emPower/IP/Setup/IP_FS/FS_RO/Generated -IC:/Programming/Segger_emPower/IP/Setup/IP_FS/FS_RO/Generated -IC:/Programming/Segger_emPower/MB/Inc -IC:/Programming/Segger_emPower/MB/Config -IC:/Programming/Segger_emPower/USB-D/Config -IC:/Programming/Segger_emPower/USB-D/Inc -IC:/Programming/Segger_emPower/USB-H/Config -IC:/Programming/Segger_emPower/USB-H/Inc -IC:/Programming/Segger_emPower/SECURE/Inc -IC:/Programming/Segger_emPower/SECURE/Config -IC:/Programming/Segger_emPower/SECURE/Keys -IC:/Programming/Segger_emPower/SSH/Inc -IC:/Programming/Segger_emPower/SSH/Config -IC:/Programming/Segger_emPower/SSL/Inc -IC:/Programming/Segger_emPower/SSL/Config -IC:/Programming/Segger_emPower/SSL/Certificates -IC:/Programming/Segger_emPower/Application/GUI/SEGGERDEMO -IC:/Programming/Segger_emPower/Application/GUI/SEGGERDEMO/Src -IC:/Programming/Segger_emPower/Application/GUI/SEGGERDEMO_160x128 -IC:/Programming/Segger_emPower/Application/GUI/SEGGERDEMO_160x128/Src -D__SIZEOF_WCHAR_T=4 -D__ARM_ARCH_7EM__ -D__SES_ARM -D__ARM_ARCH_FPV4_SP_D16__ -D__SES_VERSION=41200 -DDEBUG=1 -DUSE_RTT=1 -DMK66FN2M0xxx18 -D__Kinetis_K60_FAMILY -DARM_MATH_CM4 -DIP_SUPPORT_IPV6=1 -MD C:/Programming/Segger_emPower/BSP/SEGGER/K66FN2M0_emPower/Output/Debug/BTL_Det.d -MQ C:/Programming/Segger_emPower/BSP/SEGGER/K66FN2M0_emPower/Output/Debug/BTL_Det.o -Wall -Wextra -Wstrict-prototypes -quiet -Wall -Wextra -Wunused-variable -Wmaybe-uninitialized -Wmissing-field-initializers -Wundef -ffunction-sections -fdata-sections -Wmissing-prototypes -std=gnu99 -g3 -gpubnames -fomit-frame-pointer -fno-dwarf2-cfi-asm -fno-builtin -ffunction-sections -fdata-sections -fshort-enums -fno-common C:\Programming\Segger_emPower\IP\Setup\IP_FS\FS_RO\Generated\BTL_Det.c -o C:/Programming/Segger_emPower/BSP/SEGGER/K66FN2M0_emPower/Output/Debug/BTL_Det.asm
    1> cc1: fatal error: C:\Programming\Segger_emPower\IP\Setup\IP_FS\FS_RO\Generated\About.c: No such file or directory
    1> compilation terminated.
    3> cc1: fatal error: C:\Programming\Segger_emPower\IP\Setup\IP_FS\FS_RO\Generated\Authen.c: No such file or directory
    3> compilation terminated.
    2> cc1: fatal error: C:\Programming\Segger_emPower\IP\Setup\IP_FS\FS_RO\Generated\BGround.c: No such file or directory
    2> compilation terminated.
    4> cc1: fatal error: C:\Programming\Segger_emPower\IP\Setup\IP_FS\FS_RO\Generated\BTL_Det.c: No such file or directory
    4> compilation terminated.
    Build failed
  • Hi

    I am working through my lack of knowledge.
    I got my website to compile and it is running.

    I would still like to know about 1, 2, & 3 if someone can give me some information on this.

    dynapb wrote:

    Some questions.
    1. Do I need to "compile" the .htm, .css, .gif files with m.bat/cc.bat/Bin2C.exe?
    2. Can I just put the files in a "File System" and use them like a typical website?
    3. What is the better way of 1. & 2. if 2. even works?

    Thanks
    Pete
  • Hello Pete,

    Sorry about the late reply.

    dynapb wrote:

    1. Do I need to "compile" the .htm, .css, .gif files with m.bat/cc.bat/Bin2C.exe?
    Only if you want to use the ReadOnly filesystem by placing your files in your flash.

    dynapb wrote:

    2. Can I just put the files in a "File System" and use them like a typical website?
    Using a real filesystem is possible as well and in this case you can simply place your files onto your FS media.
    The emWeb shipment comes with FS glue layers for Windows, Linux and our own filesystem emFile.

    dynapb wrote:

    3. What is the better way of 1. & 2. if 2. even works?
    That highly depends on your application.

    If you have a really slow FS media placing the pages in your flash might give you a performance boost already.
    Of course this means you have to dedicate some space in your flash for the pages.

    Do you intend to often update the pages or will there be a case where you need to reformat your FS media ?
    Often or updating the pages at all will typically be easier if they are on a separate media. However if there is a chance of someone formatting
    the media or deleting everything on it (maybe by excuse), you will need to provide a way to recover the pages for the end user.

    If you want to bundle your pages with the firmware and you can afford the flash I would say to go with the ReadOnly FS as it makes sure
    your pages and the CGI callbacks will stay together. If your pages exceed what you can afford in flash go for an external FS but find a way
    to make sure that things like pages and CGI callbacks for dynamic content do not get incompatible.

    Best regards,
    Oliver
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.