Skip to main content
KAnahar
Associate III
May 21, 2022
Question

Is it possible i want to put my .c files to SD Card? I want to read that .c files on SD Card.

  • May 21, 2022
  • 4 replies
  • 1128 views

I am working on httpd server project. My website codes are high memory (200MB). I converted my html/css codes to C file (fsdata.c). My C files now 200MB. I want to use SD Card for reading to C files. How can i do it? My SD Card 2GB.

This topic has been closed for replies.

4 replies

Tesla DeLorean
Guru
May 21, 2022

You'd need to add in SDIO/SDMMC and FATFS code to access the card, and them modify the file system code that deals with the fsdata so it recognizes a path that has files on the card, and then pulls and sends that data.​

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
KAnahar
KAnaharAuthor
Associate III
May 21, 2022

do you have example code?

Tesla DeLorean
Guru
May 22, 2022

I write code for a living...

Suggest you start by porting one of the CubeF7 FATFS+SDMMC examples to your board. Once that works find an appropriate point in the LwIP server code to integrate reading from the the media via the FSDATA structures.

https://community.st.com/s/question/0D53W00001XvqhpSAB/i-am-using-stm32f7-series-i-created-httpd-server-ethernet-project-i-have-web-code-which-htmlcssjs-but-my-microcontrollers-memory-not-enough-for-these-codes-i-need-to-use-sd-card

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Pavel A.
May 22, 2022

You don't want fsdata.c on the card for the web server. You want the binary data.