Search found 3 matches

by heiseiggg
Thu Nov 12, 2020 6:40 am
Forum: General Discussion and Questions
Topic: How to read a file using C language
Replies: 6
Views: 4187

Re: How to read a file using C language

What if I want to modify the file from flash with C? Which file could be useful for me? Exactly the same -- mp_stream_rw Hi Jimmo, I've got another problem. When I call mp_reader_new_file function, it works well. But if I directly call mp_vfs_open, the "NLR jump failed error" occurs. Could you plea...
by heiseiggg
Wed Nov 11, 2020 3:13 am
Forum: General Discussion and Questions
Topic: How to read a file using C language
Replies: 6
Views: 4187

Re: How to read a file using C language

I'm currently using MicroPython to develop esp32 board. Now I need to read a file in flash in main.c. How could I do this? Could anybody show me an example? Thanks You can use mp_vfs_open (see extmod/vfs.h) to open the file which will return a stream object, that you can use mp_stream_rw (or mp_str...
by heiseiggg
Tue Nov 10, 2020 11:21 am
Forum: General Discussion and Questions
Topic: How to read a file using C language
Replies: 6
Views: 4187

How to read a file using C language

I'm currently using MicroPython to develop esp32 board. Now I need to read a file in flash in main.c. How could I do this? Could anybody show me an example? Thanks