Fumbling around, used this python3 script in the content directory to generate that pico_fsdata.inc file:now new error EDIT: I don't know python, so I don't know what's going on. But the pico-examples httpd example must grab a script from somewhere, but where?
EDIT: I'm braindead, it's in the SDK: https://github.com/raspberrypi/pico-sdk ... lwip/tools
Now to get my stand-alone project to flippin' use it!
Code:
import osdef generate_fsdata(directory, output_file): with open(output_file, "w") as f: f.write("// Generated file containing HTML data\n\n") for root, dirs, files in os.walk(directory): for file_name in files: file_path = os.path.join(root, file_name) with open(file_path, "r") as file: data = file.read() array_name = file_name.replace(".", "_") f.write(f"const char {array_name}[] = {{\n") for char in data: f.write(f"0x{ord(char):02x}, ") f.write("\n};\n\n")if __name__ == "__main__": generate_fsdata("web", "pico_fsdata.inc")
Code:
/usr/src/pico-sdk/lib/lwip/src/apps/http/fs.c: In function 'fs_open':/usr/src/pico-sdk/lib/lwip/src/apps/http/fs.c:58:12: error: 'FS_ROOT' undeclared (first use in this function) 58 | for (f = FS_ROOT; f != NULL; f = f->next) { | ^~~~~~~/usr/src/pico-sdk/lib/lwip/src/apps/http/fs.c:58:12: note: each undeclared identifier is reported only once for each function it appears inmake[3]: *** [CMakeFiles/test.dir/build.make:1993: CMakeFiles/test.dir/usr/src/pico-sdk/lib/lwip/src/apps/http/fs.c.o] Error 1make[3]: *** Waiting for unfinished jobs....make[2]: *** [CMakeFiles/Makefile2:1840: CMakeFiles/test.dir/all] Error 2make[1]: *** [CMakeFiles/Makefile2:1847: CMakeFiles/test.dir/rule] Error 2make: *** [Makefile:150: test] Error 2
EDIT: I'm braindead, it's in the SDK: https://github.com/raspberrypi/pico-sdk ... lwip/tools
Now to get my stand-alone project to flippin' use it!
Statistics: Posted by breaker — Mon Feb 03, 2025 11:36 pm