Hello FC team,
if I do a init of ESP32 WLAN and BT component together I´ll get the follwing compiler message.
[5/7] Linking CXX executable esp-project.elf
[6/7] Generating binary image from built executable
esptool.py v3.3.4-dev
Creating esp32 image...
Merged 27 ELF sections
Successfully created esp32 image.
Generated C:/ESP32/YGE_DBU_Texy/YGE_DBU_Texy_V_1_8_3/build/esp-project.bin
[7/7] cmd.exe /C "cd /D C:\ESP32\YGE_DBU_Texy\YGE_DBU_Texy_V_1_8_3\build\esp-idf\esptool_py && C:\ESP-IDF\-tools\python_env\idf4.4_py3.7_env\Scripts\python.exe C:/Users/dirkb/Desktop/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 partition --type app C:/ESP32/YGE_DBU_Texy/YGE_DBU_Texy_V_1_8_3/build/partition_table/partition-table.bin C:/ESP32/YGE_DBU_Texy/YGE_DBU_Texy_V_1_8_3/build/esp-project.bin"
FAILED: esp-idf/esptool_py/CMakeFiles/app_check_size C:/ESP32/YGE_DBU_Texy/YGE_DBU_Texy_V_1_8_3/build/esp-idf/esptool_py/CMakeFiles/app_check_size
cmd.exe /C "cd /D C:\ESP32\YGE_DBU_Texy\YGE_DBU_Texy_V_1_8_3\build\esp-idf\esptool_py && C:\ESP-IDF\-tools\python_env\idf4.4_py3.7_env\Scripts\python.exe C:/Users/dirkb/Desktop/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 partition --type app C:/ESP32/YGE_DBU_Texy/YGE_DBU_Texy_V_1_8_3/build/partition_table/partition-table.bin C:/ESP32/YGE_DBU_Texy/YGE_DBU_Texy_V_1_8_3/build/esp-project.bin"
Error: app partition is too small for binary esp-project.bin size 0x13c100:
- Part 'factory' 0/0 @ 0x10000 size 0x100000 (overflow 0x3c100)
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
Executing action: all (aliases: build)
Running ninja in directory C:\ESP32\YGE_DBU_Texy\YGE_DBU_Texy_V_1_8_3\build
Executing "ninja all"...
Is this a known issue?
BR
Dirk
ESP32 WLAN init and BT init Problem
-
dvcam99
- Posts: 104
- http://meble-kuchenne.info.pl
- Joined: Fri Dec 04, 2020 11:03 am
- Has thanked: 9 times
- Been thanked: 14 times
-
mnfisher
- Valued Contributor
- Posts: 1718
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 146 times
- Been thanked: 803 times
Re: ESP32 WLAN init and BT init Problem
Hi Dirk,
It's complaining that the app partition isn't large enough (though if all you are doing is initialising the WiFi and BT I would be surprised that this is the case)
You will need to define a custom partition table - and point to that using menuconfig - allocating more memory to the application.
Something like
Assuming you are using a 4MB (or above part).
Save as partition.csv (name to suit) and use menuconfig partition table to point to this.
Then recompile - and test again.
Might also be worth setting compiler options to 'size' (again using menuconfig)
Martin
It's complaining that the app partition isn't large enough (though if all you are doing is initialising the WiFi and BT I would be surprised that this is the case)
You will need to define a custom partition table - and point to that using menuconfig - allocating more memory to the application.
Something like
Code: Select all
# Name, Type, SubType, Offset, Size, Flags
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 2MSave as partition.csv (name to suit) and use menuconfig partition table to point to this.
Then recompile - and test again.
Might also be worth setting compiler options to 'size' (again using menuconfig)
Martin
Re: ESP32 WLAN init and BT init Problem
Hello Martin,
many thanks for your suggestion. I will review it.
Additional question. Were do I find the menuconfig partition table in order to setup the link for the csv?
In between I did a cross check. Only BT init or WLAN init compiles correctly. Both together not like mention before.
The reason why I´m looking forward in order to use BT and WLAN is actually I want to make sure both are switched off. This because I want to save power and more important reducing the risk of 2.4GHZ interfernece by the ESP32. May the concern is that a beacon or so would start.
BR
Dirk
many thanks for your suggestion. I will review it.
Additional question. Were do I find the menuconfig partition table in order to setup the link for the csv?
In between I did a cross check. Only BT init or WLAN init compiles correctly. Both together not like mention before.
The reason why I´m looking forward in order to use BT and WLAN is actually I want to make sure both are switched off. This because I want to save power and more important reducing the risk of 2.4GHZ interfernece by the ESP32. May the concern is that a beacon or so would start.
BR
Dirk
Happy FC9, FC-8 and FC-6 professional user 
-
stefan.erni
- Valued Contributor
- Posts: 1125
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 215 times
- Been thanked: 235 times
Re: ESP32 WLAN init and BT init Problem
Hi Dirk
something else for power....
If you like to save power you can also reduce the speed from the clock in the menue config or with a c-command to 160Mhz or 80Mhz
and you can let the esp32 sleep for a while or sleep until you wake the esp32 up with a pin pull down
viewtopic.php?t=3130&hilit=power
regards
Stefan
something else for power....
If you like to save power you can also reduce the speed from the clock in the menue config or with a c-command to 160Mhz or 80Mhz
and you can let the esp32 sleep for a while or sleep until you wake the esp32 up with a pin pull down
viewtopic.php?t=3130&hilit=power
regards
Stefan
-
BenR
- Matrix Staff
- Posts: 2014
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 529 times
- Been thanked: 719 times
Re: ESP32 WLAN init and BT init Problem
Hello,
This is something I've personally come across and I ended up having to manually edit a file in the compiler.
Here's the error I was getting: ESP32 Image length 1352272 doesn't fit in partition length
Edit this file in a text editor.
C:\FC_ESP\frameworks\esp-idf-v5.3.1\components\partition_table\partitions_singleapp.csv
For me the fix was to Increase the "factory, app" size from 1M to 0x180000.
This is something I've personally come across and I ended up having to manually edit a file in the compiler.
Here's the error I was getting: ESP32 Image length 1352272 doesn't fit in partition length
Edit this file in a text editor.
C:\FC_ESP\frameworks\esp-idf-v5.3.1\components\partition_table\partitions_singleapp.csv
For me the fix was to Increase the "factory, app" size from 1M to 0x180000.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: ESP32 WLAN init and BT init Problem
Hello Stefan,
Hello Ben,
I can report that the fix from Ben is working. I can compile now with WLAN and BT init together.
This for the main reason that I can not tolerate a 2.4GHZ emission from the ESP32. LOL
I will see if I can monitor a difference in the emission spectrum with or without BL WLAN init.
So far many thanks guys.
BR
Dirk
Hello Ben,
I can report that the fix from Ben is working. I can compile now with WLAN and BT init together.
This for the main reason that I can not tolerate a 2.4GHZ emission from the ESP32. LOL
I will see if I can monitor a difference in the emission spectrum with or without BL WLAN init.
So far many thanks guys.
BR
Dirk
Happy FC9, FC-8 and FC-6 professional user 
-
mnfisher
- Valued Contributor
- Posts: 1718
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 146 times
- Been thanked: 803 times
Re: ESP32 WLAN init and BT init Problem
Can do as Ben suggested - or from menuconfig:
I'd used the custom 'route' for creating a SPIFFS partition...
Then select the top row Partition table (single factory app, no OTA) ----> and change to Custom...
Then change the name here if needed: Martin
I'd used the custom 'route' for creating a SPIFFS partition...
Then select the top row Partition table (single factory app, no OTA) ----> and change to Custom...
Then change the name here if needed: Martin
-
BenR
- Matrix Staff
- Posts: 2014
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 529 times
- Been thanked: 719 times
Re: ESP32 WLAN init and BT init Problem
Ooh that's also good to know thanks Martin.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel