Skip to content

Micropython 1.26.1 with ESP-IDF 5.4.2 build fails #9

@gampam2000

Description

@gampam2000

Hi,

the build fails with many messages like this:
modcryptography.c:(.text+0x8891e): dangerous relocation: l32r: literal target out of range (try using text-section-literals): (.literal+0x11fcc)

adding the following to to micropython.cmake fixes it

# Add compiler flags to handle large code size on ESP32
if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET STREQUAL "esp32s3")
    target_compile_options(usermod_cryptography INTERFACE
        -mlongcalls
        -mtext-section-literals
    )
endif()

Best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions