I want to load a bin file used to store audio data (raw PCM) and be able to program it by partition in a csv file. What declarations do I need in partitions, spiffs or other types? What directories do I need?
I learned it through this video https://www.youtube.com/watch?v=V9-cgXag4Ko
What should I do next?
I want to load a bin file into memory. Is it necessary to declare a partition?
-
- Posts: 50
- Joined: Thu Jun 22, 2023 12:50 pm
Re: I want to load a bin file into memory. Is it necessary to declare a partition?
Hello.
you can use SPIFFS or FATFS or LittleFS filesystem to achieve this. I do not recommend using SPIFFS since it's no longer maintained by its author.
These are our examples which achieve your goal for each filesystem:
https://github.com/espressif/esp-idf/tr ... /spiffsgen
https://github.com/espressif/esp-idf/tr ... e/fatfsgen
https://github.com/espressif/esp-idf/tr ... e/littlefs
In each example project, there is `main/CMakeLists.txt` file calling a function, which generates the filesystem binary from a folder on your computer specified in `main/CMakeLists.txt`. You can put your audio file there and then it will be included in the generated binary and flashed to you ESP device with `idf.py flash` command. You can access this partition and file in your C code.
you can use SPIFFS or FATFS or LittleFS filesystem to achieve this. I do not recommend using SPIFFS since it's no longer maintained by its author.
These are our examples which achieve your goal for each filesystem:
https://github.com/espressif/esp-idf/tr ... /spiffsgen
https://github.com/espressif/esp-idf/tr ... e/fatfsgen
https://github.com/espressif/esp-idf/tr ... e/littlefs
In each example project, there is `main/CMakeLists.txt` file calling a function, which generates the filesystem binary from a folder on your computer specified in `main/CMakeLists.txt`. You can put your audio file there and then it will be included in the generated binary and flashed to you ESP device with `idf.py flash` command. You can access this partition and file in your C code.
Who is online
Users browsing this forum: No registered users and 206 guests