build and run-time errors using psram

Ivo.Tisch
Posts: 14
Joined: Tue Nov 05, 2019 7:59 pm

build and run-time errors using psram

Postby Ivo.Tisch » Mon Mar 16, 2020 11:33 pm

I have an espnow application running satisfactorily, to which I am now adding bluedroid - spp. In order to minimise IRAM usage, I have disabled both CONFIG_ESP32_WIFI_IRAM_OPT and CONFIG_ESP32_WIFI_RX_IRAM_OPT. All of my queues use heap allocated in psram. The psram spi clock is set at 80MHz and the interface is DIO. This configuration worked well with the espnow application.

My first problem: I would like to change the psram chip interface to QIO. I cannot manage to find a combination of config settings that work for this. I have tried both the HSPI and VSPI hosts. Can anyone advise me on the best approach to solving this?

I get the following error:

Code: Select all

[1016/1016] Generating binary image from built executable
esptool.py v2.9-dev
Generated D:/Repositories/Project-Folder/Espressif/New_Development/esp-now/espnow_dev.bin
Executing action: flash
Running esptool.py in directory d:\repositories\project-folder\espressif\new_development\esp-now
Executing "D:\Repositories\Project-Folder\Espressif\esp-tools\.espressif\python_env\idf4.1_py3.7_env\Scripts\python.exe D:\Repositories\Project-Folder\Espressif\esp-idf\components/esptool_py/esptool/esptool.py -p com5 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash @flash_project_args"...
esptool.py -p com5 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x10000 espnow_dev.bin

esptool write_flash: error: argument <address> <filename>: Detected overlap at address: 0x8000 for file: partition_table/partition-table.bin
esptool.py failed with exit code 2
In sdconfig, I note that there seems to be a conflict generated by menuconfig. I have CONFIG_ESPTOOLPY_FLASHMODE_QIO=y as well as CONFIG_ESPTOOLPY_FLASHMODE="dio" - see the listing below:

  • #
    # Serial flasher config
    #
    CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200
    CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
    # CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set
    # CONFIG_ESPTOOLPY_FLASHMODE_DIO is not set
    # CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set
    CONFIG_ESPTOOLPY_FLASHMODE="dio"
    CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
    # CONFIG_ESPTOOLPY_FLASHFREQ_40M is not set
    # CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set
    # CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set
    CONFIG_ESPTOOLPY_FLASHFREQ="80m"
    # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
    # CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
    CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
    # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
    # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
    CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
    CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
    CONFIG_ESPTOOLPY_BEFORE_RESET=y
    # CONFIG_ESPTOOLPY_BEFORE_NORESET is not set
    CONFIG_ESPTOOLPY_BEFORE="default_reset"
    CONFIG_ESPTOOLPY_AFTER_RESET=y
    # CONFIG_ESPTOOLPY_AFTER_NORESET is not set
    CONFIG_ESPTOOLPY_AFTER="hard_reset"
    # CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set
    # CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set
    CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y
    # CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set
    # CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set
    # CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set
    # CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set
    CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200
    CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
    # end of Serial flasher config

My second problem: When I add my trial bluetooth code, I get the following run-time error:

Code: Select all

rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:4
load:0x3fff0034,len:7312
ho 0 tail 12 room 4
load:0x40078000,len:15760
load:0x40080400,len:4740
0x40080400: _init at ??:?

entry 0x400806f0
I (60) boot: ESP-IDF v4.1-dev-2079-g5dbabae9d 2nd stage bootloader
I (60) boot: compile time 11:21:14
I (60) boot: chip revision: 1
I (65) boot.esp32: SPI Speed      : 80MHz
I (70) boot.esp32: SPI Mode       : DIO
I (74) boot.esp32: SPI Flash Size : 4MB
I (79) boot: Enabling RNG early entropy source...
I (84) boot: Partition Table:
I (88) boot: ## Label            Usage          Type ST Offset   Length
I (95) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (103) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (110) boot:  2 factory          factory app      00 00 00010000 00100000
I (118) boot: End of partition table
I (122) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x3a074 (237684) map
I (203) esp_image: segment 1: paddr=0x0004a09c vaddr=0x3ffbdb60 size=0x03f54 ( 16212) load
I (209) esp_image: segment 2: paddr=0x0004dff8 vaddr=0x40080000 size=0x00404 (  1028) load
0x40080000: _WindowOverflow4 at D:/Repositories/Project-Folder/Espressif/esp-idf/components/freertos/xtensa_vectors.S:1778

I (210) esp_image: segment 3: paddr=0x0004e404 vaddr=0x40080404 size=0x01c14 (  7188) load
I (221) esp_image: segment 4: paddr=0x00050020 vaddr=0x400d0020 size=0x105bb4 (1072052) map
0x400d0020: _stext at ??:?

I (550) esp_image: segment 5: paddr=0x00155bdc vaddr=0x40082018 size=0x17b30 ( 97072) load
0x40082018: psram_gpio_config at D:/Repositories/Project-Folder/Espressif/esp-idf/components/esp32/spiram_psram.c:523

E (587) esp_image: Image length 1431344 doesn't fit in partition length 1048576
E (587) boot: Factory app partition is not bootable
E (589) boot: No bootable app partitions in the partition table


idf.py size shows:
  • Total sizes:
    DRAM .data size: 16212 bytes
    DRAM .bss size: 7920 bytes
    Used static DRAM: 24132 bytes ( 100448 available, 19.4% used)
    Used static IRAM: 105284 bytes ( 25788 available, 80.3% used)
    Flash code: 1072051 bytes
    Flash rodata: 237684 bytes
    Total image size:~1431231 bytes (.bin may be padded larger)

Any advice on solving these issues would be much appreciated

Thanks
Ivo

Who is online

Users browsing this forum: ESP_Sprite and 89 guests