Go Down

Topic: include .c file (using "extern unsigned int file") from SD card (Read 1 time) previous topic - next topic

sonic656

Is it possible to include .c file to project by reading it from SD card module?

PS: I'm trying to display 320x240 image on 320x240 TFT display module by using UTFT library. But the image file converted to .c using ImageConverter 565 is too large. It has 153 600 bytes and ATMega can only hold 126 976 bytes. That's why I'm asking if I can do this :). In the first picture you can see my code and how I mean "to include".

Picture 1:

PaulS

Quote
Is it possible to include .c file to project by reading it from SD card module?

No. The compiler runs on the PC before the hex file is uploaded to the Arduino. The hex file knows nothing about where the bits came from.

The art of getting good answers lies in asking good questions.

johnwasser

You can store the image as a bitmap on an SD card but you will then have to write a loop to read the image in a small piece (512 bytes?) at a time an draw each piece to your screen.  I'm sure someone has done this before.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

Go Up