Hello forum: I'm using the easyweb program in may evaluation board MCB167_NET. The problem is that, when I want to do the web page longer than the original one, keil sais taht the string is too long, why???? How can I put all the information that I want in a array webside[]{...}; The array is unsigned char type, I have changed it for an unsigned long but the error persists. Keil sais: string too long(4096:4096). Has anybody a solution for my question. Thank you. Sergio
Hi Sergio, I think I've found a way to splice long strings into a longer one (above 16384 bytes) avoiding complaints from the C166 compiler. It's kinda ugly, but it works:
#define PART1 "This is the first part of the web page\n""Feel free to modify""but don't forget about the 4096 byte limit.\n" #define PART2 "a lot of data...""but less than 4096 bytes" #pragma pack(1) union { struct { char p1[sizeof(PART1)]; char p2[sizeof(PART2)]; } data; char str[1]; } const huge page={PART1,PART2}; extern void serve_page(char huge* str); void main(void) { serve_page(page.str); }
Oops! This HTML thing swallowed my backslash-newline sequences. Oh well...