[En-Nut-Discussion] HTTPD UROM failures (404)

Coleman Brumley cbrumley at polarsoft.biz
Fri Jan 9 17:03:14 CET 2015


OK, I found the silly solution to this. I did not have #include
<fs/uromfs.h> in my main file. Strangely the code compiled. This line was
removed through some refactoring of the main file. 

 

After adding that line, the following code will enumerate all files in the
UROM filesystem:

 

       ROMENTRY *rome;            

       printf("UROM files...\n");

       for (rome = romEntryList; rome; rome = rome->rome_next) 

              printf("%s\n",rome->rome_name);                        

 

Coleman

 

From: Coleman Brumley [mailto:cbrumley at polarsoft.biz] 
Sent: Friday, January 09, 2015 10:34 AM
To: en-nut-discussion at egnite.de
Subject: HTTPD UROM failures (404)

 

Hello everyone,

 

According to Google and the discussion archive, this issue has popped up
from time to time but I'm unable to find any answers.

 

I'm using Nut/OS 4.8.7. 

 

After some minor code changes to my project, I'm not longer able to read
files from the UROM file system via HTTPD. Every request, including CGI
files return 404. 

 

Via printf debugging, I've traced this to httpd.c (which appears to have
been customized from a version earlier than 4.8.7). Obviously, I don't
expect this group to debug customized code, but I was hoping to get some
pointer on the UROM file system (which is NOT customized in this project). 

 

I'm doing the following for this project, which is heavily based on the
httpd example:

 

>        make clean

>        make all USE_UROM=yes

>        In my startup code, I register the UROM file system via
NutRegisterDevice(&devUrom, 0, 0)

>        My HTTPD thread processes requests via NutHttpProcessRequest

>        NutHttpProcessFileRequest fails when attempting to open the file 

 

Recent modifications to my project provide support for reading and writing
configuration settings from the AT45DB (NOT using a filesystem, so USE_PHAT
et al are not defined, but USE_UROM is). The filenames look like:
<UROM:/index.htm>, <UROM:/favicon.ico>, etc. I've verified that all of these
exist in urom.c. 

 

I don't see how "raw" support of the AT45 chip would cause this. 

 

I've verified that urom.o is listed in the map file, as well as uromfs.o. 

 

My questions are:

 

>        What would cause this to happen? It looks like it's been reported a
few times in this list, but there is no clear answer. This scenario happened
periodically in the released project, but never on this scale. I'd like to
put it to bed once and for all.

>        How do I enumerate all of the files in the UROM file system? Do I
just step through the romEntryList, ala UromOpen?

 

Thanks in advance, 

Coleman



More information about the En-Nut-Discussion mailing list