Page 1 of 2

Esp32 S2 Mini Wemos v.1 not compile!

Posted: Sat May 24, 2025 5:55 am
by jgu1
Hi team

I have just received my ESP32 S2 mini and will make a test. It look like during compiling FC compile to Hex, but when it have to program the device, I get an error. :roll:

More test. I try on two labtop, I discover that I have to press programming and reset on device several time before the Pc detect the device USB, and I test with 3 different device ( from same seller Ebay ) could it be bad device?
Does anyone here have experience with the S2 model, please.

Br jorgen

Re: Esp32 S2 Mini Wemos v.1 not compile!

Posted: Sat May 24, 2025 6:45 am
by mnfisher
Hi Jorgen,

It actually looks sad though it has compiled and downloaded the code.

Writing at 0x00008000... (100 %)
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.0 seconds (effective 703.0 kbit/s)...
Hash of data verified.

Leaving...
WARNING: ESP32-S2FNR2 (revision v0.0) chip was placed into download mode using GPIO0.
esptool.py can not exit the download mode over USB. To run the app, reset the chip manually.
To suppress this note, set --after option to 'no_reset'.
CMake Error at run_serial_tool.cmake:66 (message):

Re: Esp32 S2 Mini Wemos v.1 not compile!

Posted: Sat May 24, 2025 6:47 am
by mnfisher
Does the program run if you press reset after this?

If it does - add --after no_reset to the batch file..

Martin

Re: Esp32 S2 Mini Wemos v.1 not compile!

Posted: Sat May 24, 2025 7:00 am
by jgu1
Morning Martin!

Thank´s. I just receive the device an would make a quick test. I will try to make a test with an one sec output. Later today and check the device.

By pressing the reset, I disconnect the USB.

If the device is programmed I just wonder I get the message:

Running ninja in directory C:\FC_ESP\mtxesp32_s2_sdkconfig\build
Executing "ninja flash"...
Programming Failed.

C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\ESP\Batch\esp32_prog.bat reported error code 0x1

Autoclose turned off

Do you have a S2 mini device?

Jorgen

Re: Esp32 S2 Mini Wemos v.1 not compile!

Posted: Sat May 24, 2025 7:06 am
by mnfisher
I may have one - if I can find it....

One suggestion - always run compile twice initially - get a much more concise output second time around.....

It might allso be worth trying an upload from the command line (idf.py -p COMn -b 921600 flash) then you can tweak the parameters more easily than editing the batch file.

Martin

Re: Esp32 S2 Mini Wemos v.1 not compile!

Posted: Sat May 24, 2025 7:34 am
by jgu1
Just made a testprogam, could´t wait, togling two output with one sec. delay, work perfect in real world on the device after programming, so the device is programmed ;)

Strange with this message at the end of the programming when succesfully programming?

Thank´s Martin, have a nice weekend :)

Jorgen

Re: Esp32 S2 Mini Wemos v.1 not compile!

Posted: Sat May 24, 2025 8:56 am
by mnfisher
Good it's working :-)

The problem is the program trying (and failing) to reset the MCU - which the batch file treats as an error. I wonder if the batch file returns a different error code?

Try the 'no_reset" option....

Martin

Re: Esp32 S2 Mini Wemos v.1 not compile!

Posted: Mon May 26, 2025 5:12 am
by jgu1
Hi Martin!

Please, how do I do this: Try the 'no_reset" option....

And no, I have to press the reset on the device.

Br Jorgen

Re: Esp32 S2 Mini Wemos v.1 not compile!

Posted: Mon May 26, 2025 9:18 am
by mnfisher
There is an easier and a harder way.

Easy way first:

Either test from the command line or edit C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\ESP\Batch\esp32_prog.bat
and where it has idf.py %n %n flash - add --after no_reset (or change the current - sorry not at a computer)

The harder way:

Add a check to the batch file of the target device and add no_reset if it's an s2 device.

First though:

I'd try command line - just to check it works! (run tools_dir\export .bat (get the tools_dir from build->customise->locations) and then cd to the program directory.
idf.py -p COMn -b 921600 flash --after no_reset

Where COMn is the comport the device is connected to (for example COM6). If 921600 baud doesn't work - try 115200...

Martin

Re: Esp32 S2 Mini Wemos v.1 not compile!

Posted: Mon May 26, 2025 7:10 pm
by jgu1
Thank you Martin, but I think I let it be, dare not to edit in these file and now I know there no problem is, it´s ok.
It´s ok to press reset after programming and then "run" mode.

Br Jorgen