Skip to content

Need to add .text1 segment to generated binary #143

@earlephilhower

Description

@earlephilhower
Contributor

The linker in the 8266 Arduino code needed to split the .TEXT segment into two separate segments to support moving some std::function methods into IRAM (as they are used in IRQ callbacks for certain interfaces). See esp8266/Arduino#5922

There are now ".text" and ".text1" segments which comprise the program flash area. Our ELF2BIN.PY script has been updated to support this transparently, but it looks like PIO uses its own method of generating BIN files. Without the .text1 segment in the BIN image, the app obviously won't run and you'll get a boot loop. See esp8266/Arduino#5974

My quick scan makes me think the following two spots need to have .text1 added after .text to generate a proper image.

"-bs", ".text",

"-bs", ".text",

Thx
-EFP3

Activity

Jason2866

Jason2866 commented on Apr 11, 2019

@Jason2866
Contributor

With this changes, Tasmota builds are working again.
See esp8266/Arduino#5974 (comment)
Thx EFP3!

earlephilhower

earlephilhower commented on Apr 12, 2019

@earlephilhower
ContributorAuthor

Also need to add .text1 to the size computation, or it won't capture the full program usage in output:

SIZEPROGREGEXP=r"^(?:\.irom0\.text|\.text|\.data|\.rodata|)\s+([0-9]+).*",

added 2 commits that reference this issue on Apr 12, 2019
75f8d31
de1ba95
added a commit that references this issue on Apr 14, 2019
23ea21c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @earlephilhower@Jason2866

      Issue actions

        Need to add .text1 segment to generated binary · Issue #143 · platformio/platform-espressif8266