[New to ESP32] - Transfer .bin file to ESP32 and pass it out through SPI port?

Martin1454
Posts: 13
Joined: Wed Oct 04, 2017 6:28 am

[New to ESP32] - Transfer .bin file to ESP32 and pass it out through SPI port?

Postby Martin1454 » Wed Oct 04, 2017 6:50 am

Greetings everybody -
My name is Martin, and I am currently an student, who is starting up a new project.
I will probably be asking a few questions over the next few months on this forum.

short about the project:
The project will be a autonome drone/quadcopter, that will be using an ESP32 toghter with an lattice FPGA to fly.


So my first question is about getting it setup. - Im looking into the possibility to use the ESP32 to write the SPI flash to the FPGA (Will be using an SPI flash memory).

For writing the file to the SPI flash, I will need to be able to "uploade" the binary file to the ESP32 and then have it to program it over the SPI interface. - The questions:

Using the normal ESP-IDF tool chain, what are my options to transfer the binary file to the ESP32's flash memory, without hardcoding the binary file into the project file?
- As soon as it is in the flash memory, I guess it is okay easy to have the ESP32 read it and then transfer it over the spi interface.

Anybody have any exeprinse with this? -

User avatar
martinayotte
Posts: 141
Joined: Fri Nov 13, 2015 4:27 pm

Re: [New to ESP32] - Transfer .bin file to ESP32 and pass it out through SPI port?

Postby martinayotte » Wed Oct 04, 2017 2:16 pm

You can upload the FPGA bitstream file into a SPIFFS or FATFS partition, ounce upload finished, you can verify it integrity with MD5 signature, and then proceed to upload into FPGA flash via SPI.

Martin1454
Posts: 13
Joined: Wed Oct 04, 2017 6:28 am

Re: [New to ESP32] - Transfer .bin file to ESP32 and pass it out through SPI port?

Postby Martin1454 » Fri Oct 06, 2017 8:02 am

martinayotte wrote:You can upload the FPGA bitstream file into a SPIFFS or FATFS partition, ounce upload finished, you can verify it integrity with MD5 signature, and then proceed to upload into FPGA flash via SPI.
Sounds good - Have been looking into the SPIFFS - All I can find, is examples where the files stored is in the project folder - Is there any way to add the files after the ESP32 have been flashed? (Over USB UART)

User avatar
martinayotte
Posts: 141
Joined: Fri Nov 13, 2015 4:27 pm

Re: [New to ESP32] - Transfer .bin file to ESP32 and pass it out through SPI port?

Postby martinayotte » Sun Oct 08, 2017 3:06 pm

Plenty of ways to upload files. For example, your ESP32 could have a Web page with "multipart/form-data" and file upload button.

Who is online

Users browsing this forum: cdollar and 96 guests