SPIFFS does not really have a concept of folders, its just file names. However it only lists files and subfolders you have in a certain "directory". (if you do "SPIFFS.open("/path")" for instance everything below is listed). If you open it with "/" you will always get all files in your spiflash. Be aware that does not do long paths either. There is a 32 character limit for file names including paths. The packing tool will return a rather descriptive "unknown error" if you try to exceed this.
One possible enhancement would be for the ESP to fetch the file from a HTTP/HTTPS site and write that to the SD cards -- you'd need to fetch and write in chunks but it would make it a bit more versatile.
I think you are supposed to transfer 512 bytes at a time when using an SD card or it will take ages. You see flash memory writes in blocks and the blocks need to be aligned as well or you will be copying the end of one and the beginning of the next on each read/write cycle.
Very cool! Electronic manufacturers love to talk about “gang programming” when they put a gang of programmers to programming chips. Gang programming to SD-cards is less usual :)
Hey Kevin, Is it possible to write to two Sd cards at the same time. I was just curious. Sense My skills are in hardware And barely software for arduino I was wondering If this is possible?
Since you're using an ESP32, I wonder if you could set it up to pull files from an FTP server. It might be too slow to use for bigger files but you wouldn't need to store them on the ESP32 or update multiple writer boards if you need to update or change a file
SPI is relatively slow compared with SDIO on SD cards. FTP network access may not be so much of an issue. for cloning large amounts of data SDIO may be better on a different platform.
Hello, very good video, I'm trying to do something like what you did but in reverse, look, I have a program that runs on an esp32 and reads a series of files (Json format) that is in the same memory as the esp32 in a littlefs partition Now, I load that memory from the arduino ide, but I would like to do it from an SD card reader, because if I do an up-dete of that data I would like to take it to the esp32 memory with an sd card, they are file systems large and with many folders, can you recommend a method that can help me?
ha, yea you beat me to it! Fixed last night and came here to let you know, thanks for the catch. for some reason original doc showed pdf, but only on safari, not chrome... oh well
What does it actually DO? I don't get it. It writes 4 small files to SD...for what???? What files? Why 4 ? What's in them? Its about as much use as a chocolate fire guard. I just don't see any point to this at all...what have you omitted from your description? What have you forgotten to tell us?
1:51 he’s writing esp32 boot applications/firmware from esp32. It saves him a lot of time and is a lot more fun/interesting than doing it from an OS; he gets multiple writers as he has several cards and a binary pass/fail LED.
@@randomgeocacher there is NOTHING about this that is going to save time over simpler tried and trusted methods. This is a complex piece of pointless nonsense with no obvious use case...Google "OTA". I can do what he thinks he is trying to do in maybe 3 different ways. All of them about 10x faster, none require additional specialist hardware, so remind me again what he's doing? Clue: wasting his and everyone else's time. Powdered water: just add water.
@@philbowles3240 why are you so negative? Have you ever heard of having _fun_ while making projects? It doesn't always have to make "economical sense".... Don't be rude.
@@philbowles3240 He already has the cards and obviously is familiar with the programming environment. If you don’t want to do this, just don’t. It was provided for free and fun.
SPIFFS does not really have a concept of folders, its just file names. However it only lists files and subfolders you have in a certain "directory". (if you do "SPIFFS.open("/path")" for instance everything below is listed). If you open it with "/" you will always get all files in your spiflash. Be aware that does not do long paths either. There is a 32 character limit for file names including paths. The packing tool will return a rather descriptive "unknown error" if you try to exceed this.
wow, good info! thanks
One possible enhancement would be for the ESP to fetch the file from a HTTP/HTTPS site and write that to the SD cards -- you'd need to fetch and write in chunks but it would make it a bit more versatile.
The new Raspberry Pi bootloader is pretty cool with how it does something along these lines, streaming OS images to the SD card
This isn't problem with ESP.
I think you are supposed to transfer 512 bytes at a time when using an SD card or it will take ages. You see flash memory writes in blocks and the blocks need to be aligned as well or you will be copying the end of one and the beginning of the next on each read/write cycle.
Missed the preamble: "Hey what's up guys...!" 😊
Video after very long time
Thank you
Good explanation and it is exactly useful thanks 👍🙂
Useful for what?????
great stuff. thanks for taking the time to write this up and film it!
Best regards from Poland 👍.
Very cool! Electronic manufacturers love to talk about “gang programming” when they put a gang of programmers to programming chips. Gang programming to SD-cards is less usual :)
and less fun that gang "banging" !!
Love from Tripura, India
Keep it up, thank you for sharing :)
Hey Kevin, Is it possible to write to two Sd cards at the same time. I was just curious. Sense My skills are in hardware And barely software for arduino I was wondering If this is possible?
Neat trick
Thanks for sharing 🙂
May I know if two esp32 can be connected to one sd card? If so, how to connect it? Please help me know about it.
Is best to use SD_MMC mode, you need one wire less (CS not needed) and 10k pullups, it's also much faster even though it's 1 bit mode.
Since you're using an ESP32, I wonder if you could set it up to pull files from an FTP server. It might be too slow to use for bigger files but you wouldn't need to store them on the ESP32 or update multiple writer boards if you need to update or change a file
yea I was thinking about that too!
SPI is relatively slow compared with SDIO on SD cards. FTP network access may not be so much of an issue. for cloning large amounts of data SDIO may be better on a different platform.
Hello, very good video, I'm trying to do something like what you did but in reverse, look, I have a program that runs on an esp32 and reads a series of files (Json format) that is in the same memory as the esp32 in a littlefs partition Now, I load that memory from the arduino ide, but I would like to do it from an SD card reader, because if I do an up-dete of that data I would like to take it to the esp32 memory with an sd card, they are file systems large and with many folders, can you recommend a method that can help me?
Hello Kevin. I would like to ask if your device can burn the eFuses of the esp32 when someone wants to lock the esp.
Thank you in advance!
not yet, but I love that idea and would love to figure out how to do that with this
where did you get 100 sd cards? pretty sure you got a deal.. mind sharing the plug? ;)
Thanks for the great video!
just on amazon - under $3/pc... could probably find a better deal on one of the Ali sites
never buy SD from ali, never once did I get a card that didn't have some kind of problem
Can you upload files on the new ide v2?
@Kevin Darrah Great idea, thanks for sharing. LINK for schematic is broken, could you update?
Thanks! Seems to be working again now!
ha, yea you beat me to it! Fixed last night and came here to let you know, thanks for the catch. for some reason original doc showed pdf, but only on safari, not chrome... oh well
where did you get sd cards cheap? i can never find...
Amazon actually ~$2/pc
Yes SD card cloning would be a far more useful as SPIFFS are not large enough to hold large files. Or maybe download to card from pc over wifi?
yea, I wonder if can use both VSPI and HSPI at the same time to speed this up...
where did you buy the bulk of sd cards?
actually got them on Amazon
SD cards are not the most reliable information carriers i do not use them.
քʀօʍօֆʍ ?
What does it actually DO? I don't get it. It writes 4 small files to SD...for what???? What files? Why 4 ? What's in them? Its about as much use as a chocolate fire guard. I just don't see any point to this at all...what have you omitted from your description? What have you forgotten to tell us?
1:51 he’s writing esp32 boot applications/firmware from esp32. It saves him a lot of time and is a lot more fun/interesting than doing it from an OS; he gets multiple writers as he has several cards and a binary pass/fail LED.
@@randomgeocacher there is NOTHING about this that is going to save time over simpler tried and trusted methods. This is a complex piece of pointless nonsense with no obvious use case...Google "OTA". I can do what he thinks he is trying to do in maybe 3 different ways. All of them about 10x faster, none require additional specialist hardware, so remind me again what he's doing? Clue: wasting his and everyone else's time. Powdered water: just add water.
@@philbowles3240 why are you so negative? Have you ever heard of having _fun_ while making projects? It doesn't always have to make "economical sense".... Don't be rude.
@@philbowles3240 He already has the cards and obviously is familiar with the programming environment. If you don’t want to do this, just don’t. It was provided for free and fun.
so bitter, wow!