Good afternoon,
I am trying to send a file having a size (500Ko) using BLE between a client and a server.
The file is read from Internal Flash chunk by chunk and sent using a write characteristic (Client characteristic).
During the file transfer, the following message appears on the client side.
BT_INIT: Malloc failed.
I have a chip with a 2Mo Embedded Flash.
Do you know what can happen ?
Thank you.
Thomas TRUILHE
ESP32S3 WROOM 1 : Bluedroid : BT_INIT: Malloc failed
-
- Posts: 229
- Joined: Thu Jul 14, 2022 5:15 am
Re: ESP32S3 WROOM 1 : Bluedroid : BT_INIT: Malloc failed
同样的问题8M只识别到900K+.升级至5.0.1版本,问题依旧
This is esp32s3 chip with 2 CPU cores, WiFi/BLE, silicon revision 1, 16MB external flash
app_mainHeap summary for capabilities 0x00000400:
At 0x3c710000 len 983040 free 981136 allocated 0 min_free 981136
largest_free_block 966656 alloc_blocks 0 free_blocks 1 total_blocks 1
Totals:
free 981136 allocated 0 min_free 981136 largest_free_block 966656
起始地址也怪怪的
soc定义
#define SOC_EXTRAM_DATA_LOW 0x3C000000
#define SOC_EXTRAM_DATA_HIGH 0x3E000000
手册说明
在 CONFIG_SPIRAM_USE 中选择 “Make RAM allocatable using heap_caps_malloc(…, MALLOC_CAP_SPIRAM)” 选项。
启用上述选项后,片外 RAM 被映射到地址 0x3D000000,并将这个区域添加到携带 MALLOC_CAP_SPIRAM 标志的 堆内存分配器 。
程序如果想从片外存储器分配存储空间,则需要调用 heap_caps_malloc(size, MALLOC_CAP_SPIRAM),之后可以调用 free() 函数释放这部分存储空间。
This is esp32s3 chip with 2 CPU cores, WiFi/BLE, silicon revision 1, 16MB external flash
app_mainHeap summary for capabilities 0x00000400:
At 0x3c710000 len 983040 free 981136 allocated 0 min_free 981136
largest_free_block 966656 alloc_blocks 0 free_blocks 1 total_blocks 1
Totals:
free 981136 allocated 0 min_free 981136 largest_free_block 966656
起始地址也怪怪的
soc定义
#define SOC_EXTRAM_DATA_LOW 0x3C000000
#define SOC_EXTRAM_DATA_HIGH 0x3E000000
手册说明
在 CONFIG_SPIRAM_USE 中选择 “Make RAM allocatable using heap_caps_malloc(…, MALLOC_CAP_SPIRAM)” 选项。
启用上述选项后,片外 RAM 被映射到地址 0x3D000000,并将这个区域添加到携带 MALLOC_CAP_SPIRAM 标志的 堆内存分配器 。
程序如果想从片外存储器分配存储空间,则需要调用 heap_caps_malloc(size, MALLOC_CAP_SPIRAM),之后可以调用 free() 函数释放这部分存储空间。
Who is online
Users browsing this forum: Google [Bot], MicroController and 60 guests