[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-chat] Need a make guru; embedding web pages
From: |
Rick Mann |
Subject: |
[avr-chat] Need a make guru; embedding web pages |
Date: |
Tue, 30 Aug 2011 11:38:23 -0700 |
I realize this isn't strictly AVR-related, but I am using AVRs in my projects,
and the info might be useful to the list.
I'm working on an internet-enabled embedded project that is configurable via
internal web server. I build the web pages directly into the application binary
and then read them out at the appropriate address. This part is working well
enough (on ARM, actually, but I need to do it on an AVR soon).
I use objcopy to convert the .html, .png, and .css files to .o that then get
linked into the resulting image. I then try to generate a web.h file that
creates lines like
extern const char index_html[];
extern const char index_html_end[];
extern const char error_html[];
extern const char error_html_end[];
extern const char main_css[];
extern const char main_css_end[];
WebFileTOC sWebTOC = {
{ "index.html", index_html, index_html_end },
{ "error.html", error_html, error_html_end },
{ "main.css", main_css, main_css_end },
};
This lets my web server code get at the content (I realize on AVR I'd have to
the pgm-space access stuff; that's not the issue).
I'm having trouble getting the rules to properly make things in order, and
generate the header file, and then analyze the dependencies and build all the
files that depend on the web.h.
If there's anyone out there who's pretty make-savvy, I'd like to share my
Makefile with you and see if we can't improve on it.
Thanks!
--
Rick
- [avr-chat] Need a make guru; embedding web pages,
Rick Mann <=