2022-05-26 01:46 AM
I need to use SD Card in my project because of my mcu has not enough memory space. I need 200MB free space so i want to use SD Card. My html,css, js files are big size. When I convert my html,css,js files to C file (fsdata.c), that file be more than 150-200MB. My MCU memory just 1MB. How can i do it? I looked FATFS-LWIP application in st code but it didnt help to me. It is basic example (i can not do anything with html,css,js file in this example). Please if you have any idea or advice, help to me :)
2022-05-26 03:59 AM
Surely, an HTTPD server neither knows nor cares where its data comes from;
Similarly, reading from an SD card doesn't depend on where the data is going to be used.
How far have you got with this project so far?
Are you able to just serve a fixed, static web page - without any SD card?
Are you able to just read an SD card - without any networking or webserver?
2022-05-26 04:12 AM
I can build httpd server project without SD Card. It is working now. But i need good graphic design so i need to use more space.
Also I can read data basically in sd card. But how can i do it for html css js i dont know.
2022-05-26 04:45 AM
HTML, CSS, and JS are just (text) files as far as the SD Card is concerned - you read them exactly the same as any other (text) file.
2022-05-26 04:53 AM
If I can read the fsdata.c file (which converted html, css, js files) on the sd card, the problem will be solved. But the content of the C file consists of binary codes.
2022-05-26 05:02 AM
No:
The fsdata.c file is a C source file to be compiled into your application.
If you want to load the files dynamically at run time, you will need to read the HTML, CSS, and JS files from the SD Card.
2022-05-26 07:46 AM
how its possible to showing design in screen with read c file?
2022-05-26 08:45 AM
sorry, I don't get what you're asking there.