My working environment is as below.
test board: RCM5700
Dynamic C version: 10.44
test OS: Windows XP
When I made a web program
I defined HTTP_NO_FLASHSPEC like the following program and used sspec_addxmemfile(),
After that I implemented the program , but I couldn’t see any image after b02_03.gif in the web browser.
/***********************************
test_used_HTTP_NO_FLASHSPEC.c
beginning of file
***********************************/
#define TCPCONFIG 1
#define _PRIMARY_STATIC_IP “192.168.10.120”
#define _PRIMARY_NETMASK “255.255.255.0”
#define MY_GATEWAY “192.168.10.1”
#define HTTP_NO_FLASHSPEC
#memmap xmem
#use “dcrtcp.lib”
#use “http.lib”
#ximport “D:/test/web/index.shtml” index_html
#ximport “D:/test/web/rabbit1.gif” logo1_gif
#ximport “D:/test/web/b01_01.gif” b01_01
#ximport “D:/test/web/b01_02.gif” b01_02
#ximport “D:/test/web/b01_03.gif” b01_03
#ximport “D:/test/web/b01_04.gif” b01_04
#ximport “D:/test/web/b02_01.gif” b02_01
#ximport “D:/test/web/b02_02.gif” b02_02
#ximport “D:/test/web/b02_03.gif” b02_03
#ximport “D:/test/web/b02_04.gif” b02_04
#ximport “D:/test/web/b03_01.gif” b03_01
#ximport “D:/test/web/b03_02.gif” b03_02
#ximport “D:/test/web/b03_03.gif” b03_03
#ximport “D:/test/web/b03_04.gif” b03_04
#ximport “D:/test/web/b04_01.gif” b04_01
#ximport “D:/test/web/b04_02.gif” b04_02
#ximport “D:/test/web/b04_03.gif” b04_03
#ximport “D:/test/web/b04_04.gif” b04_04
SSPEC_MIMETABLE_START
SSPEC_MIME_FUNC(“.shtml”, “text/html”, shtml_handler),
SSPEC_MIME(“.html”, “text/html”),
SSPEC_MIME(“.gif”, “image/gif”),
SSPEC_MIME(“.cgi”, “”)
SSPEC_MIMETABLE_END
void main(void)
{
sock_init_or_exit(1);
http_init();
ifconfig(IF_ETH0, IFG_IPADDR, &ipaddr, IFS_END);
printf("IP Address: %s -- responding to pings
", inet_ntoa(ipaddr_string, ipaddr));
sspec_addxmemfile("/", index_html, SERVER_HTTP);
sspec_addxmemfile("index.html", index_html, SERVER_HTTP);
sspec_addxmemfile("rabbit1.gif", logo1_gif, SERVER_HTTP);
sspec_addxmemfile("b01_01.gif", b01_01, SERVER_HTTP);
sspec_addxmemfile("b01_02.gif", b01_02, SERVER_HTTP);
sspec_addxmemfile("b01_03.gif", b01_03, SERVER_HTTP);
sspec_addxmemfile("b01_04.gif", b01_04, SERVER_HTTP);
sspec_addxmemfile("b02_01.gif", b02_01, SERVER_HTTP);
sspec_addxmemfile("b02_02.gif", b02_02, SERVER_HTTP);
sspec_addxmemfile("b02_03.gif", b02_03, SERVER_HTTP);
sspec_addxmemfile("b02_04.gif", b02_04, SERVER_HTTP);
sspec_addxmemfile("b03_01.gif", b03_01, SERVER_HTTP);
sspec_addxmemfile("b03_02.gif", b03_02, SERVER_HTTP);
sspec_addxmemfile("b03_03.gif", b03_03, SERVER_HTTP);
sspec_addxmemfile("b03_04.gif", b03_04, SERVER_HTTP);
sspec_addxmemfile("b04_01.gif", b04_01, SERVER_HTTP);
sspec_addxmemfile("b04_02.gif", b04_02, SERVER_HTTP);
sspec_addxmemfile("b04_03.gif", b04_03, SERVER_HTTP);
sspec_addxmemfile("b04_04.gif", b04_04, SERVER_HTTP);
tcp_reserveport(80);
while (1) {
http_handler();
tcp_tick(NULL);
}
}
/***********************************
test_used_HTTP_NO_FLASHSPEC.c
end of file
***********************************/
/***********************************
the part that shows the image of
index.shtml
***********************************/
…
…
…
…
/***********************************
index.shtml
end of file
***********************************/
But when I define like below not define HTTP_NO_FLASHSPEC, All the images are shown properly.
SSPEC_RESOURCETABLE_START
SSPEC_RESOURCE_XMEMFILE(“/”, index_html),
SSPEC_RESOURCE_XMEMFILE(“/index.shtml”, index_html),
SSPEC_RESOURCE_XMEMFILE(“/rabbit1.gif”, logo1_gif),
SSPEC_RESOURCE_XMEMFILE(“/b01_01.gif”, b01_01),
SSPEC_RESOURCE_XMEMFILE(“/b01_02.gif”, b01_02),
…
…
…
SSPEC_RESOURCETABLE_END
Pls let me know what I should do to show the images properly in web browser with sspec_addxmemfile().