ESP32-PRO with arduino: which board / other configuration?

Started by valhalla, September 11, 2023, 05:51:01 PM

Previous topic - Next topic

valhalla

I'm trying to program the ESP32 on the ESP32-PRO (rev B1) with the arduino IDE; right now I'm trying a simple hello world that writes on the serial port.

I've found https://www.olimex.com/forum/index.php?topic=8479.15 which points to https://imgur.com/a/JDiY55X which suggests using "OLIMEX ESP32-EVB" as the board, with the default partition scheme, however if I use that the sketch gets uploaded, but then either I don't see anything on serial (using minicom or putty) or I see that the board keeps printing an error message and resetting (using the arduino serial monitor):

rst:0xc
(SW_CPU_RESET),boot:0x3b (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1184
load:0x40078000,len:13260
load:0x40080400,len:3028
entry 0x400805e4
E (129) spi_flash: Detected size(64k) smaller than the size in the binary image header(4096k). Probe failed.

Am I using the wrong board / settings? what would be the correct ones to use?

LubOlimex

I tested and I had similar problems with the latest ESP32 package. The temporary workaround I found was to revert to 1.0.1. First try to revert to ESP32 package version 1.0.1.

Remember to send any string to receive output (when you open serial monitor hit an enter or anything in the send field).

Here check the three pictures of software setup that worked:

https://imgur.com/a/d9xLXzP

Technical support and documentation manager at Olimex

valhalla

Thanks, I can confirm that it worked with version 1.0.1 of the Espressif esp32 package.

Then I tried to do a bit of bisecting and found that 2.0.9 is the latest version that is still working, 2.0.11 gives the problems mentioned above, while 2.0.10 fails to build at all with the following error:

Build options changed, rebuilding all
>: -c: line 1: unexpected EOF while looking for matching `''
exit status 2
Error compiling for board OLIMEX ESP32-EVB.

so maybe the regression has been introduced when fixing this?

I'm afraid my skills stop here, but please let me know if I have to do some additional test.

These FTR are the versions I tried:

* 1.0.6 worked
* 2.0.0 worked
* 2.0.12 did not work
* 2.0.6 worked
* 2.0.9 worked
* 2.0.11 did not work
* 2.0.10 did not compile at all

LubOlimex

Thanks for testing I was doing similar tests myself, you saved me some time.

Unfortunately, I don't know if and when I will be able to trace down or fix the issue. For the moment use 2.0.9 package.

Clearly the problem appeared after 2.0.9, but what caused it and who should fix it? We have to track the major changes between 2.0.9 and 2.0.10 and maybe 2.0.11 or 2.0.12 then compare between revisions. Somehow I feel like it might be related to some difference in flash mode writing, because overall the compile and programming succeeds it is the execution that fails, similar to when you use wrong option for SPI flash mode (DIO, DOUT, QIIN, QOUT).

There can be two directions whose responsibility for the regression might be:

1) Problems with the ESP32 package. Which is more likely considering so many versions worked fine before that. If you wish to help further maybe report the issue to the ESP32 for Arduino team and community at GitHub with all debug information you gathered so far.

2) The firmware we load to the PIC32, maybe our code was not good enough. Aka we didn't follow recommendations for timings of DTR, DTS, etc. So it worked previously but after changes were introduced to ESP32 for Arduino that are more strict, our software no longer works. The firmware we load there can be seen here:

https://github.com/OLIMEX/ESP32-PRO/blob/master/SOFTWARE/PIC32_part_Arduino_IDE/PIC32_USB-Serial_Bridge/pic32-usb-serial/pic32-usb-serial.ino

On a side note, the error you encountered with 2.0.10 was clearly a bug that affected all boards:

https://github.com/espressif/arduino-esp32/issues/8430

https://support.arduino.cc/hc/en-us/articles/9682191506204-Errors-when-compiling-for-an-ESP32-board-with-esp32-board-package-2-0-10-on-Windows-or-Linux

Technical support and documentation manager at Olimex