Search found 3 matches

by mithrandiir42
Wed Dec 21, 2016 3:48 am
Forum: General Discussion
Topic: Store static file in flash
Replies: 24
Views: 52460

Re: Store static file in flash

I figured out my issue. After adding some debug print statements, I found that SPIFFS_read was failing with SPIFFS_ERR_NOT_READABLE and that got me looking at the flags used when opening the file. I was using "r" (read only) initially. I tried "r+" and that worked. That made me realize there was a b...
by mithrandiir42
Tue Dec 20, 2016 5:43 pm
Forum: General Discussion
Topic: Store static file in flash
Replies: 24
Views: 52460

Re: Store static file in flash

Ah that makes sense about the buffer pointers then. Thanks for the suggestion. I'll do that when I get back to my desk. I do know that if I read/write files directly with the SPIFFS api, things work as expected. Things stop working when I go through the VFS functions. So it is likely going to turn o...
by mithrandiir42
Tue Dec 20, 2016 1:17 pm
Forum: General Discussion
Topic: Store static file in flash
Replies: 24
Views: 52460

Re: Store static file in flash

I had a similar issue at first. I had to change the definition of those functions and drop the 'const' in order for it to compile. int esp32_spi_flash_read(unsigned int addr, unsigned int size, unsigned char *dst); int esp32_spi_flash_write(unsigned int addr, unsigned int size, unsigned char *src); ...