Skip to content

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

Closed
@ScottyDoesKnow

Description

@ScottyDoesKnow

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.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions