[已解决]更换16MB flash后,编译显示drom溢出

pamer233
Posts: 2
Joined: Thu Oct 21, 2021 12:28 pm

[已解决]更换16MB flash后,编译显示drom溢出

Postby pamer233 » Thu Oct 21, 2021 12:52 pm

硬件:ESP32-S模组,取下屏蔽罩更换了flash
软件:ESP-IDF v4.3.1
开发环境:Windows+VScode+Espressif IDF插件
因为需要存放9M的图片组,所以写了个.h文件,定义了一个很大的常量数组来保存它,使用static const char* pic[]={}
按照教程修改了config里面的flash大小为16M,再修改了patition table。编译时出来了

Code: Select all

Generated D:/xxxx/ESP32SDK/tcp_client/build/bootloader/bootloader.bin
[916/917] Linking CXX executable tcp_client.elf
FAILED: tcp_client.elf 
cmd.exe /C "cd . && D:\Users\xxxx\.espressif\tools\xtensa-esp32-elf\esp-2021r1-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe 
 -mlongcalls -Wno-frame-address   @CMakeFiles\tcp_client.elf.rsp  -o tcp_client.elf  && cd ."
d:/users/xxxx/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: tcp_client.elf section `.flash.rodata' will not fit in region `drom0_0_seg'
d:/users/xxxx/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: section .dram0.data LMA [000000003ffb0000,000000003ffb4157] overlaps section .flash.rodata LMA [000000003f400120,000000003ffefc67]
d:/users/penny/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: region `drom0_0_seg' overflowed by 8329212 bytes
附上patition table:
*******************************************************************************
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,24K,
phy_init,data,phy,0xf000,4K,
factory,app,factory,0x10000,15M,
*******************************************************************************
Last edited by pamer233 on Sat Oct 23, 2021 3:51 am, edited 1 time in total.

ESP_ICY
Posts: 404
Joined: Mon Aug 23, 2021 11:10 am

Re: 更换16MB flash后,编译显示drom溢出

Postby ESP_ICY » Fri Oct 22, 2021 11:48 am

32 系列的芯片不支持一次性读取4MB以上的数据,不要使用大数组的形式

pamer233
Posts: 2
Joined: Thu Oct 21, 2021 12:28 pm

Re: 更换16MB flash后,编译显示drom溢出

Postby pamer233 » Sat Oct 23, 2021 3:51 am

ESP_ICY wrote:
Fri Oct 22, 2021 11:48 am
32 系列的芯片不支持一次性读取4MB以上的数据,不要使用大数组的形式
谢谢,很有帮助

Who is online

Users browsing this forum: No registered users and 49 guests