Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile with CONFIG_COMPILER_OPTIMIZATION_PERF (-O2) option, ESP-IDF with arduino as a component #9607

Open
1 task done
ScottyDoesKnow opened this issue May 9, 2024 · 5 comments
Assignees
Labels
Area: Arduino as ESP-IDF component Issues about Arduino used as component in ESP-IDF Area: ESP-IDF related ESP-IDF related issues Status: Awaiting triage Issue is waiting for triage
Milestone

Comments

@ScottyDoesKnow
Copy link

Board

ESP32-WROOM-32

Device Description

ESP32-2432S028 (Cheap Yellow Display)

Hardware Configuration

No

Version

latest development Release Candidate (RC-X)

IDE Name

ESP-IDF Extension for Visual Studio Code

Operating System

Windows 10

Flash frequency

40MHz

PSRAM enabled

no

Upload speed

460800

Description

Can't compile for performance. Not sure if this is the right place because the issues are with the the components this component uses. You can see a pull request to fix one of these issues here:

espressif/esp-rainmaker#297

I manually made the same changes to fix this issue and another component broke with a reference to a potentially uninitialized enum variable. I fixed that and more strncpy errors popped up, at which point I gave up.

Sketch

In sdkconfig.defaults:

CONFIG_COMPILER_OPTIMIZATION_DEFAULT=n
CONFIG_COMPILER_OPTIMIZATION_SIZE=n
CONFIG_COMPILER_OPTIMIZATION_PERF=y

Debug Message

/managed_components/espressif__esp_rainmaker/src/core/esp_rmaker_schedule.c:635:17: error: 'strncpy' output truncated before terminating nul copying
as many bytes from a string as its length [-Werror=stringop-truncation]
  635 |                 strncpy(*info, _info, strlen(_info));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@ScottyDoesKnow ScottyDoesKnow added the Status: Awaiting triage Issue is waiting for triage label May 9, 2024
@Jason2866 Jason2866 added Area: ESP-IDF related ESP-IDF related issues and removed Status: Awaiting triage Issue is waiting for triage labels May 10, 2024
@ricardoquesada
Copy link

+1.

Triggering this issue as well.
When I was using Arduino Core v2.0.17 + ESP-IDF 4.4.7 it was compiling Ok.
When I updated it to Arduino Core v3.0.0 + ESP-IDF 5.1.4, I fails to compile with that error.

Using Arduino Core as an ESP-IDF component.

@VojtechBartoska VojtechBartoska added Area: Arduino as ESP-IDF component Issues about Arduino used as component in ESP-IDF Status: Awaiting triage Issue is waiting for triage labels Jun 5, 2024
@VojtechBartoska
Copy link
Collaborator

Hello, thanks for reporting the issue.

@lucasssvaz Will you be please able to take a look and try to replicate this problem? Thanks

@me-no-dev
Copy link
Member

The issue is in rainmaker. Not sure what action we can take. @ricardoquesada @ScottyDoesKnow suggesting file an issue in the RainMaker repo

@ricardoquesada
Copy link

done: espressif/esp-rainmaker#315

@ricardoquesada
Copy link

Filed a similar bug for arduino-core: #9784

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Arduino as ESP-IDF component Issues about Arduino used as component in ESP-IDF Area: ESP-IDF related ESP-IDF related issues Status: Awaiting triage Issue is waiting for triage
Projects
Development

No branches or pull requests

6 participants