E (581) boot: Image contains multiple IROM segments. Only the last one will be mapped.

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
seandepagnier
Posts: 15
Joined: Tue Feb 25, 2020 5:10 pm

E (581) boot: Image contains multiple IROM segments. Only the last one will be mapped.

Post by seandepagnier » Fri Jun 19, 2020 5:11 am

I have a lot of data I need to store in flash. I have this compiled into the firmware when building micropython as a header file:

char data022116[] PROGMEM = {
0x9, 0x0, 0x15, 0x0, 0x4, 0x0, 0x1,........};

I am familiar with PROGMEM from avr, but since it was not defined, I used:
#define ICACHE_RODATA_ATTR __attribute__((section(".irom.text")))
#define PROGMEM ICACHE_RODATA_ATTR


When I start micropython I get:
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_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:2
load:0x3fff0018,len:4
load:0x3fff001c,len:4832
ho 0 tail 12 room 4
load:0x40078000,len:8652
load:0x40080000,len:5748
entry 0x400802dc
E (581) boot: Image contains multiple IROM segments. Only the last one will be mapped.

At this point the program locks with not further boot. What am I doing wrong? How can I put data in flash variables in c?

seandepagnier
Posts: 15
Joined: Tue Feb 25, 2020 5:10 pm

Re: E (581) boot: Image contains multiple IROM segments. Only the last one will be mapped.

Post by seandepagnier » Fri Jun 19, 2020 6:30 am

I may have found the answer:

use "const"

Are there any other implications of this?

Post Reply