ESP32 Can't compile

For general Flowcode discussion that does not belong in the other sections.
Alan_37
Posts: 118
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 7:23 pm
Has thanked: 34 times
Been thanked: 16 times

ESP32 Can't compile

Post by Alan_37 »

Hi I have this problem when trying to compile toolchains are installed and also esp-idf
this was working some time ago now it's not.

Anyone can help please?


Target folder: C:\Users\alanc\Desktop\ESP32FC
Source name: C:\Users\alanc\Desktop\ESP32FC\Flowcode1.fcfx
Title:
Description:
Device: ESP.ESP32.ESP32_WROVER
Generated by: Flowcode v9.2.0.33
Date: Sunday, October 03, 2021 23:27:09
Users: 1
Registered to: Alan_37 (61413253)
Licence key: KKF1X9
NOT FOR COMMERCIAL USE
https://www.flowcode.co.uk
Using FCD settings for compiler
Launching the compiler...
C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\ESP\Batch\esp32_build.bat "C:\Users\alanc\Desktop\esp-idf\\" "Flowcode1" "C:\Users\alanc\Desktop\ESP32FC\" esp32s_sdkconfig

C:\Users\alanc\Desktop\ESP32FC>REM CRC: 0796FC1E6A776AF9156B257209C35258CE7C28B3EC20AEA2C632DB392A0E4BFD5B3F53B21811978F7B21FE4085045A7E774D1D3D69D8A99EE7320EAE740A5DB6FE0D8D4660AC0314F98C28BCA92AF856EFD1DB5B777140BC4D00059D795899827D9F76D89626FBC8B199900461C78937B42DEF8219F63A24580137A2F6C8FDB7553324EFF791947E8AB6FFD612B81BAA97C798A8F1CFC189DE5D38517747C774AF2DD6F839BAECF83F7F994C7164CE77868F480396BDEF2F2C3050DA273BE4EE6FE0BB589D1229A5E37B217FF86DBD72A01B8FBC49BE02BFA3608A0B0CE69F969622A912E6E6A2FB

C:\Users\alanc\Desktop\ESP32FC>REM REVISION: 4.0

C:\Users\alanc\Desktop\ESP32FC>REM GUID: 955EA920-4961-4C53-BA6B-EF4AF66BB4C2

C:\Users\alanc\Desktop\ESP32FC>REM DATE: 29\03\2021

C:\Users\alanc\Desktop\ESP32FC>REM DIR: FCD\ESP\Batch\esp32_build.bat
Building Flowcode1 ...
Setting IDF_PATH: C:\Users\alanc\Desktop\esp-idf

Adding ESP-IDF tools to PATH...
Traceback (most recent call last):
File "C:\Users\alanc\Desktop\esp-idf\tools\idf_tools.py", line 1387, in <module>
main(sys.argv[1:])
File "C:\Users\alanc\Desktop\esp-idf\tools\idf_tools.py", line 1383, in main
action_func(args)
File "C:\Users\alanc\Desktop\esp-idf\tools\idf_tools.py", line 1008, in action_export
idf_python_env_path, idf_python_export_path, virtualenv_python = get_python_env_path()
File "C:\Users\alanc\Desktop\esp-idf\tools\idf_tools.py", line 847, in get_python_env_path
cwd=global_idf_path, env=os.environ).decode()
File "C:\Program Files\Python37\lib\subprocess.py", line 389, in check_output
**kwargs).stdout
File "C:\Program Files\Python37\lib\subprocess.py", line 466, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Program Files\Python37\lib\subprocess.py", line 769, in __init__
restore_signals, start_new_session)
File "C:\Program Files\Python37\lib\subprocess.py", line 1172, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
'idf.py' is not recognized as an internal or external command,
operable program or batch file.

Build Failed

C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\ESP\Batch\esp32_build.bat reported error code 0x1

Autoclose turned off


FINISHED

LeighM
Valued Contributor
Posts: 394
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 69 times
Been thanked: 208 times

Re: ESP32 Can't compile

Post by LeighM »

Could you try the following ...

Run a Command Prompt
cd to the esp-idf directory, possibly at C:\Users\alanc\Desktop\esp-idf
e.g.

Code: Select all

cd C:\Users\alanc\Desktop\esp-idf
Then type/run

Code: Select all

install.bat esp32

Alan_37
Posts: 118
Joined: Thu Dec 03, 2020 7:23 pm
Has thanked: 34 times
Been thanked: 16 times

Re: ESP32 Can't compile

Post by Alan_37 »

hi LeighM, thanks for your reply, I get this

C:\Users\alanc\Desktop\esp-idf>
C:\Users\alanc\Desktop\esp-idf>
C:\Users\alanc\Desktop\esp-idf>install.bat esp32
Installing ESP-IDF tools
Installing tools: xtensa-esp32-elf, xtensa-esp32s2-elf, esp32ulp-elf, esp32s2ulp-elf, cmake, openocd-esp32, ninja, idf-exe, ccache
Skipping xtensa-esp32-elf@esp-2020r2-8.2.0 (already installed)
Skipping xtensa-esp32s2-elf@esp-2020r2-8.2.0 (already installed)
Skipping esp32ulp-elf@2.28.51-esp-20191205 (already installed)
Skipping esp32s2ulp-elf@2.28.51-esp-20191205 (already installed)
Skipping cmake@3.13.4 (already installed)
Skipping openocd-esp32@v0.10.0-esp32-20191114 (already installed)
Skipping ninja@1.9.0 (already installed)
Skipping idf-exe@1.0.1 (already installed)
Skipping ccache@3.7 (already installed)
Setting up Python environment
Traceback (most recent call last):
File "C:\Users\alanc\Desktop\esp-idf\tools\idf_tools.py", line 1387, in <module>
main(sys.argv[1:])
File "C:\Users\alanc\Desktop\esp-idf\tools\idf_tools.py", line 1383, in main
action_func(args)
File "C:\Users\alanc\Desktop\esp-idf\tools\idf_tools.py", line 1172, in action_install_python_env
idf_python_env_path, _, virtualenv_python = get_python_env_path()
File "C:\Users\alanc\Desktop\esp-idf\tools\idf_tools.py", line 847, in get_python_env_path
cwd=global_idf_path, env=os.environ).decode()
File "C:\Program Files\Python37\lib\subprocess.py", line 389, in check_output
**kwargs).stdout
File "C:\Program Files\Python37\lib\subprocess.py", line 466, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Program Files\Python37\lib\subprocess.py", line 769, in __init__
restore_signals, start_new_session)
File "C:\Program Files\Python37\lib\subprocess.py", line 1172, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

C:\Users\alanc\Desktop\esp-idf

LeighM
Valued Contributor
Posts: 394
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 69 times
Been thanked: 208 times

Re: ESP32 Can't compile

Post by LeighM »

Looks like a Python problem.
Only thing I can suggest is uninstalling Python, then try again.

Alan_37
Posts: 118
Joined: Thu Dec 03, 2020 7:23 pm
Has thanked: 34 times
Been thanked: 16 times

Re: ESP32 Can't compile

Post by Alan_37 »

hi, I have uninstalled everything and reinstalled it again now compiling and downloading ok

but the esp is not booting it is panic and reboot by itself I am using ESP32s any idea what can be causing this.

This is what I get from the serial port from the ESP maybe can help to understand the problem.

Table:[0m
[0;32mI (64) boot: ## Label Usage Type ST Offset Length[0m
[0;32mI (71) boot: 0 nvs WiFi data 01 02 00009000 00006000[0m
[0;32mI (79) boot: 1 phy_init RF data 01 01 0000f000 00001000[0m
[0;32mI (86) boot: 2 factory factory app 00 00 00010000 00100000[0m
[0;32mI (94) boot: End of partition table[0m
[0;32mI (98) boot_comm: chip revision: 1, min. application chip revision: 0[0m
[0;32mI (105) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x06c74 ( 27764) map[0m
[0;32mI (125) esp_image: segment 1: paddr=0x00016c9c vaddr=0x3ffbdb60 size=0x02130 ( 8496) load[0m
[0;32mI (128) esp_image: segment 2: paddr=0x00018dd4 vaddr=0x40080000 size=0x00404 ( 1028) load[0m
[0;32mI (132) esp_image: segment 3: paddr=0x000191e0 vaddr=0x40080404 size=0x06e38 ( 28216) load[0m
[0;32mI (153) esp_image: segment 4: paddr=0x00020020 vaddr=0x400d0020 size=0x17d64 ( 97636) map[0m
[0;32mI (191) esp_image: segment 5: paddr=0x00037d8c vaddr=0x4008723c size=0x03648 ( 13896) load[0m
[0;32mI (203) boot: Loaded app from partition at offset 0x10000[0m
[0;32mI (203) boot: Disabling RNG early entropy source...[0m
[0;32mI (203) cpu_start: Pro cpu up.[0m
[0;32mI (207) cpu_start: Application information:[0m
[0;32mI (212) cpu_start: Project name: esp-project[0m
[0;32mI (217) cpu_start: App version: 1[0m
[0;32mI (222) cpu_start: Compile time: Oct 4 2021 13:58:57[0m
[0;32mI (228) cpu_start: ELF file SHA256: 310f8f7da662ea03...[0m
[0;32mI (234) cpu_start: ESP-IDF: v4.1.2-dirty[0m
[0;32mI (239) cpu_start: Starting app cpu, entry point is 0x40081188[0m
[0;32mI (0) cpu_start: App cpu up.[0m
[0;32mI (250) heap_init: Initializing. RAM available for dynamic allocation:[0m
[0;32mI (256) heap_init: At 3FFAE6E0 len 0000F480 (61 KiB): DRAM[0m
[0;32mI (263) heap_init: At 3FFC04E8 len 0001FB18 (126 KiB): DRAM[0m
[0;32mI (269) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM[0m
[0;32mI (275) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM[0m
[0;32mI (282) heap_init: At 4008A884 len 0001577C (85 KiB): IRAM[0m
[0;32mI (288) cpu_start: Pro cpu start user code[0m
[0;32mI (306) spi_flash: detected chip: generic[0m
[0;32mI (306) spi_flash: flash io: dio[0m
[0;33mW (306) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.[0m
[0;32mI (317) cpu_start: Starting scheduler on PRO CPU.[0m
[0;32mI (0) cpu_start: Starting scheduler on APP CPU.[0m
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x400e765c PS : 0x00060b30 A0 : 0x800d403f A1 : 0x3ffb1f20
A2 : 0x00000008 A3 : 0x00000002 A4 : 0x00000001 A5 : 0x00000000
A6 : 0x3ffb3f58 A7 : 0x00000000 A8 : 0x800e776c A9 : 0x3ffb1ef0
A10 : 0x00000008 A11 : 0x3ffc04a4 A12 : 0x3ffb3ee0 A13 : 0x3ffb1f24
A14 : 0x00000000 A15 : 0x00000b00 SAR : 0x0000001f EXCCAUSE: 0x0000001c
EXCVADDR: 0x800d403f LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff

ELF file SHA256: 310f8f7da662ea03

Backtrace: 0x400e7659:0x3ffb1f20 0x400d403c:0x3ffb1f50 0x400d0f0a:0x3ffb1f70 0x40085175:0x3ffb1f90

Rebooting...

LeighM
Valued Contributor
Posts: 394
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 69 times
Been thanked: 208 times

Re: ESP32 Can't compile

Post by LeighM »

Could you attach your program?
Then we'll see if someone has an ESP32S to try it on.
Did you try a simple LED flash program?

Alan_37
Posts: 118
Joined: Thu Dec 03, 2020 7:23 pm
Has thanked: 34 times
Been thanked: 16 times

Re: ESP32 Can't compile

Post by Alan_37 »

Good morning,

I am just trying to blink an LED for now on pin 11 ( GPIO 35 ) that's all .
Attachments
IMG_1879.jpeg
IMG_1879.jpeg (88.79 KiB) Viewed 4838 times
Flowcode1.fcfx
(6.86 KiB) Downloaded 154 times

LeighM
Valued Contributor
Posts: 394
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 69 times
Been thanked: 208 times

Re: ESP32 Can't compile

Post by LeighM »

I think we've caused some confusion by using the word "pin"
Pin 11 = A.11 = GPIO11

Another thing to consider.. GPIO35 is input only, so we can't swap to that :roll:

To determine an available output to drive the LED I will need to dig out info on this AI ESP32S board,
unless you get there first

edit: try a bit further down on GPIO25 (Pin 25, A.25)

LeighM
Valued Contributor
Posts: 394
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 69 times
Been thanked: 208 times

Re: ESP32 Can't compile

Post by LeighM »

There is a very important note here ...
https://docs.espressif.com/projects/esp ... /gpio.html

Which includes ...
  • SPI0/1: GPIO6-11 and GPIO16-17 are usually connected to the SPI flash and PSRAM integrated on the module and therefore should not be used for other purposes.
  • GPI: GPIO34-39 can only be set as input mode and do not have software-enabled pullup or pulldown functions.

Alan_37
Posts: 118
Joined: Thu Dec 03, 2020 7:23 pm
Has thanked: 34 times
Been thanked: 16 times

Re: ESP32 Can't compile

Post by Alan_37 »

Hi LeighM ,

Yes, that was the problem, output on GPIO25 the ESP does not panic and working fine now.
I didn't know that some pins will cause the ESP to panic and reboot if set to output.
would be a good idea to disable those pins in the output icon.

And yes it would be less confusing if the pins were labeled GPIO instead of pin .

Thanks for your help LeighM.

Post Reply