ESP32 IDF v5.0 Support

For general Flowcode discussion that does not belong in the other sections.
mnfisher
Valued Contributor
Posts: 953
http://meble-kuchenne.info.pl
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 507 times

Re: ESP32 IDF v5.0 Support

Post by mnfisher »

Just testing this with some SPI code - I have the v5 toolchain installed and compiling from a command line 'works' (or at least attempts to compile)

Compiling from FC - I get 'Can't find export.bat'

In command line - I do 'idf.py set-target esp32-c3' then 'idf.py build'

Then idf.py build - and I get errors such as KTIMER_1 undeclared (in ESP_CAL_Delay.c) and KHSPI_HOST undeclared in ESP_CAL_SPI.c

I've done a full database upgrade (and followed the steps to move version. What have I missed?

A 'simple' program - initialise UART - print a string also throws errors (TIMER_1 undeclared) as does an 'empty' program (from internals.c)

Martin

mnfisher
Valued Contributor
Posts: 953
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 507 times

Re: ESP32 IDF v5.0 Support

Post by mnfisher »

Phew - things up and running again and now using v5.0....

One thing to note - the location needed is
C:\espressif\frameworks\esp-idf-v5.0
where 'espressif' is the name of the directory you have the toolset installed.

A couple of things I notice on a first run:

The requirements for #include files have changed. Previously (4.1) I had "#include "file.dat"
Now I need #include "project/main/file.dat"

FeedTheDog no longer works - TimerG0 and G1's names have changed.

Using the UART gives an error "Error (839) uart: uart_param_config(748): Invalid src_clk" - which it puts to UART and then works quite happily.

Martin

mnfisher
Valued Contributor
Posts: 953
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 507 times

Re: ESP32 IDF v5.0 Support

Post by mnfisher »

A little tip to make life easier.

The output from the esp32 compiler is a 'little' verbose. It is possible to turn off some of the warnings.

In your project directory/main

Edit CMakeLists.txt

At the end of the file add:

Code: Select all

target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-unused-variable)
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-unused-function)
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-int-conversion)
This will turn off unused variable and function warnings as well as conversion between integer types. Obviously you should aim to tidy up the code that gives these messages - but it makes spotting the error 'needle' easier in the early project haystack...

Martin

Other warnings can be disabled using similar syntax....

stefan.erni
Valued Contributor
Posts: 758
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 149 times
Been thanked: 171 times

Re: ESP32 IDF v5.0 Support

Post by stefan.erni »

Hi Ben

For the both type of ESP32
I suspect a problem with the update.
It's alway the same files to download....

regards

Stefan

chipfryer27
Valued Contributor
Posts: 1146
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 284 times
Been thanked: 412 times

Re: ESP32 IDF v5.0 Support

Post by chipfryer27 »

Hi

Today I had a play with a generic ESP32-WROOM

I created two charts as simple as can be

Chart-1 simply connected to an SSID. If successful I'd see it on my router
Chart-2 set the ESP as an AP. If successful I could connect to it using my phone.

Using a machine running FCv10 and IDFv4 everything worked as expected. I then added an i2c SSD1306 OLED. This did little other than to display progeress as the chart progressed and if successfully connected, display IP. Again it ran without any issue.

Moving on to a machine running FCv10 and IDFv5 and using the same charts as above (recompiling using v5):-

Chart-1 (without OLED) worked fine, I could see the ESP on my router.
Chart-2 (without OLED) would not allow my phone to connect. Phone informed that it could not obtain an IP.

Chart-1 (with OLED) would not connect to SSID. Nothing I could do could get it to connect.
Chart-2 (with OLED) as before would not allow anything to connect.

Still in v5, reloading the previously working Chart-1 (without OLED) would not connect to my SSID. Nothing I could do to get it to connect.

Moving back to the machine running v4 and reloading any of the Chart-1's worked as expected.

So it would seem that

Using v4 all seems fine
Using v5 without the OLED will connect to SSID
Using v5 will not allow the use of AP (not providing IP)
Using v5 with the OLED seems to mess things up.

Regards

wayne_millard
Posts: 94
Joined: Fri Dec 04, 2020 6:12 pm
Has thanked: 1 time
Been thanked: 9 times

Re: ESP32 IDF v5.0 Support

Post by wayne_millard »

Hi,

This seems the same problem that i have been having.
I have a wifi kit 32 esp with a 1306 I2C display that i have been using to try to connect to a SSID and fetch NTP time.
I could see that it connected to my hub but would not retreve any NTP also could not get a return value other than 0 from the connect to SSID componet.

Im running windows 11 with full esp pack and running v5 of IDE.

Thanks,
Wayne M

chipfryer27
Valued Contributor
Posts: 1146
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 284 times
Been thanked: 412 times

Re: ESP32 IDF v5.0 Support

Post by chipfryer27 »

Hi Wayne

In earlier posts Benj does say that v5 is work in progress and he's working his way through things, so my post is really just for info. However in saying that it does look like the 1306 may be troublesome.

I'm kind of lucky in that I have an alternate machine running v4, so it's not really an issue for me. Tomorrow I may enable a UART to send info out to a PC instead of the display (easier than connecting up a 2 x16 LCD <s>) and see if the WiFi problem persists.

Regards

EDIT..
Forgot to ask how you got on installing 4.1 as per my other post

chipfryer27
Valued Contributor
Posts: 1146
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 284 times
Been thanked: 412 times

Re: ESP32 IDF v5.0 Support

Post by chipfryer27 »

Hi

Today on my machine running v4. I sent the basic chart (connects to SSID) to the ESP. All good.

I then added in a UART on Ch2 and recompiled. The UART simply sends out progress such as ESP initialised OK etc and once connected to the SSID it prints out the IP address.

Again all good.

I then moved to my machine running v5 and sent the basic chart that simply connects to SSID. All good, I could see it on my router (after rebooting router from previous tests).

I then added in the UART.

Whilst it compiles OK it won't connect to my router at all.

So it seems adding in either a UART or SSD1306 display messes things up in v5.

Regards

chipfryer27
Valued Contributor
Posts: 1146
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 284 times
Been thanked: 412 times

Re: ESP32 IDF v5.0 Support

Post by chipfryer27 »

Hi

In a previous post Jay_Dee asked about recommendations etc and in one reply Benj recommended some ESP32 devices based on the Lolin. I've just obtained a few and tried the following :-

W10 Pro running FCv10.0.2.21 with IDFv5

Simple flasher - flashed on-board LED successfully
Connect to SSID - would not connect to my SSID

I don't have any other Flowcode or IDF's installed on this machine so I then tried on a W7 Laptop running v9.3.1.36 with IDF4.x. Once compiled to chip this did connect to my SSID so it appears that v5 has a few bugs.

This is just an observation to provide feedback.

Regards

mnfisher
Valued Contributor
Posts: 953
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 507 times

Re: ESP32 IDF v5.0 Support

Post by mnfisher »

Another issue with v5 - timer interrupts don't work (timer undefined) This also seems to affect the UART component.

Martin

Post Reply