B4R Question memory occupation of the Bluetooth library

Gerardo Tenreiro

Active Member
Licensed User
Hello
I am testing the rESP32Bluettoh version 1.0 library that I downloaded from the forum and I observe that just initializing it consumes 71% of the memory of the ESP32 "uPesy ESP32 Wroom DevKit" that I have for testing
It is normal?
Can someone verify if the occupancy of this code is 71%
Thank you

Utilizando archivo previamente compilado: D:\rr\MULTIMETRO_BT\MULTIMETRO_BT\Objects\bin\core\WString.cpp.o
Utilizando archivo previamente compilado: D:\rr\MULTIMETRO_BT\MULTIMETRO_BT\Objects\bin\core\core.a
Linking everything together...
"C:\\Users\\Gerardo\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\gcc8_4_0-esp-2021r1/bin/xtensa-esp32-elf-g++" "-Wl,--Map=D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin/src.ino.map" "-LC:\\Users\\Gerardo\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.0/tools/sdk/esp32/lib" "-LC:\\Users\\Gerardo\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.0/tools/sdk/esp32/ld" -T esp32.rom.redefined.ld -T memory.ld -T sections.ld -T esp32.rom.ld -T esp32.rom.api.ld -T esp32.rom.libgcc.ld -T esp32.rom.newlib-data.ld -T esp32.rom.syscalls.ld -T esp32.peripherals.ld -mlongcalls -Wno-frame-address -Wl,--cref -Wl,--gc-sections -fno-rtti -fno-lto -u _Z5setupv -u _Z4loopv -Wl,--wrap=mbedtls_mpi_exp_mod -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u ld_include_panic_highint_hdl -u start_app -u start_app_other_cores -u __ubsan_include -Wl,--wrap=longjmp -u __assert_func -u vfs_include_syscalls_impl -Wl,--undefined=uxTopUsedPriority -u app_main -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -u __cxa_guard_dummy -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_USB_CDC_ON_BOOT=0 -Wl,--start-group "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\sketch\\AsyncStreams.cpp.o" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\sketch\\B4RArduino.cpp.o" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\sketch\\B4RCore.cpp.o" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\sketch\\B4RSerializator.cpp.o" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\sketch\\B4RStream.cpp.o" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\sketch\\ByteConverter.cpp.o" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\sketch\\RandomAccessFile.cpp.o" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\sketch\\Scheduler.cpp.o" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\sketch\\b4r_bluetooth_m.cpp.o" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\sketch\\b4r_main.cpp.o" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\sketch\\rESP32Bluetooth.cpp.o" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\sketch\\rESP8266FileSystem.cpp.o" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\sketch\\src.ino.cpp.o" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\libraries\\BluetoothSerial\\BTAddress.cpp.o" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\libraries\\BluetoothSerial\\BTAdvertisedDeviceSet.cpp.o" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\libraries\\BluetoothSerial\\BTScanResultsSet.cpp.o" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\libraries\\BluetoothSerial\\BluetoothSerial.cpp.o" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\libraries\\FS\\FS.cpp.o" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\libraries\\FS\\vfs_api.cpp.o" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\libraries\\SPIFFS\\SPIFFS.cpp.o" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin\\core\\core.a" -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lasio -lbt -lcbor -lunity -lcmock -lcoap -lconsole -lnghttp -lesp-tls -lesp_adc_cal -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_lcd -lprotobuf-c -lprotocomm -lmdns -lesp_local_ctrl -lsdmmc -lesp_serial_slave_link -lesp_websocket_client -lexpat -lwear_levelling -lfatfs -lfreemodbus -ljsmn -ljson -llibsodium -lmqtt -lopenssl -lperfmon -lspiffs -lulp -lwifi_provisioning -lbutton -ljson_parser -ljson_generator -lesp_schedule -lesp_rainmaker -lqrcode -lws2812_led -lesp-dsp -lesp-face -lesp32-camera -lesp_littlefs -lfb_gfx -lasio -lcbor -lcmock -lunity -lcoap -lesp_hid -lesp_lcd -lesp_local_ctrl -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lperfmon -lesp_adc_cal -lfatfs -lwear_levelling -lopenssl -lspiffs -lesp_rainmaker -lmqtt -lwifi_provisioning -lprotocomm -lbt -lbtdm_app -lprotobuf-c -lmdns -lconsole -ljson -ljson_parser -ljson_generator -lesp_schedule -lqrcode -lpe -lfd -lfr -ldetection_cat_face -ldetection -ldl -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lphy -lesp_phy -lphy -lesp_phy -lphy -lrtc -lxt_hal -lm -lnewlib -lstdc++ -lpthread -lgcc -lcxx -lapp_trace -lgcov -lapp_trace -lgcov -lc -Wl,--end-group -Wl,-EL -o "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin/src.ino.elf"
"C:\\Users\\Gerardo\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esptool_py\\3.1.0/esptool.exe" --chip esp32 elf2image --flash_mode dio --flash_freq 80m --flash_size 4MB -o "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin/src.ino.bin" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin/src.ino.elf"
esptool.py v3.1
Merged 25 ELF sections
"C:\\Users\\Gerardo\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.0/tools/gen_esp32part.exe" -q "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin/partitions.csv" "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin/src.ino.partitions.bin"
Usando librerÃa BluetoothSerial con versión 2.0.0 en la carpeta: C:\Users\Gerardo\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.0\libraries\BluetoothSerial
Usando librerÃa FS con versión 2.0.0 en la carpeta: C:\Users\Gerardo\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.0\libraries\FS
Usando librerÃa SPIFFS con versión 2.0.0 en la carpeta: C:\Users\Gerardo\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.0\libraries\SPIFFS
"C:\\Users\\Gerardo\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\gcc8_4_0-esp-2021r1/bin/xtensa-esp32-elf-size" -A "D:\\rr\\MULTIMETRO_BT\\MULTIMETRO_BT\\Objects\\bin/src.ino.elf"
El Sketch usa 933921 bytes (71%) del espacio de almacenamiento de programa. El máximo es 1310720 bytes.
Las variables Globales usan 23024 bytes (7%) de la memoria dinámica, dejando 304656 bytes para las variables locales. El máximo es 327680 bytes.
Subiendo...
esptool.py v3.1
Serial port COM4
Connecting....
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: ec:94:cb:4a:4e:f4
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.


El Sketch usa 933921 bytes (71%) del espacio de almacenamiento de programa. El máximo es 1310720 bytes.

 

Attachments

  • MULTIMETRO_BT.zip
    1.6 KB · Views: 273

Erel

B4X founder
Staff member
Licensed User
Longtime User
It is normal. This is the size of the native Bluetooth SDK.

Don't worry about it. If needed you can increase the program storage by choosing a different partition such as this one:

B4X:
Sketch uses 927144 bytes (44%) of program storage space. Maximum is 2097152 bytes.

1635837011638.png
 
Upvote 0

Gerardo Tenreiro

Active Member
Licensed User
Thank you so much. I'll try.
Currently the program without the BLUETOOTH is at 90% occupancy to see with this option if I manage to implement everything necessary
By the way where can I find documentation of memory partitions?
Thank you
 
Upvote 0

Gerardo Tenreiro

Active Member
Licensed User
Thanks
I have already read the subject and I think I have it under control, for the moment I continue with the BLUETOOTH at times that it did not finish working as it should.
Thank you
 
Upvote 0
Top