Store MQX web pages externally

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Store MQX web pages externally

ソリューションへジャンプ
1,406件の閲覧回数
seandema
Contributor IV

I'm working on a project that will be using the web page server feature of MQX RTCS. However the web pages will probably be too large to store using TFS(tiny file system) on the internal flash of the Kinetis K60 I'm using. Is there a way to store web pages externally? Preferably on a flash chip that I can put on my board. I'm not sure how to point the web server to that since all the example I have seen use TFS.

Thanks

ラベル(1)
タグ(1)
0 件の賞賛
1 解決策
511件の閲覧回数
Martin_
NXP Employee
NXP Employee

Hello,

Web pages can be stored on any media accesible via MFS. There exist the following examples:

-web pages stored on USB memory stick (/demo/web_hvac)

-web pages stored on SD card (TWR-K60N512 Quick start)

It is also possible to use FFS and store web pages on NAND flash. HTTPSRV application can access different file systems via aliases. For example your web browser can access web page like:

http://192.168.1.202/usb/index.html

and via HTTPSRV aliases this can be mapped to

a:/index.html

where a:/ is an MFS installed on whatever media (USB mass storage, SD card, ffs+NAND flash, external NOR flash via flashx).

元の投稿で解決策を見る

0 件の賞賛
5 返答(返信)
511件の閲覧回数
seandema
Contributor IV

In case anyone else is looking into the issue. I was able to store webpages externally on a SPI based flash part that was formatted with MFS. Allowing me to access it like any other MFS based drive such as USB flash. I received some driver code called NFTL from my Freescale rep that allowed me to run MFS over the SPI interface. Then I just wrote a little copy function to copy my web pages from a USB drive to the SPI flash and pointed the web server to the SPI flash driver letter (something like c:).

Hope that helps.

0 件の賞賛
511件の閲覧回数
williamely
Contributor IV

Another option that I have used is to gzip the HTML, JS, and CSS files and modify the web server to alert the browser that the files are gziped. This is a common practice for web servers like IIS and Apache. You might find that you don't need external memory at all. I typically see an overall 75% reduction in size. I have made a utility that automates this process but I can't release it to the public however I can tell you to look at the HTTP compression article on Wikipedia and go from there.

Your application my be different than mine but I have made the assumption that my clients are using a browser capable of handling gzip compressed files (any popular browser made in the last decade...) and do not need to negotiate the compression scheme.

I need to update my MQX 4.1 RTCS to handle HTTP compression so maybe I'll post a write-up how to do this if anyone is interested.

0 件の賞賛
512件の閲覧回数
Martin_
NXP Employee
NXP Employee

Hello,

Web pages can be stored on any media accesible via MFS. There exist the following examples:

-web pages stored on USB memory stick (/demo/web_hvac)

-web pages stored on SD card (TWR-K60N512 Quick start)

It is also possible to use FFS and store web pages on NAND flash. HTTPSRV application can access different file systems via aliases. For example your web browser can access web page like:

http://192.168.1.202/usb/index.html

and via HTTPSRV aliases this can be mapped to

a:/index.html

where a:/ is an MFS installed on whatever media (USB mass storage, SD card, ffs+NAND flash, external NOR flash via flashx).

0 件の賞賛
511件の閲覧回数
seandema
Contributor IV

Thank you, that clears up a lot.

Am I correct in understating that flashx is included with MQX but FFS is not? I'd like to try using a flash chip as that seems like the lowest cost option. I believe there are licensing fees when using SD cards and I'm using the USB port for other stuff on this project.

Thanks

0 件の賞賛
511件の閲覧回数
Martin_
NXP Employee
NXP Employee

FFS is a standalone patch for Freescale MQX 4.0.2.2.

Freescale MQX™ Software Solutions Product Summary Page

Supported for TWR-K60F120M, TWR-K70F120M, TWR-MCF54418 and TWR-VF6510 boards.  Please note the FFS wear levelling requires tens of KBytes memory for function.