cancel
Showing results for 
Search instead for 
Did you mean: 

Web server stm3220g-eval, webpage compile?

sonhai26988
Associate II
Posted on June 13, 2012 at 11:50

Hi everyone.

I used the demo project web server of ST, my board is 3220g-eval.

And as I know, the webpage content is built by fsdata.c file.

I want to ask how to convert or compile the webpage content to this file?

I think need the soft to do it?

Could you give me some idea?

Thanks and Best regards.

#lmgtfy #web-server
7 REPLIES 7
domen23
Associate II
Posted on June 13, 2012 at 16:08

With gnu tools you could do something like:

arm-none-eabi-objcopy -B arm -I binary -O elf32-littlearm webpage.html webpage.o 

and then link with the .o file, and use the simbols ''nm'' utility lists.
Posted on June 13, 2012 at 17:19

Wouldn't you use the makefsdata perl script?

http://www.microbuilder.eu/projects/LPC2148ReferenceDesign/uIPWebserverFiles.aspx

Or makefsdata.exe

STM32F2x7_ETH_LwIP_V1.1.0\Utilities\Third_Party\PC_Software\makefsdata.exe

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sonhai26988
Associate II
Posted on June 14, 2012 at 05:36

Thanks clive1 and Domen Puncer for your reply.

I want to use makefsdata.exe. I follow and see your path:

STM32F2x7_ETH_LwIP_V1.1.0\Utilities\Third_Party\PC_Software\makefsdata.exe

But I don't know how to use it? When I double click makefsdata.exe, I can control it.

I guest I must have the folder to store webpage content, and maybe use ''cmd'' to call ''makefsdata.exe'' but I don't know exactly command?

Can you give me the instruction?

Thanks and Best regards.

Posted on June 14, 2012 at 07:08

I believe it is a command line tool, which you run against an ''fs'' sub directory you wish to convert

http://sw.lpcware.com/?p=lwip_lpc.git&a=blob&h=cd76acbc0675fa8611eceee2a1e6d8c2cb31a524&hb=ea1d1b9f918b397782aa1e54059d2cd7406c01fd&f=contrib-1.4.0/apps/httpserver_raw/makefsdata/makefsdata.c

makefsdata - HTML to C source converter
by Jim Pettinato - circa 2003
extended by Simon Goldschmidt - 2009
Failed to open directory ''fs''.
Usage: htmlgen [targetdir] [-s] [-i] [-f:<
filename
>]
targetdir: relative or absolute path to files to convert
switch -s: toggle processing of subdirectories (default is on)
switch -e: exclude HTTP header from file (header is created at runtime, default is off)
switch -11: include HTTP 1.1 header (1.0 is default)
switch -c: precalculate checksums for all pages (default is off)
switch -f: target filename (default is ''fsdata.c'')
if targetdir not specified, htmlgen will attempt to
process files in subdirectory 'fs'

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sonhai26988
Associate II
Posted on June 15, 2012 at 04:39

Dear clive1.

Base on your instruction, I can build fsdata.c now, ^^.

First: we need a folder with name ''fs'' store webpage content.

Second: make sure ''fs'' folder and ''makefsdata.exe'' in the same folder.

Double click ''makefsdata.exe'' you will see the the fsdata.c be created.

Thanks and Best regards.

KernelSistemi
Associate II
Posted on July 08, 2015 at 12:10

Hi, 

I have a questions on this topic :

Is there a way to update html files ''on the go'' ?

Thanks a lot

Luca

Posted on July 08, 2015 at 14:43

I have a questions on this topic : Is there a way to update html files ''on the go'' ?

Well you'd probably want to implement a different/alternate file system. I made a version using FatFs off a MicroSD card
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..