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 · 0 comments
Labels
Area: ESP-IDF related ESP-IDF related issues

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: ESP-IDF related ESP-IDF related issues
Projects
None yet
Development

No branches or pull requests

2 participants